ingo@100: /* ingo@100: * Copyright (c) 2010 by Intevation GmbH ingo@100: * ingo@100: * This program is free software under the LGPL (>=v2.1) ingo@100: * Read the file LGPL.txt coming with the software for details ingo@100: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@100: */ ingo@100: sascha@68: package de.intevation.artifacts; sascha@68: sascha@68: import java.io.Serializable; sascha@68: sascha@68: import org.w3c.dom.Document; sascha@68: import org.w3c.dom.Node; sascha@78: sascha@68: /** sascha@78: * A factory which an XML in/XML out service which reachable through the sascha@78: * artifact database. sascha@77: * @author Sascha L. Teichmann sascha@68: */ sascha@68: public interface ServiceFactory sascha@70: extends Serializable sascha@68: { sascha@78: /** sascha@78: * The name of the service which is created by this factory. sascha@78: * @return The name of the created service. sascha@78: */ sascha@68: String getName(); sascha@68: sascha@78: /** sascha@78: * The description of the service which is created by this factory. sascha@78: * @return The description. sascha@78: */ sascha@68: String getDescription(); sascha@68: sascha@78: /** sascha@78: * Creates the service. This is done at startup time of the sascha@78: * artifact database system. sascha@78: * @param globalContext The global context of the artifact database. sascha@78: * @return The created service. sascha@78: */ sascha@68: Service createService(Object globalContext); sascha@68: sascha@78: /** sascha@78: * Configures this factory. This is called before sascha@78: * #createService(Object). sascha@78: * @param config The global configuration document of the artifact sascha@78: * database system. sascha@78: * @param factoryNode The node inside the configuration document which sascha@78: * corresponds to this factory. sascha@78: */ sascha@68: void setup(Document config, Node factoryNode); sascha@68: } sascha@68: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :