Mercurial > dive4elements > framework
changeset 524:ab13ab6acc5c facet-metadata
New method to add meta data to a facet.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 12:29:21 +0200 |
parents | 97dc9b8ae68a |
children | 0fdd239f4f39 |
files | artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultFacet.java artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/Facet.java |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultFacet.java Wed May 21 11:23:45 2014 +0200 +++ b/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/DefaultFacet.java Wed Jul 02 12:29:21 2014 +0200 @@ -134,6 +134,11 @@ return this.metaData; } + @Override + public void addMetaData(String key, String value) { + this.metaData.put(key, value); + } + /** * (Do not) provide data. * Override to allow other facets to access your data.
--- a/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/Facet.java Wed May 21 11:23:45 2014 +0200 +++ b/artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/Facet.java Wed Jul 02 12:29:21 2014 +0200 @@ -79,6 +79,13 @@ */ Map<String, String> getMetaData(Artifact artifact, CallContext context); + /** + * Add a key value pair to the facets metadata. + * + * @param key The meta data key. + * @param value The meta data value. + */ + void addMetaData(String key, String value); /** * Get keys for which this Facet can provide data (for other facets, not @@ -116,5 +123,6 @@ Node toXML(Document doc); Facet deepCopy(); + } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :