annotate artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultService.java @ 375:33176e6e3c37

Added Override annotations. artifacts/trunk@3909 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 03 Feb 2012 16:04:09 +0000
parents a8d62eb93cd4
children 9798e4d83681
rev   line source
100
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
1 /*
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
3 *
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
5 * Read the file LGPL.txt coming with the software for details
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
7 */
933bbc9fc11f Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
8
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 package de.intevation.artifactdatabase;
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
207
b2115f484edb Move Config and XMLUtils totally to commons package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
11 import de.intevation.artifacts.common.utils.XMLUtils;
b2115f484edb Move Config and XMLUtils totally to commons package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 100
diff changeset
12
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 import de.intevation.artifacts.CallMeta;
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 import de.intevation.artifacts.Service;
299
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
15 import de.intevation.artifacts.GlobalContext;
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 import de.intevation.artifacts.ServiceFactory;
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 import org.apache.log4j.Logger;
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 import org.w3c.dom.Document;
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21
89
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
22 /**
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
23 * Trivial implementation of an artifact database service. Useful to
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
24 * be subclassed.
90
68285f7bc476 More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 89
diff changeset
25 *
89
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
26 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
27 */
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 public class DefaultService
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 implements Service
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 {
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 private static Logger logger = Logger.getLogger(DefaultService.class);
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32
299
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
33 @Override
89
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
34 public Document process(
299
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
35 Document data,
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
36 GlobalContext globalContext,
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
37 CallMeta callMeta
89
d348fe1fd822 More javadoc (fixes small glitches, too).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 69
diff changeset
38 ) {
299
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
39 logger.debug("Service.process");
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40 return XMLUtils.newDocument();
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 }
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42
299
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
43 @Override
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
44 public void setup(ServiceFactory factory, GlobalContext globalContext) {
a8d62eb93cd4 Services now take GlobalContext on setup and process.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 207
diff changeset
45 logger.debug("Service.setup");
69
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 }
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 }
498bb84334d0 Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org