|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
WebServiceRtConfig.java | - | 0% | 0% | 0% |
|
1 | /** | |
2 | * JTRunner is free software; you can redistribute it and/or modify it under the | |
3 | * terms of the GNU General Public License as published by the Free Software | |
4 | * Foundation; either version 2, or (at your option) any later version. | |
5 | */ | |
6 | ||
7 | package jtr.ws.wsif; | |
8 | ||
9 | import java.util.HashMap; | |
10 | import javax.xml.namespace.QName; | |
11 | ||
12 | /** | |
13 | * This class is used by <code>WsifHelper</code> instances to internally | |
14 | * store a WSIF-based webservice configuration.<br> | |
15 | * This class can be thought as the runtime counterpart of the | |
16 | * <code>jtr.config.ws.WebServiceConfig</code> class, and as such | |
17 | * it is composed by a set of services (<code>WebServiceRtService</code> | |
18 | * instances) uniquely identified by their qualified name. | |
19 | * | |
20 | * @author Francesco Russo (frusso@dev.java.net) | |
21 | * @version 4.0 | |
22 | * @since 3.0 | |
23 | * @see jtr.config.ws.WebServiceConfig | |
24 | */ | |
25 | public class WebServiceRtConfig { | |
26 | /** | |
27 | * Default constructor. | |
28 | */ | |
29 | 0 | public WebServiceRtConfig() { |
30 | 0 | services = new HashMap<QName, WebServiceRtService>(); |
31 | } | |
32 | ||
33 | /** | |
34 | * Adds a runtime service description to the current configuration. | |
35 | * @param qname The service qualified name | |
36 | * @param service The runtime service description | |
37 | */ | |
38 | 0 | public void addService(QName qname, WebServiceRtService service) { |
39 | 0 | services.put(qname, service); |
40 | } | |
41 | ||
42 | /** | |
43 | * Get the <code>HashMap</code> storing all the configured services. | |
44 | * @return HashMap<QName, WebServiceRtService> | |
45 | */ | |
46 | 0 | public HashMap<QName, WebServiceRtService> getServices() { |
47 | 0 | return services; |
48 | } | |
49 | ||
50 | /** | |
51 | * Set a brand new set of services represented by the required <code>HashMap</code>. | |
52 | * @param services The set of services | |
53 | */ | |
54 | 0 | public void setServices(HashMap<QName, WebServiceRtService> services) { |
55 | 0 | this.services = services; |
56 | } | |
57 | ||
58 | /** | |
59 | * Get a particular service (if it exists) providing its namespace and its name. | |
60 | * @param nameSpace The service namespace | |
61 | * @param name The service name | |
62 | * @return WebServiceRtService The actual runtime service description (if configured) | |
63 | */ | |
64 | 0 | public WebServiceRtService getService(String nameSpace, String name) { |
65 | 0 | return services.get(new QName(nameSpace, name)); |
66 | } | |
67 | ||
68 | /** | |
69 | * Get a particular service (if it exists) providing its qualified name. | |
70 | * @param qname service qualified name | |
71 | * @return WebServiceRtService The actual runtime service description (if configured) | |
72 | */ | |
73 | 0 | public WebServiceRtService getService(QName qname) { |
74 | 0 | return services.get(qname); |
75 | } | |
76 | ||
77 | private HashMap<QName, WebServiceRtService> services; | |
78 | } |
|