Mercurial > dive4elements > framework
changeset 277:0a579b71496b
Facets have indices now.
artifacts/trunk@2125 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 15 Jun 2011 14:16:04 +0000 |
parents | 8b58259d3dd3 |
children | 9ad188df72f2 |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java |
diffstat | 3 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jun 09 09:33:29 2011 +0000 +++ b/ChangeLog Wed Jun 15 14:16:04 2011 +0000 @@ -1,3 +1,9 @@ +2011-06-15 Ingo Weinzierl <ingo@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java: + Added an index to a facet. + 2011-06-08 Sascha L. Teichmann <sascha.teichmann@intevation.de> * artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java Thu Jun 09 09:33:29 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java Wed Jun 15 14:16:04 2011 +0000 @@ -8,6 +8,9 @@ */ public class DefaultFacet implements Facet { + /** The index of this facet.*/ + protected int index; + /** The name of this facet.*/ protected String name; @@ -22,11 +25,29 @@ * @param description The description of this new facet. */ public DefaultFacet(String name, String description) { + this(0, name, description); + } + + + /** + * The default constructor to create new Facet objects. + * + * @param index The index of this new facet. + * @param name The name of this new facet. + * @param description The description of this new facet. + */ + public DefaultFacet(int index, String name, String description) { + this.index = index; this.name = name; this.description = description; } + public int getIndex() { + return index; + } + + public String getName() { return name; }
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java Thu Jun 09 09:33:29 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java Wed Jun 15 14:16:04 2011 +0000 @@ -7,6 +7,13 @@ public interface Facet { /** + * Returns the index of this facet. + * + * @return the index of this facet. + */ + int getIndex(); + + /** * Returns the name of this facet. * * @return the name of this facet.