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