Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultServiceFactory.java @ 89:d348fe1fd822
More javadoc (fixes small glitches, too).
artifacts/trunk@845 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 26 Mar 2010 16:16:32 +0000 |
parents | 48d1a9a082c2 |
children | 68285f7bc476 |
comparison
equal
deleted
inserted
replaced
88:69c84cf7c5d7 | 89:d348fe1fd822 |
---|---|
7 import de.intevation.artifacts.Service; | 7 import de.intevation.artifacts.Service; |
8 | 8 |
9 import org.apache.log4j.Logger; | 9 import org.apache.log4j.Logger; |
10 | 10 |
11 /** | 11 /** |
12 * Trivial implementation of the ServiceFactory interface. | |
13 * Name and an description are configured by the given Node given to | |
14 * #setup(Document, Node) via the 'name' and 'description' attributes. | |
15 * The name of the class that provides the concrete serice is configured | |
16 * by the 'service' attribute. | |
17 * | |
12 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | 18 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
13 */ | 19 */ |
14 public class DefaultServiceFactory | 20 public class DefaultServiceFactory |
15 implements ServiceFactory | 21 implements ServiceFactory |
16 { | 22 { |
17 private static Logger logger = | 23 private static Logger logger = |
18 Logger.getLogger(DefaultServiceFactory.class); | 24 Logger.getLogger(DefaultServiceFactory.class); |
19 | 25 |
26 /** | |
27 * XPath to access the name of the service. | |
28 */ | |
20 public static final String XPATH_NAME = "@name"; | 29 public static final String XPATH_NAME = "@name"; |
30 /** | |
31 * XPath to access the description of the service. | |
32 */ | |
21 public static final String XPATH_DESCRIPTION = "@description"; | 33 public static final String XPATH_DESCRIPTION = "@description"; |
34 /** | |
35 * XPath to access the class name of the service to be build by | |
36 * this factory. | |
37 */ | |
22 public static final String XPATH_SERVICE = "@service"; | 38 public static final String XPATH_SERVICE = "@service"; |
23 | 39 |
40 /** | |
41 * Default description if no description is given in configuration. | |
42 */ | |
24 public static final String DEFAULT_DESCRIPTION = | 43 public static final String DEFAULT_DESCRIPTION = |
25 "No description available"; | 44 "No description available"; |
26 | 45 |
46 /** | |
47 * Loaded service class if no class name is given in the configuration. | |
48 */ | |
27 public static final String DEFAULT_SERVICE = | 49 public static final String DEFAULT_SERVICE = |
28 "de.intevation.artifactdatabase.DefaultService"; | 50 "de.intevation.artifactdatabase.DefaultService"; |
29 | 51 |
52 /** | |
53 * The name of the service factory. | |
54 */ | |
30 protected String name; | 55 protected String name; |
31 | 56 |
57 /** | |
58 * The description of the service factory. | |
59 */ | |
32 protected String description; | 60 protected String description; |
33 | 61 |
62 /** | |
63 * The loaded class used to build the concrete service. | |
64 */ | |
34 protected Class serviceClass; | 65 protected Class serviceClass; |
35 | 66 |
67 /** | |
68 * Default constructor. | |
69 */ | |
36 public DefaultServiceFactory() { | 70 public DefaultServiceFactory() { |
37 } | 71 } |
38 | 72 |
39 public String getName() { | 73 public String getName() { |
40 return name; | 74 return name; |