# HG changeset patch # User Felix Wolfsteller # Date 1350392923 -7200 # Node ID 15179c77aa1d2beb041ced1bb4fc16f793f9e665 # Parent e39e23320a23b8c236ba2db66ae7bf4f5bed7f36 Documentation, so that readers know a tiny bit more what is going on. diff -r e39e23320a23 -r 15179c77aa1d ChangeLog --- a/ChangeLog Sat Oct 06 14:20:40 2012 +0200 +++ b/ChangeLog Tue Oct 16 15:08:43 2012 +0200 @@ -1,3 +1,15 @@ +2012-10-16 Felix Wolfsteller + + * artifact-database/src/main/java/de/intevation/artifactdatabase/state/FacetActivity.java: + Documentation of a somewhat important part. + +2012-10-08 Felix Wolfsteller + + * flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/ExtremeAccess.java, + flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/TimeseriesStepChart.java, + flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java: + Doc. + 2012-10-06 Sascha L. Teichmann * artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java: diff -r e39e23320a23 -r 15179c77aa1d artifact-database/src/main/java/de/intevation/artifactdatabase/state/FacetActivity.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/FacetActivity.java Sat Oct 06 14:20:40 2012 +0200 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/FacetActivity.java Tue Oct 16 15:08:43 2012 +0200 @@ -7,8 +7,11 @@ import java.util.List; import java.util.Map; + +/** Magical system. */ public interface FacetActivity { + /** Static 'activity' that lets all facets be active. */ public static final FacetActivity ACTIVE = new FacetActivity() { @Override public Boolean isInitialActive( @@ -20,6 +23,7 @@ } }; + /** Static 'activity' that lets all facets be inactive. */ public static final FacetActivity INACTIVE = new FacetActivity() { @Override public Boolean isInitialActive( @@ -33,20 +37,26 @@ Boolean isInitialActive(Artifact artifact, Facet facet, String output); + /** Singleton registry, that maps artifact names to the activities, which + * decide whether or not a facet should be (initially) active. */ public static final class Registry { + /** Singleton instance. */ private static final Registry INSTANCE = new Registry(); private Map> activities; + /** Private singleton constructor for the Facet-Activity-Registry. */ private Registry() { activities = new HashMap>(); } + /** Access Singleton instance. */ public static Registry getInstance() { return INSTANCE; } + /** Queries whether a given facet should be active or not. */ public synchronized boolean isInitialActive( String key, Artifact artifact,