Class AssertionData
java.lang.Object
com.sun.xml.ws.policy.sourcemodel.AssertionData
- All Implemented Interfaces:
Serializable,Cloneable
Wrapper class for possible data that each "assertion" and "assertion parameter content" policy source model node may
have attached.
This data, when stored in an 'assertion' model node, is intended to be used as input parameter when creating
This data, when stored in an 'assertion' model node, is intended to be used as input parameter when creating
PolicyAssertion objects via PolicyAssertionCreator
implementations.- Author:
- Marek Potociar (marek.potociar@sun.com), Fabian Ritzmann
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected AssertionDataclone()booleancontainsAttribute(QName name) Returns true if the given attribute exists, false otherwise.static AssertionDatacreateAssertionData(QName name) Constructs assertion data wrapper instance for an assertion that does not contain any value nor any attributes.static AssertionDatacreateAssertionData(QName name, String value, Map<QName, String> attributes, boolean optional, boolean ignorable) Constructs assertion data wrapper instance for an assertion that does contain a value or attributes.static AssertionDataConstructs assertion data wrapper instance for an assertion parameter that does not contain any value nor any attributes.static AssertionDataConstructs assertion data wrapper instance for an assertion parameter that contains a value or attributesbooleanReturns the disconnected map of attributes attached to the assertion.Returns the disconnected set of attributes attached to the assertion.getAttributeValue(QName name) Returns the value of the given attribute.getName()Returns the name of the assertion.getValue()Returns the value of the assertion.inthashCode()AnObject.hashCode()method override.booleanTests if the ignorable attribute is set.booleanTests if the optional attribute is set.booleanMethod specifies whether the assertion data contain proprietary visibility element set to "private" value.removeAttribute(QName name) Removes the given attribute from the assertion data.voidsetAttribute(QName name, String value) Adds or overwrites an attribute.voidsetIgnorableAttribute(boolean value) Sets the ignorable attribute.voidsetOptionalAttribute(boolean value) Sets the optional attribute.toString()toString(int indentLevel, StringBuffer buffer) A helper method that appends indented string representation of this instance to the input string buffer.
-
Method Details
-
createAssertionData
Constructs assertion data wrapper instance for an assertion that does not contain any value nor any attributes.- Parameters:
name- the FQN of the assertion- Throws:
IllegalArgumentException- in case thetypeparameter is notASSERTIONorASSERTION_PARAMETER_NODE
-
createAssertionParameterData
public static AssertionData createAssertionParameterData(QName name) throws IllegalArgumentException Constructs assertion data wrapper instance for an assertion parameter that does not contain any value nor any attributes.- Parameters:
name- the FQN of the assertion parameter- Throws:
IllegalArgumentException- in case thetypeparameter is notASSERTIONorASSERTION_PARAMETER_NODE
-
createAssertionData
public static AssertionData createAssertionData(QName name, String value, Map<QName, String> attributes, boolean optional, boolean ignorable) throws IllegalArgumentExceptionConstructs assertion data wrapper instance for an assertion that does contain a value or attributes.- Parameters:
name- the FQN of the assertionvalue- aStringrepresentation of model node valueattributes- map of model node's <attribute name, attribute value> pairsoptional- flag indicating whether the assertion is optional or notignorable- flag indicating whether the assertion is ignorable or not- Throws:
IllegalArgumentException- in case thetypeparameter is notASSERTIONorASSERTION_PARAMETER_NODE
-
createAssertionParameterData
public static AssertionData createAssertionParameterData(QName name, String value, Map<QName, String> attributes) throws IllegalArgumentExceptionConstructs assertion data wrapper instance for an assertion parameter that contains a value or attributes- Parameters:
name- the FQN of the assertion parametervalue- aStringrepresentation of model node valueattributes- map of model node's <attribute name, attribute value> pairs- Throws:
IllegalArgumentException- in case thetypeparameter is notASSERTIONorASSERTION_PARAMETER_NODE
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
containsAttribute
Returns true if the given attribute exists, false otherwise.- Parameters:
name- The name of the attribute. Must not be null.- Returns:
- True if the given attribute exists, false otherwise.
-
equals
-
getAttributeValue
Returns the value of the given attribute. Returns null if the attribute does not exist.- Parameters:
name- The name of the attribute. Must not be null.- Returns:
- The value of the given attribute. Returns null if the attribute does not exist.
-
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.
-
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:
- disconnected set of attributes attached to the assertion.
-
getName
Returns the name of the assertion.- Returns:
- assertion's name
-
getValue
Returns the value of the assertion.- Returns:
- assertion's value
-
hashCode
public int hashCode()AnObject.hashCode()method override. -
isPrivateAttributeSet
public boolean isPrivateAttributeSet()Method specifies whether the assertion data contain proprietary visibility element set to "private" value.- Returns:
'true'if the attribute is present and set properly (i.e. the node containing this assertion data instance should not be marshaled into generated WSDL documents). Returnsfalseotherwise.
-
removeAttribute
Removes the given attribute from the assertion data.- Parameters:
name- The name of the attribute. Must not be null- Returns:
- The value of the removed attribute.
-
setAttribute
Adds or overwrites an attribute.- Parameters:
name- The name of the attribute.value- The value of the attribute.
-
setOptionalAttribute
public void setOptionalAttribute(boolean value) Sets the optional attribute.- Parameters:
value- The value of the optional attribute.
-
isOptionalAttributeSet
public boolean isOptionalAttributeSet()Tests if the optional attribute is set.- Returns:
- True if optional is set and is true. False otherwise.
-
setIgnorableAttribute
public void setIgnorableAttribute(boolean value) Sets the ignorable attribute.- Parameters:
value- The value of the ignorable attribute.
-
isIgnorableAttributeSet
public boolean isIgnorableAttributeSet()Tests if the ignorable attribute is set.- Returns:
- True if ignorable is set and is true. False otherwise.
-
toString
-
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
-
getNodeType
-