Package com.sun.xml.ws.policy
Class PolicyAssertion
java.lang.Object
com.sun.xml.ws.policy.PolicyAssertion
- Direct Known Subclasses:
Address,AlgorithmSuite,AsymmetricBinding,BootstrapPolicy,CallbackHandler,CallbackHandlerConfiguration,CertStoreConfig,Claims,ComplexAssertion,EncryptedElements,EncryptedParts,EndpointReference,Header,HttpsToken,IssuedToken,Issuer,IssuerName,JMACAuthModuleConfiguration,KerberosConfig,KerberosToken,KeyStore,KeyValueToken,Layout,Lifetime,RelToken,RequestSecurityTokenTemplate,RequiredElements,RsaToken,SamlToken,SCTokenWrapper,SecureConversationToken,SecurityContextToken,SessionManagerStore,SignedElements,SignedParts,SimpleAssertion,SpnegoContextToken,SupportingTokens,SymmetricBinding,Token,TransportBinding,Trust10,Trust13,UseKey,UsernameToken,Validator,ValidatorConfiguration,Wss10,Wss11,X509Token
Base class for any policy assertion implementations. It defines the common
interface and provides some default implentation for common policy assertion
functionality.
NOTE: Assertion implementers should not extend this class directly.
NOTE: Assertion implementers should not extend this class directly.
SimpleAssertion
or ComplexAssertion should be used as a base class instead.- Author:
- Marek Potociar, Fabian Ritzmann
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedPolicyAssertion(AssertionData assertionData, Collection<? extends PolicyAssertion> assertionParameters) Creates generic assertionand stores the data specified in input parametersprotectedPolicyAssertion(AssertionData assertionData, Collection<? extends PolicyAssertion> assertionParameters, AssertionSet nestedAlternative) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAnObject.equals(Object obj)method override.Returns the disconnected map of attributes attached to the assertion.Returns the disconnected set of attributes attached to the assertion.final StringgetAttributeValue(QName name) Returns the value of an attribute.<T extends PolicyAssertion>
TgetImplementation(Class<T> type) Casts the assertion to the implementation type.final QNamegetName()Returns the fully qualified name of the assertion.Returns the nested policy if any.final Iterator<PolicyAssertion>Returns the assertion's parameter collection iterator.final StringgetValue()Returns the value of the assertion - the character data content contained in the assertion element representation.inthashCode()AnObject.hashCode()method override.booleanReturns the boolean information whether this assertion contains nested policy.final booleanReturns the boolean information whether this assertion contains any parameters.booleanMethod specifies whether the assertion is ignorable or not.booleanMethod specifies whether the assertion is otpional or not.final booleanMethod specifies whether the assertion is private or not.toString()AnObject.toString()method override.protected StringBuffertoString(int indentLevel, StringBuffer buffer) A helper method that appends indented string representation of this instance to the input string buffer.
-
Constructor Details
-
PolicyAssertion
protected PolicyAssertion() -
PolicyAssertion
@Deprecated protected PolicyAssertion(AssertionData assertionData, Collection<? extends PolicyAssertion> assertionParameters, AssertionSet nestedAlternative) Deprecated.Non-abstract assertion types should derive fromSimpleAssertionorComplexAssertioninstead.Policyclass will not provide support for nested policy alternatives in the future. This responsibility is delegated toComplexAssertionclass instead.Creates generic assertionand stores the data specified in input parameters- Parameters:
assertionData- assertion creation data specifying the details of newly created assertion. May benull.assertionParameters- collection of assertions parameters of this policy assertion. May benull.nestedAlternative- assertion set specifying nested policy alternative. May benull.
-
PolicyAssertion
protected PolicyAssertion(AssertionData assertionData, Collection<? extends PolicyAssertion> assertionParameters) Creates generic assertionand stores the data specified in input parameters- Parameters:
assertionData- assertion creation data specifying the details of newly created assertionassertionParameters- collection of assertions parameters of this policy assertion. May benull.
-
-
Method Details
-
getName
Returns the fully qualified name of the assertion.- Returns:
- assertion's fully qualified name.
-
getValue
Returns the value of the assertion - the character data content contained in the assertion element representation.- Returns:
- assertion's value. May return
nullif there is no value set for the assertion.
-
isOptional
public boolean isOptional()Method specifies whether the assertion is otpional or not.
This is a default implementation that may be overriden. The method returnstrueif thewsp:optionalattribute is present on the assertion and its value is'true'. Otherwise the method returnsfalse.- Returns:
'true'if the assertion is optional. Returnsfalseotherwise.
-
isIgnorable
public boolean isIgnorable()Method specifies whether the assertion is ignorable or not.
This is a default implementation that may be overriden. The method returnstrueif thewsp:Ignorableattribute is present on the assertion and its value is'true'. Otherwise the method returnsfalse.- Returns:
'true'if the assertion is ignorable. Returnsfalseotherwise.
-
isPrivate
public final boolean isPrivate()Method specifies whether the assertion is private or not. This is specified by our proprietary visibility element.- Returns:
'true'if the assertion is marked as private (i.e. should not be marshalled int generated WSDL documents). Returnsfalseotherwise.
-
getAttributesSet
Returns the disconnected set of attributes attached to the assertion. Each attribute is represented as a singleMap.Entry<attributeName, attributeValue>element.
'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's attributes.- Returns:
- disconected set of attributes attached to the assertion.
-
getAttributes
Returns the disconnected map of attributes attached to the assertion.
'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's attributes.- Returns:
- disconnected map of attributes attached to the assertion.
-
getAttributeValue
Returns the value of an attribute. Returns null if an attribute with the given name does not exist.- Parameters:
name- The fully qualified name of the attribute- Returns:
- The value of the attribute. Returns
nullif there is no such attribute or if it's value is null.
-
hasParameters
public final boolean hasParameters()Returns the boolean information whether this assertion contains any parameters.- Returns:
trueif the assertion contains parameters. Returnsfalseotherwise.
-
getParametersIterator
Returns the assertion's parameter collection iterator.- Returns:
- the assertion's parameter collection iterator.
-
hasNestedPolicy
public boolean hasNestedPolicy()Returns the boolean information whether this assertion contains nested policy.- Returns:
trueif the assertion contains child (nested) policy. Returnsfalseotherwise.
-
getNestedPolicy
Returns the nested policy if any.- Returns:
- the nested policy if the assertion contains a nested policy. Returns
nullotherwise.
-
getImplementation
Casts the assertion to the implementation type. Returns null if that is not possible.- Type Parameters:
T- The implementation type of the assertion.- Parameters:
type- The implementation type of the assertion. May not be null.- Returns:
- The instance of the implementation type. Null otherwise.
-
toString
AnObject.toString()method override. -
toString
A helper method that appends indented string representation of this instance to the input string buffer.- Parameters:
indentLevel- indentation level to be used.buffer- buffer to be used for appending string representation of this instance- Returns:
- modified buffer containing new string representation of the instance
-
equals
AnObject.equals(Object obj)method override. -
hashCode
public int hashCode()AnObject.hashCode()method override.
-
SimpleAssertionorComplexAssertioninstead.