1
2
3
4
5
6
7
8 package it.imolinfo.jbi4ejb.webservice.generator;
9
10 import it.imolinfo.jbi4ejb.Logger;
11 import it.imolinfo.jbi4ejb.LoggerFactory;
12 import it.imolinfo.jbi4ejb.exception.ClassGenerationException;
13 import it.imolinfo.jbi4ejb.jbi.Messages;
14
15 import java.util.Properties;
16
17
18
19
20
21
22
23 public class WSDLDescriptor {
24
25
26 static final Logger LOG = LoggerFactory.getLogger(WSDLDescriptor.class);
27 private static final Messages MESSAGES
28 = Messages.getMessages(WSDLDescriptor.class);
29
30
31 public final static String CORBANAME_LOCALIZATION_TYPE = "corbaname";
32
33
34 public final static String JNDI_LOCALIZATION_TYPE = "jndi";
35
36
37 private final String name;
38
39
40 private final String localizationType;
41
42
43 private Properties orbProperties;
44
45
46 private Properties jndiProperties;
47
48
49
50
51
52
53
54
55
56 public WSDLDescriptor(String name, String localizationType) {
57 if (name == null) {
58 String msg=MESSAGES.getString("EJB001016_Ejb_Service_Name_null");
59 LOG.error(msg);
60 throw new NullPointerException(msg);
61 }
62 if (localizationType == null) {
63 String msg=MESSAGES.getString("EJB001017_Localization_type_name_null");
64 LOG.error(msg);
65 throw new NullPointerException(msg);
66 }
67
68 this.name = name;
69 this.localizationType = localizationType;
70 }
71
72
73
74
75
76
77 public String getCorbaServiceName() {
78 return name;
79 }
80
81
82
83
84
85
86 public Properties getOrbProperties() {
87 if (orbProperties == null) {
88 orbProperties = new Properties();
89 }
90 return orbProperties;
91 }
92
93
94
95
96
97
98
99 public void setOrbProperties(Properties orbProperties) {
100 this.orbProperties = orbProperties;
101 }
102
103
104
105
106
107
108 public Properties getJndiProperties() {
109 return jndiProperties;
110 }
111
112
113
114
115
116
117
118 public void setJndiProperties(Properties jndiProperties) {
119 this.jndiProperties = jndiProperties;
120 }
121
122
123
124
125
126
127 public String getName() {
128 return name;
129 }
130
131
132
133
134
135
136 public String getLocalizationType() {
137 return localizationType;
138 }
139
140
141
142
143
144
145 public boolean isCorbaName() {
146 if (CORBANAME_LOCALIZATION_TYPE.equalsIgnoreCase(this.getLocalizationType())) {
147 return true;
148 }
149 return false;
150 }
151
152 }