Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/state/StateEngine.java @ 106:ece0fdb07975
Implementations to initialize and retrieve states.
artifacts/trunk@1291 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 04 Feb 2011 10:50:53 +0000 |
parents | 26bfff409dd3 |
children | 9ece61d918b1 |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/StateEngine.java Fri Feb 04 08:55:17 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/StateEngine.java Fri Feb 04 10:50:53 2011 +0000 @@ -53,5 +53,18 @@ logger.debug("Add new states for the artifact '" + artifact + "'"); return this.states.put(artifact, states) != null; } + + + /** + * Returns the state list of an artifact specified by its name. + * + * @param artifact The name of the artifact. + * + * @return the list of states of this artifact or <i>null</i> if no states + * are existing for this <i>artifact</i>. + */ + public List<State> getStates(String artifact) { + return states.get(artifact); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :