001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee.oejb2;
017:
018: import javax.xml.bind.annotation.XmlElement;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlAccessType;
021: import javax.xml.bind.annotation.XmlType;
022: import java.util.List;
023: import java.util.ArrayList;
024:
025: /**
026: * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 $
027: */
028: @XmlAccessorType(XmlAccessType.FIELD)
029: @XmlType(name="web-service-bindingType",namespace="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0",propOrder={"ejbName","webServiceAddress","webServiceVirtualHost","webServiceSecurity"})
030: //@XmlRootElement(name = "web-service-binding", namespace = "http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0")
031: public class WebServiceBindingType {
032:
033: @XmlElement(name="ejb-name")
034: protected String ejbName;
035:
036: @XmlElement(name="web-service-address")
037: protected String webServiceAddress;
038:
039: @XmlElement(name="web-service-virtual-host")
040: protected List<String> webServiceVirtualHost;
041:
042: @XmlElement(name="web-service-security")
043: protected WebServiceSecurityType webServiceSecurity;
044:
045: public String getEjbName() {
046: return ejbName;
047: }
048:
049: public void setEjbName(String ejbName) {
050: this .ejbName = ejbName;
051: }
052:
053: public String getWebServiceAddress() {
054: return webServiceAddress;
055: }
056:
057: public void setWebServiceAddress(String webServiceAddress) {
058: this .webServiceAddress = webServiceAddress;
059: }
060:
061: public List<String> getWebServiceVirtualHost() {
062: if (webServiceVirtualHost == null) {
063: webServiceVirtualHost = new ArrayList<String>();
064: }
065: return webServiceVirtualHost;
066: }
067:
068: public void setWebServiceVirtualHost(
069: List<String> webServiceVirtualHost) {
070: this .webServiceVirtualHost = webServiceVirtualHost;
071: }
072:
073: public WebServiceSecurityType getWebServiceSecurity() {
074: return webServiceSecurity;
075: }
076:
077: public void setWebServiceSecurity(
078: WebServiceSecurityType webServiceSecurity) {
079: this .webServiceSecurity = webServiceSecurity;
080: }
081:
082: public void setWebServiceSecurity(
083: org.apache.openejb.jee.oejb2.WebServiceSecurityType webServiceSecurity) {
084: if (webServiceSecurity == null)
085: return;
086: this .webServiceSecurity = new WebServiceSecurityType(
087: webServiceSecurity);
088: }
089:
090: public boolean containsData() {
091: return webServiceAddress != null
092: || getWebServiceVirtualHost().size() > 0
093: || webServiceSecurity != null;
094: }
095:
096: @XmlAccessorType(XmlAccessType.FIELD)
097: @XmlType(name="web-service-securityType",namespace="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0",propOrder={"securityRealmName","realmName","transportGuarantee","authMethod"})
098: public static class WebServiceSecurityType {
099:
100: @XmlElement(name="security-realm-name",required=true)
101: protected String securityRealmName;
102: @XmlElement(name="realm-name")
103: protected String realmName;
104: @XmlElement(name="transport-guarantee",required=true)
105: protected TransportGuaranteeType transportGuarantee;
106: @XmlElement(name="auth-method",required=true)
107: protected AuthMethodType authMethod;
108:
109: public WebServiceSecurityType() {
110: }
111:
112: public WebServiceSecurityType(
113: org.apache.openejb.jee.oejb2.WebServiceSecurityType s) {
114: this .securityRealmName = s.getSecurityRealmName();
115: this .realmName = s.getRealmName();
116: this .transportGuarantee = s.getTransportGuarantee();
117: this .authMethod = s.getAuthMethod();
118: }
119:
120: public String getSecurityRealmName() {
121: return securityRealmName;
122: }
123:
124: public void setSecurityRealmName(String value) {
125: this .securityRealmName = value;
126: }
127:
128: public String getRealmName() {
129: return realmName;
130: }
131:
132: public void setRealmName(String value) {
133: this .realmName = value;
134: }
135:
136: public TransportGuaranteeType getTransportGuarantee() {
137: return transportGuarantee;
138: }
139:
140: public void setTransportGuarantee(TransportGuaranteeType value) {
141: this .transportGuarantee = value;
142: }
143:
144: public AuthMethodType getAuthMethod() {
145: return authMethod;
146: }
147:
148: public void setAuthMethod(AuthMethodType value) {
149: this.authMethod = value;
150: }
151: }
152: }
|