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;
017:
018: import javax.xml.bind.annotation.XmlAccessType;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlAttribute;
021: import javax.xml.bind.annotation.XmlElement;
022: import javax.xml.bind.annotation.XmlID;
023: import javax.xml.bind.annotation.XmlType;
024: import javax.xml.bind.annotation.XmlTransient;
025: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
026: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
027: import javax.xml.namespace.QName;
028: import java.util.List;
029:
030: /**
031: * The port-component element associates a WSDL port with a web service
032: * interface and implementation. It defines the name of the port as a
033: * component, optional description, optional display name, optional iconic
034: * representations, WSDL port QName, Service Endpoint Interface, Service
035: * Implementation Bean.
036: * <p/>
037: * This element also associates a WSDL service with a JAX-WS Provider
038: * implementation.
039: */
040: @XmlAccessorType(XmlAccessType.FIELD)
041: @XmlType(name="port-componentType",propOrder={"description","displayName","icon","portComponentName","wsdlService","wsdlPort","enableMtom","protocolBinding","serviceEndpointInterface","serviceImplBean","handler","handlerChains"})
042: public class PortComponent implements Keyable<String> {
043: protected String description;
044: @XmlElement(name="display-name")
045: protected String displayName;
046: protected Icon icon;
047: @XmlElement(name="port-component-name",required=true)
048: protected String portComponentName;
049: @XmlElement(name="wsdl-service")
050: protected QName wsdlService;
051: @XmlElement(name="wsdl-port")
052: protected QName wsdlPort;
053: @XmlElement(name="enable-mtom")
054: protected boolean enableMtom;
055: @XmlElement(name="protocol-binding")
056: protected String protocolBinding;
057: @XmlElement(name="service-endpoint-interface")
058: protected String serviceEndpointInterface;
059: @XmlElement(name="service-impl-bean",required=true)
060: protected ServiceImplBean serviceImplBean;
061: protected List<Handler> handler;
062: @XmlElement(name="handler-chains")
063: protected HandlerChains handlerChains;
064: @XmlTransient
065: protected String location;
066: @XmlAttribute
067: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
068: @XmlID
069: protected String id;
070:
071: public String getKey() {
072: return portComponentName;
073: }
074:
075: public String getDescription() {
076: return description;
077: }
078:
079: public void setDescription(String value) {
080: this .description = value;
081: }
082:
083: public String getDisplayName() {
084: return displayName;
085: }
086:
087: public void setDisplayName(String value) {
088: this .displayName = value;
089: }
090:
091: public Icon getIcon() {
092: return icon;
093: }
094:
095: public void setIcon(Icon value) {
096: this .icon = value;
097: }
098:
099: public String getPortComponentName() {
100: return portComponentName;
101: }
102:
103: public void setPortComponentName(String value) {
104: this .portComponentName = value;
105: }
106:
107: public QName getWsdlService() {
108: return wsdlService;
109: }
110:
111: public void setWsdlService(QName value) {
112: this .wsdlService = value;
113: }
114:
115: public QName getWsdlPort() {
116: return wsdlPort;
117: }
118:
119: public void setWsdlPort(QName value) {
120: this .wsdlPort = value;
121: }
122:
123: public boolean isEnableMtom() {
124: return enableMtom;
125: }
126:
127: public void setEnableMtom(boolean value) {
128: this .enableMtom = value;
129: }
130:
131: public String getProtocolBinding() {
132: return protocolBinding;
133: }
134:
135: public void setProtocolBinding(String value) {
136: this .protocolBinding = value;
137: }
138:
139: public String getServiceEndpointInterface() {
140: return serviceEndpointInterface;
141: }
142:
143: public void setServiceEndpointInterface(String value) {
144: this .serviceEndpointInterface = value;
145: }
146:
147: public ServiceImplBean getServiceImplBean() {
148: return serviceImplBean;
149: }
150:
151: public void setServiceImplBean(ServiceImplBean value) {
152: this .serviceImplBean = value;
153: }
154:
155: public HandlerChains getHandlerChains() {
156: // convert the handlers to handler chain
157: if (handlerChains == null && handler != null) {
158: handlerChains = new HandlerChains();
159: HandlerChain handlerChain = new HandlerChain();
160: handlerChain.getHandler().addAll(handler);
161: handler = null;
162: handlerChains.getHandlerChain().add(handlerChain);
163: }
164: return handlerChains;
165: }
166:
167: public void setHandlerChains(HandlerChains value) {
168: this .handlerChains = value;
169: }
170:
171: public String getLocation() {
172: return location;
173: }
174:
175: public void setLocation(String location) {
176: this .location = location;
177: }
178:
179: public String getId() {
180: return id;
181: }
182:
183: public void setId(String value) {
184: this.id = value;
185: }
186: }
|