View Javadoc

1    /****************************************************************************
2    * Copyright (c) 2005, 2006, 2007, 2008, 2009 Imola Informatica.
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the LGPL License v2.1
5    * which accompanies this distribution, and is available at
6    * http://www.gnu.org/licenses/lgpl.html
7    ****************************************************************************/
8   /*
9    * ServiceDescriptor.java
10   *
11   */
12  
13  package it.imolinfo.jbi4corba.jbi.component.runtime;
14  
15  import javax.jbi.messaging.MessageExchange.Role;
16  import javax.xml.namespace.QName;
17  
18  /**
19   * This class is a data model of the service that will be used to query the
20   * information about the service used in message exchange by service
21   * consumer or provider.
22   *
23   * @author <a href="mailto:mpiraccini@imolinfo.it">Marco Piraccini</a>
24   */
25  public class ServiceDescriptor {
26      
27      /**
28       * Creates a new instance of ServiceDescriptor
29       */
30      public ServiceDescriptor() {
31      }
32      
33      /**
34       * Holds value of property EndpointName.
35       */
36      private String mEndpointName;
37      
38      /**
39       * Getter for property EndpointName.
40       *
41       * @return Value of property EndpointName.
42       */
43      public String getEndpointName() {
44          return this.mEndpointName;
45      }
46      
47      /**
48       * Setter for property EndpointName.
49       *
50       * @param endpointName New value of property EndpointName.
51       */
52      public void setEndpointName(String endpointName) {
53          this.mEndpointName = endpointName;
54      }
55      
56      /**
57       * Holds value of property ServiceName.
58       */
59      private QName mServiceName;
60      
61      /**
62       * Getter for property ServiceName.
63       *
64       * @return Value of property ServiceName.
65       */
66      public QName getServiceName() {
67          return this.mServiceName;
68      }
69      
70      /**
71       * Setter for property ServiceName.
72       *
73       * @param serviceName New value of property mServiceName.
74       */
75      public void setServiceName(QName serviceName) {
76          this.mServiceName = serviceName;
77      }
78      
79      /**
80       * Holds value of property Role.
81       */
82      private Role mRole;
83      
84      /**
85       * Getter for property Role.
86       *
87       * @return Value of property Role.
88       */
89      public Role getRole() {
90          return this.mRole;
91      }
92      
93      /**
94       * Setter for property Role.
95       *
96       * @param role New value of property Role.
97       */
98      public void setRole(Role role) {
99          this.mRole = role;
100     }
101     
102     /**
103      * Holds value of property ServiceTypes.
104      */
105     private QName[] mServiceTypes;
106     
107     /**
108      * Indexed getter for property ServiceTypes.
109      *
110      * @param index Index of the property.
111      * @return Value of the property at <CODE>index</CODE>.
112      */
113     public QName getServiceTypes(int index) {
114         return this.mServiceTypes[index];
115     }
116     
117     /**
118      * Getter for property ServiceTypes.
119      *
120      * @return Value of property ServiceTypes.
121      */
122     public QName[] getServiceTypes() {
123         return this.mServiceTypes;
124     }
125     
126     /**
127      * Indexed setter for property mServiceTypes.
128      *
129      * @param index Index of the property.
130      * @param serviceTypes New value of the property at <CODE>index</CODE>.
131      */
132     public void setServiceTypes(int index, QName serviceTypes) {
133         this.mServiceTypes[index] = serviceTypes;
134     }
135     
136     /**
137      * Setter for property mServiceTypes.
138      *
139      * @param serviceTypes New value of property ServiceTypes.
140      */
141     public void setServiceTypes(QName[] serviceTypes) {
142         this.mServiceTypes = serviceTypes;
143     }
144     /**
145      * returns a first servicetype in the servicetype array
146      * @return service type Qname or null if no servicetypes are initialized
147      */
148     public QName getServiceType() {
149         QName[] types = this.getServiceTypes();
150         QName serviceType = null;
151         if ( types != null && types.length > 0 ) {
152             serviceType = types[0];
153         }
154         return serviceType;
155     }
156     /**
157      * Holds value of property Operations.
158      */
159     private OperationDescriptor[] mOperations;
160     
161     /**
162      * Indexed getter for property Operations.
163      *
164      * @param index Index of the property.
165      * @return Value of the property at <CODE>index</CODE>.
166      */
167     public OperationDescriptor getOperations(int index) {
168         return this.mOperations[index];
169     }
170     
171     /**
172      * Getter for property mOperations.
173      *
174      * @return Value of property mOperations.
175      */
176     public OperationDescriptor[] getOperations() {
177         return this.mOperations;
178     }
179     
180     /**
181      * Indexed setter for property mOperations.
182      *
183      * @param index Index of the property.
184      * @param operations New value of the property at <CODE>index</CODE>.
185      */
186     public void setOperations(int index, OperationDescriptor operations) {
187         this.mOperations[index] = operations;
188     }
189     
190     /**
191      * Setter for property mOperations.
192      *
193      * @param operations New value of property mOperations.
194      */
195     public void setOperations(OperationDescriptor[] operations) {
196         this.mOperations = operations;
197     }
198     
199     
200     public static final class OperationDescriptor {
201         
202         /** In Only MEP. */
203         public static final String IN_ONLY_MEP =  "http://www.w3.org/2004/08/wsdl/in-only";
204         /** Robust In Only MEP.   */
205         public static final String ROBUST_IN_ONLY_MEP =  "http://www.w3.org/2004/08/wsdl/robust-in-only";
206         
207         /** In Out MEP. */
208         public static final String IN_OUT_MEP = "http://www.w3.org/2004/08/wsdl/in-out";
209         /** In Optional Out MEP.   */
210         public static final String IN_OPTIONAL_OUT_MEP = "http://www.w3.org/2004/08/wsdl/in-opt-out";
211         
212         /**
213          * Holds value of property mServiceType.
214          */
215         private QName mServiceType;
216         
217         /**
218          * Getter for property mName.
219          *
220          * @return Value of property mName.
221          */
222         public QName getServiceType() {
223             return this.mServiceType;
224         }
225         
226         /**
227          * Setter for property ServiceType.
228          *
229          * @param serviceType New value of property ServiceType.
230          */
231         public void setServiceType(QName serviceType) {
232             this.mServiceType = serviceType;
233         }
234         
235         /**
236          * Holds value of property mName.
237          */
238         private String mName;
239         
240         /**
241          * Getter for property mName.
242          *
243          * @return Value of property mName.
244          */
245         public String getName() {
246             return this.mName;
247         }
248         
249         /**
250          * Setter for property mName.
251          *
252          * @param mName New value of property mName.
253          */
254         public void setName(String name) {
255             this.mName = name;
256         }
257         
258         /**
259          * Holds value of property mInput.
260          */
261         private String mInput;
262         
263         /**
264          * Getter for property mInput.
265          *
266          * @return Value of property mInput.
267          */
268         public String getInput() {
269             return this.mInput;
270         }
271         
272         /**
273          * Setter for property mInput.
274          *
275          * @param mInput New value of property mInput.
276          */
277         public void setInput(String input) {
278             this.mInput = input;
279         }
280         
281         /**
282          * Holds value of property mOutput.
283          */
284         private String mOutput;
285         
286         /**
287          * Getter for property mOutput.
288          *
289          * @return Value of property mOutput.
290          */
291         public String getOutput() {
292             return this.mOutput;
293         }
294         
295         /**
296          * Setter for property mOutput.
297          *
298          * @param mOutput New value of property mOutput.
299          */
300         public void setOutput(String output) {
301             this.mOutput = output;
302         }
303         
304         /**
305          * Holds value of property mMEP.
306          */
307         private String mMEP;
308         
309         /**
310          * Getter for property mMEP.
311          *
312          * @return Value of property mMEP.
313          */
314         public String getMEP() {
315             return this.mMEP;
316         }
317         
318         /**
319          * Setter for property mMEP.
320          *
321          * @param mMEP New value of property mMEP.
322          */
323         public void setMEP(String MEP) {
324             this.mMEP = MEP;
325         }
326         
327     }
328     
329 }