Methods Summary |
---|
protected com.sun.xml.ws.policy.sourcemodel.AssertionData | clone()
final AssertionData clone = (AssertionData) super.clone();
clone.attributes = new HashMap<QName, String>(this.attributes);
return clone;
|
public boolean | containsAttribute(javax.xml.namespace.QName name)TODO: javadoc
synchronized (attributes) {
return attributes.containsKey(name);
}
|
public static com.sun.xml.ws.policy.sourcemodel.AssertionData | createAssertionData(javax.xml.namespace.QName name)Constructs assertion data wrapper instance for an assertion that does not
contain any value nor any attributes.
return new AssertionData(name, null, null, ModelNode.Type.ASSERTION);
|
public static com.sun.xml.ws.policy.sourcemodel.AssertionData | createAssertionData(javax.xml.namespace.QName name, java.lang.String value, java.util.Map attributes)Constructs assertion data wrapper instance for an assertion that does
contain a value or attributes.
return new AssertionData(name, value, attributes, ModelNode.Type.ASSERTION);
|
public static com.sun.xml.ws.policy.sourcemodel.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.
return new AssertionData(name, null, null, ModelNode.Type.ASSERTION_PARAMETER_NODE);
|
public static com.sun.xml.ws.policy.sourcemodel.AssertionData | createAssertionParameterData(javax.xml.namespace.QName name, java.lang.String value, java.util.Map attributes)Constructs assertion data wrapper instance for an assertion parameter that
contains a value or attributes
return new AssertionData(name, value, attributes, ModelNode.Type.ASSERTION_PARAMETER_NODE);
|
public boolean | equals(java.lang.Object obj)An {@code Object.equals(Object obj)} method override.
if (this == obj) {
return true;
}
if (!(obj instanceof AssertionData)) {
return false;
}
boolean result = true;
final AssertionData that = (AssertionData) obj;
result = result && this.name.equals(that.name);
result = result && ((this.value == null) ? that.value == null : this.value.equals(that.value));
synchronized (attributes) {
result = result && ((this.attributes == null) ? that.attributes == null : this.attributes.equals(that.attributes));
}
return result;
|
public java.lang.String | getAttributeValue(javax.xml.namespace.QName name)TODO: javadoc
synchronized (attributes) {
return attributes.get(name);
}
|
public 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.
synchronized (attributes) {
return new HashMap<QName, String>(attributes);
}
|
public 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.
synchronized (attributes) {
return new HashSet<Map.Entry<QName, String>>(attributes.entrySet());
}
|
public javax.xml.namespace.QName | getName()Returns the name of the assertion.
return name;
|
public ModelNode.Type | getNodeType()
return type;
|
public java.lang.String | getValue()Returns the value of the assertion.
return value;
|
public int | hashCode()An {@code Object.hashCode()} method override.
int result = 17;
result = 37 * result + this.name.hashCode();
result = 37 * result + ((this.value == null) ? 0 : this.value.hashCode());
synchronized (attributes) {
result = 37 * result + ((this.attributes == null) ? 0 : this.attributes.hashCode());
}
return result;
|
public boolean | isPrivateAttributeSet()Method specifies whether the assertion data contain proprietary visibility element set to "private" value.
return PolicyConstants.VISIBILITY_VALUE_PRIVATE.equals(getAttributeValue(PolicyConstants.VISIBILITY_ATTRIBUTE));
|
public java.lang.String | removeAttribute(javax.xml.namespace.QName name)TODO: javadoc
synchronized (attributes) {
return attributes.remove(name);
}
|
public void | setAttribute(javax.xml.namespace.QName name, java.lang.String value)TODO: javadoc
synchronized (attributes) {
attributes.put(name, value);
}
|
private void | setModelNodeType(ModelNode.Type type)
if (type == ModelNode.Type.ASSERTION || type == ModelNode.Type.ASSERTION_PARAMETER_NODE) {
this.type = type;
} else {
throw LOGGER.logSevereException(new IllegalArgumentException(
LocalizationMessages.WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(type, ModelNode.Type.ASSERTION, ModelNode.Type.ASSERTION_PARAMETER_NODE)));
}
|
public void | setOptionalAttribute(boolean value)TODO: javadoc
setAttribute(PolicyConstants.OPTIONAL, Boolean.toString(value));
|
public java.lang.String | toString()An {@code Object.toString()} method override.
return toString(0, new StringBuffer()).toString();
|
public 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);
final String innerDoubleIndent = PolicyUtils.Text.createIndent(indentLevel + 2);
buffer.append(indent);
if (type == ModelNode.Type.ASSERTION) {
buffer.append("assertion data {");
} else {
buffer.append("assertion parameter data {");
}
buffer.append(PolicyUtils.Text.NEW_LINE);
buffer.append(innerIndent).append("namespace = '").append(name.getNamespaceURI()).append('\'").append(PolicyUtils.Text.NEW_LINE);
buffer.append(innerIndent).append("prefix = '").append(name.getPrefix()).append('\'").append(PolicyUtils.Text.NEW_LINE);
buffer.append(innerIndent).append("local name = '").append(name.getLocalPart()).append('\'").append(PolicyUtils.Text.NEW_LINE);
buffer.append(innerIndent).append("value = '").append(value).append('\'").append(PolicyUtils.Text.NEW_LINE);
synchronized (attributes) {
if (attributes.isEmpty()) {
buffer.append(innerIndent).append("no attributes");
} else {
buffer.append(innerIndent).append("attributes {").append(PolicyUtils.Text.NEW_LINE);
for(Map.Entry<QName, String> entry : attributes.entrySet()) {
final QName aName = entry.getKey();
buffer.append(innerDoubleIndent).append("name = '").append(aName.getNamespaceURI()).append(':").append(aName.getLocalPart());
buffer.append("', value = '").append(entry.getValue()).append('\'").append(PolicyUtils.Text.NEW_LINE);
}
buffer.append(innerIndent).append('}");
}
}
buffer.append(PolicyUtils.Text.NEW_LINE).append(indent).append('}");
return buffer;
|