Mercurial > dive4elements > framework
diff artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java @ 115:a1200c6ed048
Initial interfaces to handle with Collections and Users.
artifacts/trunk@1338 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 01 Mar 2011 12:17:00 +0000 |
parents | |
children | c030895edfcb |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactCollectionFactory.java Tue Mar 01 12:17:00 2011 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2011 by Intevation GmbH + * + * This program is free software under the LGPL (>=v2.1) + * Read the file LGPL.txt coming with the software for details + * or visit http://www.gnu.org/licenses/ if it does not exist. + */ +package de.intevation.artifacts; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; + +public interface ArtifactCollectionFactory +{ + /** + * The short name of this factory. + * @return the name of this factory. + */ + String getName(); + + /** + * Description of this factory. + * @return description of the factory. + */ + String getDescription(); + + /** + * Create a new artifact of certain type, given a general purpose context and + * an identifier. + * @param context a context from the ArtifactDatabase. + * @param identifier unique identifer for the new artifact + * @param data the data containing more details for the setup of an Artifact. + * @return a new {@linkplain de.intevation.artifacts.ArtifactCollection ArtifactCollection} + */ + ArtifactCollection createCollection(String identifier, Object context, Document data); + + /** + * Setup the factory with a given configuration + * @param config the configuration + * @param factoryNode the ConfigurationNode of this Factory + */ + void setup(Document config, Node factoryNode); +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : +