public final class AssertionData
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
PolicyAssertion objects via PolicyAssertionCreator
implementations.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<javax.xml.namespace.QName,java.lang.String> |
attributes |
private boolean |
ignorable |
private static PolicyLogger |
LOGGER |
private javax.xml.namespace.QName |
name |
private boolean |
optional |
private static long |
serialVersionUID |
private ModelNode.Type |
type |
private java.lang.String |
value |
| Constructor and Description |
|---|
AssertionData(AssertionData data)
Copy constructor.
|
AssertionData(javax.xml.namespace.QName name,
java.lang.String value,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes,
ModelNode.Type type,
boolean optional,
boolean ignorable)
Constructs assertion data wrapper instance for an assertion or assertion parameter that contains a value or
some attributes.
|
| Modifier and Type | Method and Description |
|---|---|
protected AssertionData |
clone() |
boolean |
containsAttribute(javax.xml.namespace.QName name)
Returns true if the given attribute exists, false otherwise.
|
static AssertionData |
createAssertionData(javax.xml.namespace.QName name)
Constructs assertion data wrapper instance for an assertion that does not
contain any value nor any attributes.
|
static AssertionData |
createAssertionData(javax.xml.namespace.QName name,
java.lang.String value,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes,
boolean optional,
boolean ignorable)
Constructs assertion data wrapper instance for an assertion that does
contain a value or attributes.
|
static AssertionData |
createAssertionParameterData(javax.xml.namespace.QName name)
Constructs assertion data wrapper instance for an assertion parameter that
does not contain any value nor any attributes.
|
static AssertionData |
createAssertionParameterData(javax.xml.namespace.QName name,
java.lang.String value,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes)
Constructs assertion data wrapper instance for an assertion parameter that
contains a value or attributes
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<javax.xml.namespace.QName,java.lang.String> |
getAttributes()
Returns the disconnected map of attributes attached to the assertion.
|
java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.lang.String>> |
getAttributesSet()
Returns the disconnected set of attributes attached to the assertion.
|
java.lang.String |
getAttributeValue(javax.xml.namespace.QName name)
Returns the value of the given attribute.
|
javax.xml.namespace.QName |
getName()
Returns the name of the assertion.
|
ModelNode.Type |
getNodeType() |
java.lang.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.
|
java.lang.String |
removeAttribute(javax.xml.namespace.QName name)
Removes the given attribute from the assertion data.
|
void |
setAttribute(javax.xml.namespace.QName name,
java.lang.String value)
Adds or overwrites an attribute.
|
void |
setIgnorableAttribute(boolean value)
Sets the ignorable attribute.
|
private void |
setModelNodeType(ModelNode.Type type) |
void |
setOptionalAttribute(boolean value)
Sets the optional attribute.
|
java.lang.String |
toString() |
java.lang.StringBuffer |
toString(int indentLevel,
java.lang.StringBuffer buffer)
A helper method that appends indented string representation of this instance to the input string buffer.
|
private static final long serialVersionUID
private static final PolicyLogger LOGGER
private final javax.xml.namespace.QName name
private final java.lang.String value
private final java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes
private ModelNode.Type type
private boolean optional
private boolean ignorable
AssertionData(javax.xml.namespace.QName name,
java.lang.String value,
java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes,
ModelNode.Type type,
boolean optional,
boolean ignorable)
throws java.lang.IllegalArgumentException
type parameter.name - the FQN of the assertion or assertion parametervalue - a String representation of model node valueattributes - map of model node's <attribute name, attribute value> pairstype - specifies whether the data will belong to the assertion or assertion parameter node. This is
a workaround solution that allows us to transfer this information about the owner node to
a policy assertion instance factory without actualy having to touch the PolicyAssertionCreator
interface and protected PolicyAssertion constructors.java.lang.IllegalArgumentException - in case the type parameter is not
ASSERTION or
ASSERTION_PARAMETER_NODEAssertionData(AssertionData data)
data - The instance that is to be copied.public static AssertionData createAssertionData(javax.xml.namespace.QName name) throws java.lang.IllegalArgumentException
name - the FQN of the assertionjava.lang.IllegalArgumentException - in case the type parameter is not
ASSERTION or
ASSERTION_PARAMETER_NODEpublic static AssertionData createAssertionParameterData(javax.xml.namespace.QName name) throws java.lang.IllegalArgumentException
name - the FQN of the assertion parameterjava.lang.IllegalArgumentException - in case the type parameter is not
ASSERTION or
ASSERTION_PARAMETER_NODEpublic static AssertionData createAssertionData(javax.xml.namespace.QName name, java.lang.String value, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes, boolean optional, boolean ignorable) throws java.lang.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 notjava.lang.IllegalArgumentException - in case the type parameter is not
ASSERTION or
ASSERTION_PARAMETER_NODEpublic static AssertionData createAssertionParameterData(javax.xml.namespace.QName name, java.lang.String value, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes) throws java.lang.IllegalArgumentException
name - the FQN of the assertion parametervalue - a String representation of model node valueattributes - map of model node's <attribute name, attribute value> pairsjava.lang.IllegalArgumentException - in case the type parameter is not
ASSERTION or
ASSERTION_PARAMETER_NODEprivate void setModelNodeType(ModelNode.Type type) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionprotected AssertionData clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean containsAttribute(javax.xml.namespace.QName name)
name - The name of the attribute. Must not be null.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getAttributeValue(javax.xml.namespace.QName name)
name - The name of the attribute. Must not be null.public java.util.Map<javax.xml.namespace.QName,java.lang.String> getAttributes()
public java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.lang.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 javax.xml.namespace.QName getName()
public java.lang.String getValue()
public int hashCode()
Object.hashCode() method override.hashCode in class java.lang.Objectpublic 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 java.lang.String removeAttribute(javax.xml.namespace.QName name)
name - The name of the attribute. Must not be nullpublic void setAttribute(javax.xml.namespace.QName name,
java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.StringBuffer toString(int indentLevel,
java.lang.StringBuffer buffer)
indentLevel - indentation level to be used.buffer - buffer to be used for appending string representation of this instancepublic ModelNode.Type getNodeType()