Mercurial > dive4elements > framework
annotate artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultService.java @ 72:b01e47317a78
Added '/services' url to web server to list the available services in XML.
artifacts/trunk@600 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 22 Jan 2010 11:40:26 +0000 |
parents | 498bb84334d0 |
children | d348fe1fd822 |
rev | line source |
---|---|
69
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.artifactdatabase; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifacts.CallMeta; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.artifacts.Service; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.artifacts.ServiceFactory; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 import org.apache.log4j.Logger; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 import org.w3c.dom.Document; |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 public class DefaultService |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 implements Service |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 { |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 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
|
15 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 public Document process(Document data, Object globalContext, CallMeta callMeta) { |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 if (logger.isDebugEnabled()) { |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 logger.debug("Service.process"); |
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 return XMLUtils.newDocument(); |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 } |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 public void setup(ServiceFactory factory, Object globalContext) { |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 if (logger.isDebugEnabled()) { |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 logger.debug("Service.setup"); |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 } |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 } |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 } |
498bb84334d0
Added base class for services and service factories.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |