com.sun.xml.ws.api.databinding.DatabindingConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rt Show documentation
Show all versions of rt Show documentation
JAX-WS Reference Implementation Runtime
The newest version!
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.xml.ws.api.databinding;
import java.net.URL;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.Map;
import javax.xml.transform.Source;
import jakarta.xml.ws.WebServiceFeature;
import org.xml.sax.EntityResolver;
import com.sun.xml.ws.api.WSBinding;
import com.sun.xml.ws.api.model.wsdl.WSDLPort;
import com.sun.xml.ws.binding.WebServiceFeatureList;
/**
* DatabindingConfig contains the initial states for Databinding. After a
* Databinding instance is created, all it's internal states should be
* considered 'immutable' and therefore the operations on Databinding are
* thread-safe.
*
* @author [email protected]
*/
public class DatabindingConfig {
protected Class contractClass;
protected Class endpointClass;
protected Set additionalValueTypes = new HashSet<>();
protected MappingInfo mappingInfo = new MappingInfo();
protected URL wsdlURL;
protected ClassLoader classLoader;
protected Iterable features;
protected WSBinding wsBinding;
protected WSDLPort wsdlPort;
protected MetadataReader metadataReader;
protected Map properties = new HashMap<>();
protected Source wsdlSource;
protected EntityResolver entityResolver;
/**
* Default constructor.
*/
public DatabindingConfig() {}
public Class getContractClass() {
return contractClass;
}
public void setContractClass(Class contractClass) {
this.contractClass = contractClass;
}
public Class getEndpointClass() {
return endpointClass;
}
public void setEndpointClass(Class implBeanClass) {
this.endpointClass = implBeanClass;
}
public MappingInfo getMappingInfo() {
return mappingInfo;
}
public void setMappingInfo(MappingInfo mappingInfo) {
this.mappingInfo = mappingInfo;
}
public URL getWsdlURL() {
return wsdlURL;
}
public void setWsdlURL(URL wsdlURL) {
this.wsdlURL = wsdlURL;
}
public ClassLoader getClassLoader() {
return classLoader;
}
public void setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
public Iterable getFeatures() {
if (features == null && wsBinding != null) {
return wsBinding.getFeatures();
}
return features;
}
public void setFeatures(WebServiceFeature[] features) {
setFeatures(new WebServiceFeatureList(features));
}
public void setFeatures(Iterable features) {
this.features = WebServiceFeatureList.toList(features);
}
public WSDLPort getWsdlPort() {
return wsdlPort;
}
public void setWsdlPort(WSDLPort wsdlPort) {
this.wsdlPort = wsdlPort;
}
public Set additionalValueTypes() {
return additionalValueTypes;
}
public Map properties() {
return properties;
}
public WSBinding getWSBinding() {
return wsBinding;
}
public void setWSBinding(WSBinding wsBinding) {
this.wsBinding = wsBinding;
}
public MetadataReader getMetadataReader() {
return metadataReader;
}
public void setMetadataReader(MetadataReader reader) {
this.metadataReader = reader;
}
public Source getWsdlSource() {
return wsdlSource;
}
public void setWsdlSource(Source wsdlSource) {
this.wsdlSource = wsdlSource;
}
public EntityResolver getEntityResolver() {
return entityResolver;
}
public void setEntityResolver(EntityResolver entityResolver) {
this.entityResolver = entityResolver;
}
}