# HG changeset patch # User Felix Wolfsteller # Date 1318944375 0 # Node ID 0349dd524f9cfcdd603a3d414ad1b0b338b89110 # Parent 690037105542b8be966725bec5bb59d2cd7b7c1d Add convenience method to add default data as string. flys-artifacts/trunk@3006 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 690037105542 -r 0349dd524f9c flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Oct 18 12:56:12 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 18 13:26:15 2011 +0000 @@ -1,3 +1,10 @@ +2011-10-18 Felix Wolfsteller + + Add convenience-method to add defaultdata (string). + + * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: + (addStringData): Add Default (String) Data . + 2011-10-18 Felix Wolfsteller Add a new Artifact and Facet (StaticWKmsArtifact, WKmsFacet) to diff -r 690037105542 -r 0349dd524f9c flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Tue Oct 18 12:56:12 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Tue Oct 18 13:26:15 2011 +0000 @@ -3,6 +3,7 @@ import de.intevation.artifactdatabase.ArtifactDatabaseImpl; import de.intevation.artifactdatabase.DefaultArtifact; +import de.intevation.artifactdatabase.data.DefaultStateData; import de.intevation.artifactdatabase.data.StateData; import de.intevation.artifactdatabase.state.DefaultFacet; @@ -520,6 +521,10 @@ return data != null ? (String) data.getValue() : null; } + public void addStringData(String name, String value) { + addData(name, new DefaultStateData(name, null, null, value)); + } + public Collection getAllData() { return data.values(); }