Mercurial > dive4elements > framework
changeset 327:8a3ddd374dd1
Enhanced the State interface with an endOfLife() method.
artifacts/trunk@2582 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 25 Aug 2011 13:47:41 +0000 |
parents | 3447fa62f007 |
children | 1eb7863136f4 |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java |
diffstat | 3 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Aug 25 10:15:22 2011 +0000 +++ b/ChangeLog Thu Aug 25 13:47:41 2011 +0000 @@ -1,3 +1,10 @@ +2011-08-25 Ingo Weinzierl <ingo@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java: + Enhanced the State interface with a endOfLife() method; the default + implementation in AbstractState is empty. + 2011-08-25 Felix Wolfsteller <felix.wolfsteller@intevation.de> Minor cosmetics.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java Thu Aug 25 10:15:22 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java Thu Aug 25 13:47:41 2011 +0000 @@ -309,5 +309,11 @@ CallContext context, String uuid ); + + + @Override + public void endOfLife(Artifact artifact, Object context) { + // nothing to do here + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java Thu Aug 25 10:15:22 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/State.java Thu Aug 25 13:47:41 2011 +0000 @@ -107,5 +107,16 @@ CallContext context, String uuid ); + + + /** + * This method should be called by an Artifact that removes this State + * (current State and previous States). E.g. this might be interesting to + * remove generated files or stuff like that. + * + * @param artifact A parent Artifact. + * @param context The CallContext. + */ + public void endOfLife(Artifact artifact, Object context); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :