# HG changeset patch # User Ingo Weinzierl # Date 1302769585 0 # Node ID 3d14fe6e05f7b492a6b352707a79a913b4d413bd # Parent 33b9cc23ac9b5b3bfe5daef441a4bbde0b90eb33 Improved the describe() of a State - a reference to an artifact has been added. artifacts/trunk@1683 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 33b9cc23ac9b -r 3d14fe6e05f7 ChangeLog --- a/ChangeLog Wed Apr 13 15:19:59 2011 +0000 +++ b/ChangeLog Thu Apr 14 08:26:25 2011 +0000 @@ -1,3 +1,10 @@ +2011-04-14 Ingo Weinzierl + + * artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java: + Added a reference to an artifact to the parameterlist of describe(). + This is needed to retrieve other necessary information of an artifact. + 2011-04-13 Sascha L. Teichmann * artifact-database/src/main/resources/sql/org-postgresql-driver.properties: diff -r 33b9cc23ac9b -r 3d14fe6e05f7 artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java Wed Apr 13 15:19:59 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java Thu Apr 14 08:26:25 2011 +0000 @@ -21,6 +21,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactNamespaceContext; import de.intevation.artifacts.CallContext; @@ -280,12 +281,14 @@ * Describes the UI of the state. This method needs to be implemented by * concrete subclasses. * + * @param artifact A reference to the artifact this state belongs to. * @param document Describe doucment. * @param rootNode Parent node for all new elements. * @param context The CallContext. * @param uuid The uuid of an artifact. */ public abstract Element describe( + Artifact artifact, Document document, Node rootNode, CallContext context, diff -r 33b9cc23ac9b -r 3d14fe6e05f7 artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java Wed Apr 13 15:19:59 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java Thu Apr 14 08:26:25 2011 +0000 @@ -15,6 +15,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; +import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; import de.intevation.artifactdatabase.data.StateData; @@ -83,12 +84,14 @@ * This method is called when an artifacts retrieves a describe request. It * creates the user interface description of the current state. * + * @param artifact A reference to the artifact this state belongs to. * @param document Describe doucment. * @param rootNode Parent node for all new elements. * @param context The CallContext. * @param uuid The uuid of an artifact. */ public Element describe( + Artifact artifact, Document document, Node rootNode, CallContext context,