org.apache.openejb.jee.ServiceRef Maven / Gradle / Ivy
The newest version!
/**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.jee;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.List;
/**
* The service-ref element declares a reference to a Web
* service. It contains optional description, display name and
* icons, a declaration of the required Service interface,
* an optional WSDL document location, an optional set
* of JAX-RPC mappings, an optional QName for the service element,
* an optional set of Service Endpoint Interfaces to be resolved
* by the container to a WSDL port, and an optional set of handlers.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "service-refType", propOrder = {
"description",
"displayName",
"icon",
"serviceRefName",
"serviceInterface",
"serviceRefType",
"wsdlFile",
"jaxrpcMappingFile",
"serviceQname",
"portComponentRef",
"handler",
"handlerChains",
"mappedName",
"injectionTarget"
})
public class ServiceRef implements JndiReference {
@XmlElement(required = true)
protected List description;
@XmlElement(name = "display-name", required = true)
protected List displayName;
@XmlElement(required = true)
protected List icon;
@XmlElement(name = "service-ref-name", required = true)
protected String serviceRefName;
@XmlElement(name = "service-interface", required = true)
protected String serviceInterface;
@XmlElement(name = "service-ref-type")
protected String serviceRefType;
@XmlElement(name = "wsdl-file")
protected String wsdlFile;
@XmlElement(name = "jaxrpc-mapping-file")
protected String jaxrpcMappingFile;
@XmlElement(name = "service-qname")
protected QName serviceQname;
@XmlElement(name = "port-component-ref", required = true)
protected List portComponentRef;
@XmlElement(required = true)
protected List handler;
@XmlElement(name = "handler-chains")
protected HandlerChains handlerChains;
@XmlElement(name = "mapped-name")
protected String mappedName;
@XmlElement(name = "injection-target", required = true)
protected List injectionTarget;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
protected String id;
public String getName() {
return getServiceRefName();
}
public String getKey() {
return getName();
}
public String getType() {
return getServiceRefType();
}
public void setName(String name) {
setServiceRefName(name);
}
public void setType(String type) {
}
public List getDescription() {
if (description == null) {
description = new ArrayList();
}
return this.description;
}
public List getDisplayName() {
if (displayName == null) {
displayName = new ArrayList();
}
return this.displayName;
}
public List getIcon() {
if (icon == null) {
icon = new ArrayList();
}
return this.icon;
}
public String getServiceRefName() {
return serviceRefName;
}
public void setServiceRefName(String value) {
this.serviceRefName = value;
}
public String getServiceInterface() {
return serviceInterface;
}
public void setServiceInterface(String value) {
this.serviceInterface = value;
}
public String getServiceRefType() {
return serviceRefType;
}
public void setServiceRefType(String value) {
this.serviceRefType = value;
}
public String getWsdlFile() {
return wsdlFile;
}
public void setWsdlFile(String value) {
this.wsdlFile = value;
}
public String getJaxrpcMappingFile() {
return jaxrpcMappingFile;
}
public void setJaxrpcMappingFile(String value) {
this.jaxrpcMappingFile = value;
}
/**
* Gets the value of the serviceQname property.
*/
public QName getServiceQname() {
return serviceQname;
}
/**
* Sets the value of the serviceQname property.
*/
public void setServiceQname(QName value) {
this.serviceQname = value;
}
public List getPortComponentRef() {
if (portComponentRef == null) {
portComponentRef = new ArrayList();
}
return this.portComponentRef;
}
public HandlerChains getHandlerChains() {
return handlerChains;
}
public void setHandlerChains(HandlerChains value) {
this.handlerChains = value;
}
public List getHandler() {
if (handler == null) {
handler = new ArrayList();
}
return this.handler;
}
public HandlerChains getAllHandlers() {
// convert the handlers to handler chain
if (handlerChains == null && handler != null) {
HandlerChains handlerChains = new HandlerChains();
HandlerChain handlerChain = new HandlerChain();
handlerChain.getHandler().addAll(handler);
handlerChains.getHandlerChain().add(handlerChain);
return handlerChains;
} else {
return handlerChains;
}
}
public String getMappedName() {
return mappedName;
}
public void setMappedName(String value) {
this.mappedName = value;
}
public List getInjectionTarget() {
if (injectionTarget == null) {
injectionTarget = new ArrayList();
}
return this.injectionTarget;
}
public String getId() {
return id;
}
public void setId(String value) {
this.id = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy