public final class AssertionData extends Object implements Cloneable, Serializable
PolicyAssertion
objects via PolicyAssertionCreator
implementations.Modifier and Type | Method and Description |
---|---|
protected AssertionData |
clone() |
boolean |
containsAttribute(QName name)
Returns true if the given attribute exists, false otherwise.
|
static AssertionData |
createAssertionData(QName name)
Constructs assertion data wrapper instance for an assertion that does not
contain any value nor any attributes.
|
static AssertionData |
createAssertionData(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 AssertionData |
createAssertionParameterData(QName name)
Constructs assertion data wrapper instance for an assertion parameter that
does not contain any value nor any attributes.
|
static AssertionData |
createAssertionParameterData(QName name,
String value,
Map<QName,String> attributes)
Constructs assertion data wrapper instance for an assertion parameter that
contains a value or attributes
|
boolean |
equals(Object obj) |
Map<QName,String> |
getAttributes()
Returns the disconnected map of attributes attached to the assertion.
|
Set<Map.Entry<QName,String>> |
getAttributesSet()
Returns the disconnected set of attributes attached to the assertion.
|
String |
getAttributeValue(QName name)
Returns the value of the given attribute.
|
QName |
getName()
Returns the name of the assertion.
|
ModelNode.Type |
getNodeType() |
String |
getValue()
Returns the value of the assertion.
|
int |
hashCode()
An
Object.hashCode() method override. |
boolean |
isIgnorableAttributeSet()
Tests if the ignorable attribute is set.
|
boolean |
isOptionalAttributeSet()
Tests if the optional attribute is set.
|
boolean |
isPrivateAttributeSet()
Method specifies whether the assertion data contain proprietary visibility element set to "private" value.
|
String |
removeAttribute(QName name)
Removes the given attribute from the assertion data.
|
void |
setAttribute(QName name,
String value)
Adds or overwrites an attribute.
|
void |
setIgnorableAttribute(boolean value)
Sets the ignorable attribute.
|
void |
setOptionalAttribute(boolean value)
Sets the optional attribute.
|
String |
toString() |
StringBuffer |
toString(int indentLevel,
StringBuffer buffer)
A helper method that appends indented string representation of this instance to the input string buffer.
|
public static AssertionData createAssertionData(QName name) throws IllegalArgumentException
name
- the FQN of the assertionIllegalArgumentException
- in case the type
parameter is not
ASSERTION
or
ASSERTION_PARAMETER_NODE
public static AssertionData createAssertionParameterData(QName name) throws IllegalArgumentException
name
- the FQN of the assertion parameterIllegalArgumentException
- in case the type
parameter is not
ASSERTION
or
ASSERTION_PARAMETER_NODE
public static AssertionData createAssertionData(QName name, String value, Map<QName,String> attributes, boolean optional, boolean ignorable) throws IllegalArgumentException
name
- the FQN of the assertionvalue
- a String
representation 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 notIllegalArgumentException
- in case the type
parameter is not
ASSERTION
or
ASSERTION_PARAMETER_NODE
public static AssertionData createAssertionParameterData(QName name, String value, Map<QName,String> attributes) throws IllegalArgumentException
name
- the FQN of the assertion parametervalue
- a String
representation of model node valueattributes
- map of model node's <attribute name, attribute value> pairsIllegalArgumentException
- in case the type
parameter is not
ASSERTION
or
ASSERTION_PARAMETER_NODE
protected AssertionData clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean containsAttribute(QName name)
name
- The name of the attribute. Must not be null.public String getAttributeValue(QName name)
name
- The name of the attribute. Must not be null.public Map<QName,String> getAttributes()
public Set<Map.Entry<QName,String>> getAttributesSet()
Map.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.public QName getName()
public String getValue()
public int hashCode()
Object.hashCode()
method override.public boolean isPrivateAttributeSet()
'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). Returns false
otherwise.public String removeAttribute(QName name)
name
- The name of the attribute. Must not be nullpublic void setAttribute(QName name, String value)
name
- The name of the attribute.value
- The value of the attribute.public void setOptionalAttribute(boolean value)
value
- The value of the optional attribute.public boolean isOptionalAttributeSet()
public void setIgnorableAttribute(boolean value)
value
- The value of the ignorable attribute.public boolean isIgnorableAttributeSet()
public StringBuffer toString(int indentLevel, StringBuffer buffer)
indentLevel
- indentation level to be used.buffer
- buffer to be used for appending string representation of this instancepublic ModelNode.Type getNodeType()
Copyright © 2006–2014 Oracle Corporation. All rights reserved.