01: package org.objectweb.celtix.bus.ws.rm;
02:
03: import org.objectweb.celtix.bus.ws.addressing.AddressingConstantsImpl;
04: import org.objectweb.celtix.bus.ws.addressing.VersionTransformer;
05: import org.objectweb.celtix.bus.ws.policy.PolicyConstantsImpl;
06: import org.objectweb.celtix.bus.ws.rm.persistence.PersistenceUtils;
07: import org.objectweb.celtix.ws.addressing.AddressingConstants;
08: import org.objectweb.celtix.ws.addressing.v200408.AttributedURI;
09: import org.objectweb.celtix.ws.addressing.v200408.EndpointReferenceType;
10:
11: import org.objectweb.celtix.ws.policy.PolicyConstants;
12: import org.objectweb.celtix.ws.rm.RMConstants;
13:
14: public final class RMUtils {
15:
16: private static final org.objectweb.celtix.ws.addressing.v200408.ObjectFactory WSA_FACTORY;
17: private static final org.objectweb.celtix.ws.rm.ObjectFactory WSRM_FACTORY;
18: private static final org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory WSRM_CONF_FACTORY;
19: private static final org.objectweb.celtix.ws.rm.policy.ObjectFactory WSRM_POLICY_FACTORY;
20: private static final RMConstants WSRM_CONSTANTS;
21: private static final AddressingConstants WSA_CONSTANTS;
22: private static final PolicyConstants WSP_CONSTANTS;
23: private static final PersistenceUtils WSRM_PERSISTENCE_UTILS;
24:
25: static {
26: WSA_FACTORY = new org.objectweb.celtix.ws.addressing.v200408.ObjectFactory();
27: WSRM_FACTORY = new org.objectweb.celtix.ws.rm.ObjectFactory();
28: WSRM_CONF_FACTORY = new org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory();
29: WSRM_POLICY_FACTORY = new org.objectweb.celtix.ws.rm.policy.ObjectFactory();
30: WSRM_CONSTANTS = new RMConstantsImpl();
31: WSA_CONSTANTS = new AddressingConstantsImpl();
32: WSP_CONSTANTS = new PolicyConstantsImpl();
33: WSRM_PERSISTENCE_UTILS = new PersistenceUtils();
34: }
35:
36: /**
37: * prevent instantiation
38: *
39: */
40: protected RMUtils() {
41: }
42:
43: public static org.objectweb.celtix.ws.addressing.v200408.ObjectFactory getWSAFactory() {
44: return WSA_FACTORY;
45: }
46:
47: public static org.objectweb.celtix.ws.rm.ObjectFactory getWSRMFactory() {
48: return WSRM_FACTORY;
49: }
50:
51: public static org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory getWSRMConfFactory() {
52: return WSRM_CONF_FACTORY;
53: }
54:
55: public static org.objectweb.celtix.ws.rm.policy.ObjectFactory getWSRMPolicyFactory() {
56: return WSRM_POLICY_FACTORY;
57: }
58:
59: public static RMConstants getRMConstants() {
60: return WSRM_CONSTANTS;
61: }
62:
63: public static AddressingConstants getAddressingConstants() {
64: return WSA_CONSTANTS;
65: }
66:
67: public static PolicyConstants getPolicyConstants() {
68: return WSP_CONSTANTS;
69: }
70:
71: public static PersistenceUtils getPersistenceUtils() {
72: return WSRM_PERSISTENCE_UTILS;
73: }
74:
75: public static EndpointReferenceType createReference(String address) {
76: EndpointReferenceType ref = VersionTransformer.Names200408.WSA_OBJECT_FACTORY
77: .createEndpointReferenceType();
78: AttributedURI value = VersionTransformer.Names200408.WSA_OBJECT_FACTORY
79: .createAttributedURI();
80: value.setValue(address);
81: ref.setAddress(value);
82: return ref;
83: }
84: }
|