com.sun.xml.ws.binding
Class WebServiceFeatureList

java.lang.Object
  extended by java.util.AbstractMap<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
      extended by com.sun.xml.ws.binding.WebServiceFeatureList
All Implemented Interfaces:
WSFeatureList, java.lang.Iterable<javax.xml.ws.WebServiceFeature>, java.util.Map<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>

public final class WebServiceFeatureList
extends java.util.AbstractMap<java.lang.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
WebServiceFeatureList()
           
WebServiceFeatureList(java.lang.Class<?> endpointClass)
          Creates a list by reading featuers from the annotation on a class.
WebServiceFeatureList(javax.xml.ws.WebServiceFeature... features)
           
WebServiceFeatureList(WebServiceFeatureList features)
           
 
Method Summary
 void add(javax.xml.ws.WebServiceFeature f)
          Adds a feature to the list if it's not already added.
 void addAll(java.lang.Iterable<javax.xml.ws.WebServiceFeature> list)
          Adds features to the list if it's not already added.
 boolean contains(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> feature)
           
 java.util.Set<java.util.Map.Entry<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>> entrySet()
           
 boolean equals(java.lang.Object other)
           
<F extends javax.xml.ws.WebServiceFeature>
F
get(java.lang.Class<F> featureType)
          Gets a WebServiceFeature of the specific type.
static javax.xml.ws.WebServiceFeature getFeature(java.lang.annotation.Annotation a)
          Returns a corresponding feature for a feature annotation(i.e which has WebServiceFeatureAnnotation meta annotation)
static
<F extends javax.xml.ws.WebServiceFeature>
F
getFeature(javax.xml.ws.WebServiceFeature[] features, java.lang.Class<F> featureType)
           
static SOAPVersion getSoapVersion(WSFeatureList features)
           
 boolean isEnabled(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> feature)
          Checks if a particular WebServiceFeature is enabled.
static boolean isFeatureEnabled(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> type, javax.xml.ws.WebServiceFeature[] features)
           
 java.util.Iterator<javax.xml.ws.WebServiceFeature> iterator()
           
 void mergeFeatures(java.lang.Iterable<javax.xml.ws.WebServiceFeature> features, boolean reportConflicts)
          Merges the extra features that are not already set on binding.
 void mergeFeatures(javax.xml.ws.WebServiceFeature[] features, boolean reportConflicts)
          Merges the extra features that are not already set on binding.
 void mergeFeatures(WSDLPort wsdlPort, boolean honorWsdlRequired, boolean reportConflicts)
          Extracts features from AbstractFeaturedObjectImpl.getFeatures().
 void parseAnnotations(java.lang.Class<?> endpointClass)
           
 void parseAnnotations(java.lang.Iterable<java.lang.annotation.Annotation> annIt)
          Adds the corresponding features to the list for feature annotations(i.e which have WebServiceFeatureAnnotation meta annotation)
 javax.xml.ws.WebServiceFeature put(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> key, javax.xml.ws.WebServiceFeature value)
           
 void setParentFeaturedObject(WSDLFeaturedObject parent)
          Set the parent features.
 javax.xml.ws.WebServiceFeature[] toArray()
          Obtains all the features in the array.
static javax.xml.ws.WebServiceFeature[] toFeatureArray(WSBinding binding)
           
static WebServiceFeatureList toList(java.lang.Iterable<javax.xml.ws.WebServiceFeature> features)
           
 java.lang.String toString()
           
 void validate()
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, get, hashCode, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebServiceFeatureList

public WebServiceFeatureList()

WebServiceFeatureList

public WebServiceFeatureList(@NotNull
                             javax.xml.ws.WebServiceFeature... features)

WebServiceFeatureList

public WebServiceFeatureList(WebServiceFeatureList features)

WebServiceFeatureList

public WebServiceFeatureList(@NotNull
                             java.lang.Class<?> endpointClass)
Creates a list by reading featuers from the annotation on a class.

Method Detail

toList

public static WebServiceFeatureList toList(java.lang.Iterable<javax.xml.ws.WebServiceFeature> features)

validate

public void validate()

parseAnnotations

public void parseAnnotations(java.lang.Iterable<java.lang.annotation.Annotation> annIt)
Adds the corresponding features to the list for feature annotations(i.e which have WebServiceFeatureAnnotation meta annotation)

Parameters:
annIt - collection of annotations(that can have non-feature annotations)

getFeature

public static javax.xml.ws.WebServiceFeature getFeature(java.lang.annotation.Annotation a)
Returns a corresponding feature for a feature annotation(i.e which has WebServiceFeatureAnnotation meta annotation)

Returns:
corresponding feature for the annotation null, if the annotation is nota feature annotation

parseAnnotations

public void parseAnnotations(java.lang.Class<?> endpointClass)
Parameters:
endpointClass - web service impl class

iterator

public java.util.Iterator<javax.xml.ws.WebServiceFeature> iterator()
Specified by:
iterator in interface java.lang.Iterable<javax.xml.ws.WebServiceFeature>

toArray

@NotNull
public javax.xml.ws.WebServiceFeature[] toArray()
Description copied from interface: WSFeatureList
Obtains all the features in the array.

Specified by:
toArray in interface WSFeatureList

isEnabled

public boolean isEnabled(@NotNull
                         java.lang.Class<? extends javax.xml.ws.WebServiceFeature> feature)
Description copied from interface: WSFeatureList
Checks if a particular WebServiceFeature is enabled.

Specified by:
isEnabled in interface WSFeatureList
Returns:
true if enabled.

contains

public boolean contains(@NotNull
                        java.lang.Class<? extends javax.xml.ws.WebServiceFeature> feature)

get

@Nullable
public <F extends javax.xml.ws.WebServiceFeature> F get(@NotNull
                                                                 java.lang.Class<F> featureType)
Description copied from interface: WSFeatureList
Gets a WebServiceFeature of the specific type.

Specified by:
get in interface WSFeatureList
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

public void addAll(@NotNull
                   java.lang.Iterable<javax.xml.ws.WebServiceFeature> list)
Adds features to the list if it's not already added.


equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface java.util.Map<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
Overrides:
equals in class java.util.AbstractMap<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractMap<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>

mergeFeatures

public void mergeFeatures(@NotNull
                          java.lang.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:
mergeFeatures in interface WSFeatureList
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: WSFeatureList
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:
mergeFeatures in interface WSFeatureList
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 from AbstractFeaturedObjectImpl.getFeatures(). Extra features that are not already set on binding. i.e, if a feature is set already on binding through someother API the coresponding wsdlFeature is not set.

Parameters:
wsdlPort - WSDLPort model
honorWsdlRequired - 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 true
reportConflicts - If true, checks if the feature setting in WSDL (wsdl extension or policy configuration) colflicts with feature setting in Deployed Service and logs warning if there are any conflicts.

setParentFeaturedObject

public void setParentFeaturedObject(@NotNull
                                    WSDLFeaturedObject parent)
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
                                                                               java.lang.Class<F> featureType)

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
Specified by:
entrySet in class java.util.AbstractMap<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>

put

public javax.xml.ws.WebServiceFeature put(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> key,
                                          javax.xml.ws.WebServiceFeature value)
Specified by:
put in interface java.util.Map<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>
Overrides:
put in class java.util.AbstractMap<java.lang.Class<? extends javax.xml.ws.WebServiceFeature>,javax.xml.ws.WebServiceFeature>

getSoapVersion

public static SOAPVersion getSoapVersion(WSFeatureList features)

isFeatureEnabled

public static boolean isFeatureEnabled(java.lang.Class<? extends javax.xml.ws.WebServiceFeature> type,
                                       javax.xml.ws.WebServiceFeature[] features)

toFeatureArray

public static javax.xml.ws.WebServiceFeature[] toFeatureArray(WSBinding binding)


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.