Package com.sun.xml.ws.binding
Class WebServiceFeatureList
java.lang.Object
java.util.AbstractMap<Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
com.sun.xml.ws.binding.WebServiceFeatureList
- All Implemented Interfaces:
WSFeatureList,Iterable<javax.xml.ws.WebServiceFeature>,Map<Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
public final class WebServiceFeatureList
extends AbstractMap<Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
implements WSFeatureList
Represents a list of
WebServiceFeatures that has bunch of utility
methods pertaining to web service features.- Author:
- Rama Pulavarthi
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionWebServiceFeatureList(WebServiceFeatureList features) WebServiceFeatureList(Class<?> endpointClass) Creates a list by reading featuers from the annotation on a class.WebServiceFeatureList(javax.xml.ws.WebServiceFeature... features) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(javax.xml.ws.WebServiceFeature f) Adds a feature to the list if it's not already added.voidAdds features to the list if it's not already added.booleanentrySet()boolean<F extends javax.xml.ws.WebServiceFeature>
FGets aWebServiceFeatureof the specific type.static javax.xml.ws.WebServiceFeatureReturns a corresponding feature for a feature annotation(i.e which hasWebServiceFeatureAnnotationmeta annotation)static <F extends javax.xml.ws.WebServiceFeature>
FgetFeature(javax.xml.ws.WebServiceFeature[] features, Class<F> featureType) static SOAPVersiongetSoapVersion(WSFeatureList features) booleanChecks if a particularWebServiceFeatureis enabled.static booleanisFeatureEnabled(Class<? extends javax.xml.ws.WebServiceFeature> type, javax.xml.ws.WebServiceFeature[] features) Iterator<javax.xml.ws.WebServiceFeature>iterator()voidmergeFeatures(WSDLPort wsdlPort, boolean honorWsdlRequired, boolean reportConflicts) Extracts features fromWSDLFeaturedObject.getFeatures().voidmergeFeatures(Iterable<javax.xml.ws.WebServiceFeature> features, boolean reportConflicts) Merges the extra features that are not already set on binding.voidmergeFeatures(javax.xml.ws.WebServiceFeature[] features, boolean reportConflicts) Merges the extra features that are not already set on binding.voidparseAnnotations(Class<?> endpointClass) voidparseAnnotations(Iterable<Annotation> annIt) Adds the corresponding features to the list for feature annotations(i.e which haveWebServiceFeatureAnnotationmeta annotation)javax.xml.ws.WebServiceFeaturevoidSet the parent features.javax.xml.ws.WebServiceFeature[]toArray()Obtains all the features in the array.static javax.xml.ws.WebServiceFeature[]toFeatureArray(WSBinding binding) static WebServiceFeatureListtoString()voidvalidate()Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, get, hashCode, isEmpty, keySet, putAll, remove, size, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
WebServiceFeatureList
public WebServiceFeatureList() -
WebServiceFeatureList
public WebServiceFeatureList(@NotNull javax.xml.ws.WebServiceFeature... features) -
WebServiceFeatureList
-
WebServiceFeatureList
Creates a list by reading featuers from the annotation on a class.
-
-
Method Details
-
toList
-
validate
public void validate() -
parseAnnotations
Adds the corresponding features to the list for feature annotations(i.e which haveWebServiceFeatureAnnotationmeta annotation)- Parameters:
annIt- collection of annotations(that can have non-feature annotations)
-
getFeature
Returns a corresponding feature for a feature annotation(i.e which hasWebServiceFeatureAnnotationmeta annotation)- Returns:
- corresponding feature for the annotation null, if the annotation is nota feature annotation
-
parseAnnotations
- Parameters:
endpointClass- web service impl class
-
iterator
-
toArray
@NotNull public javax.xml.ws.WebServiceFeature[] toArray()Description copied from interface:WSFeatureListObtains all the features in the array.- Specified by:
toArrayin interfaceWSFeatureList
-
isEnabled
Description copied from interface:WSFeatureListChecks if a particularWebServiceFeatureis enabled.- Specified by:
isEnabledin interfaceWSFeatureList- Returns:
- true if enabled.
-
contains
-
get
Description copied from interface:WSFeatureListGets aWebServiceFeatureof the specific type.- Specified by:
getin interfaceWSFeatureList- Parameters:
featureType- The type of the feature to retrieve.- Returns:
- If the feature is present and enabled, return a non-null instance. Otherwise null.
-
add
public void add(@NotNull javax.xml.ws.WebServiceFeature f) Adds a feature to the list if it's not already added. -
addAll
Adds features to the list if it's not already added. -
equals
-
toString
- Overrides:
toStringin classAbstractMap<Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
-
mergeFeatures
public void mergeFeatures(@NotNull Iterable<javax.xml.ws.WebServiceFeature> features, boolean reportConflicts) Merges the extra features that are not already set on binding. i.e, if a feature is set already on binding through some other API the corresponding wsdlFeature is not set.- Specified by:
mergeFeaturesin interfaceWSFeatureList- Parameters:
features- Web Service features that need to be merged with already configured features.reportConflicts- If true, checks if the feature setting in WSDL (wsdl extension or policy configuration) conflicts with feature setting in Deployed Service and logs warning if there are any conflicts.
-
mergeFeatures
public void mergeFeatures(javax.xml.ws.WebServiceFeature[] features, boolean reportConflicts) Description copied from interface:WSFeatureListMerges the extra features that are not already set on binding. i.e, if a feature is set already on binding through some other API the corresponding wsdlFeature is not set.- Specified by:
mergeFeaturesin interfaceWSFeatureList- Parameters:
features- Web Service features that need to be merged with already configured features.reportConflicts- If true, checks if the feature setting in WSDL (wsdl extension or policy configuration) conflicts with feature setting in Deployed Service and logs warning if there are any conflicts.
-
mergeFeatures
public void mergeFeatures(@NotNull WSDLPort wsdlPort, boolean honorWsdlRequired, boolean reportConflicts) Extracts features fromWSDLFeaturedObject.getFeatures(). Extra features that are not already set on binding. i.e, if a feature is set already on binding through some other API the corresponding wsdlFeature is not set.- Parameters:
wsdlPort- WSDLPort modelhonorWsdlRequired- If this is true add WSDL Feature only if wsd:Required=true In SEI case, it should be false In Provider case, it should be truereportConflicts- If true, checks if the feature setting in WSDL (wsdl extension or policy configuration) conflicts with feature setting in Deployed Service and logs warning if there are any conflicts.
-
setParentFeaturedObject
Set the parent features. Basically the parent feature list will be overriden by this feature list. -
getFeature
@Nullable public static <F extends javax.xml.ws.WebServiceFeature> F getFeature(@NotNull javax.xml.ws.WebServiceFeature[] features, @NotNull Class<F> featureType) -
entrySet
-
put
public javax.xml.ws.WebServiceFeature put(Class<? extends javax.xml.ws.WebServiceFeature> key, javax.xml.ws.WebServiceFeature value) -
getSoapVersion
-
isFeatureEnabled
public static boolean isFeatureEnabled(Class<? extends javax.xml.ws.WebServiceFeature> type, javax.xml.ws.WebServiceFeature[] features) -
toFeatureArray
-