Methods Summary |
---|
public boolean | equals(java.lang.Object obj)An {@code Object.equals(Object obj)} method override.
if (this == obj) {
return true;
}
if (!(obj instanceof PolicyAssertion)) {
return false;
}
final PolicyAssertion that = (PolicyAssertion) obj;
boolean result = true;
result = result && this.data.equals(that.data);
result = result && this.parameters.equals(that.parameters);
result = result && ((this.nestedPolicy == null) ? ((that.nestedPolicy == null) ? true : false) : this.nestedPolicy.equals(that.nestedPolicy));
return result;
|
public final java.lang.String | getAttributeValue(javax.xml.namespace.QName name)Returns the value of an attribute. Returns null if an attribute with the given name does not exist.
return data.getAttributeValue(name);
|
public final java.util.Map | 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.
return data.getAttributes();
|
public final java.util.Set | getAttributesSet()Returns the disconnected set of attributes attached to the assertion. Each attribute is represented as a single
{@code Map.Entry} 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.
return data.getAttributesSet();
|
public final javax.xml.namespace.QName | getName()Returns the fully qualified name of the assertion.
return data.getName();
|
public final java.util.Iterator | getNestedAssertionsIterator()Returns the assertion's parameter collection iterator.
return parameters.iterator();
|
public final NestedPolicy | getNestedPolicy()Returns the nested policy if any.
return nestedPolicy;
|
public final java.lang.String | getValue()Returns the value of the assertion - the character data content contained in the assertion element representation.
return data.getValue();
|
public final boolean | hasNestedAssertions()Returns the boolean information whether this assertion contains any parameters.
return !parameters.isEmpty();
|
public final boolean | hasNestedPolicy()Returns the boolean information whether this assertion contains nested policy.
return nestedPolicy != null;
|
public int | hashCode()An {@code Object.hashCode()} method override.
int result = 17;
result = 37 * result + data.hashCode();
result = 37 * result + ((hasNestedAssertions()) ? 17 : 0);
result = 37 * result + ((hasNestedPolicy()) ? 17 : 0);
return result;
|
public boolean | isOptional()Method specifies whether the assertion is otpional or not.
This is a default implementation that may be overriden. The method returns {@code true} if the {@code wsp:optional} attribute
is present on the assertion and its value is {@code 'true'}. Otherwise the method returns {@code false}.
boolean result = false;
final String attributeValue = getAttributeValue(PolicyConstants.OPTIONAL);
if (attributeValue != null) {
result = Boolean.parseBoolean(attributeValue);
}
return result;
|
boolean | isParameter()
return data.getNodeType() == ModelNode.Type.ASSERTION_PARAMETER_NODE;
|
public final boolean | isPrivate()Method specifies whether the assertion is private or not. This is specified by our proprietary visibility element.
return data.isPrivateAttributeSet();
|
public java.lang.String | toString()An {@code Object.toString()} method override.
return toString(0, new StringBuffer()).toString();
|
protected 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.
final String indent = PolicyUtils.Text.createIndent(indentLevel);
final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
buffer.append(indent).append("Assertion {").append(PolicyUtils.Text.NEW_LINE);
data.toString(indentLevel + 1, buffer);
buffer.append(PolicyUtils.Text.NEW_LINE);
if (hasNestedAssertions()) {
buffer.append(innerIndent).append("parameters {").append(PolicyUtils.Text.NEW_LINE);
for (PolicyAssertion parameter : parameters) {
parameter.toString(indentLevel + 2, buffer);
}
buffer.append(innerIndent).append('}").append(PolicyUtils.Text.NEW_LINE);
} else {
buffer.append(innerIndent).append("no parameters").append(PolicyUtils.Text.NEW_LINE);
}
if (hasNestedPolicy()) {
nestedPolicy.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
} else {
buffer.append(innerIndent).append("no nested policy").append(PolicyUtils.Text.NEW_LINE);
}
buffer.append(indent).append('}");
return buffer;
|