MessageSecurityBindingNodepublic class MessageSecurityBindingNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode This node handles message-security-binding element |
Fields Summary |
---|
com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor | descriptor |
Constructors Summary |
---|
public MessageSecurityBindingNode()
registerElementHandler(new XMLElement(
WebServicesTagNames.MESSAGE_SECURITY), MessageSecurityNode.class,
"addMessageSecurityDescriptor");
|
Methods Summary |
---|
public java.lang.Object | getDescriptor()
if (descriptor == null) {
descriptor = new MessageSecurityBindingDescriptor();
}
return descriptor;
| protected boolean | setAttributeValue(com.sun.enterprise.deployment.node.XMLElement elementName, com.sun.enterprise.deployment.node.XMLElement attributeName, java.lang.String value)parsed an attribute of an element
if (attributeName.getQName().equals(WebServicesTagNames.AUTH_LAYER)) {
descriptor.setAttributeValue(descriptor.AUTH_LAYER, value);
return true;
} else if (attributeName.getQName().equals(
WebServicesTagNames.PROVIDER_ID)) {
descriptor.setAttributeValue(descriptor.PROVIDER_ID, value);
return true;
}
return false;
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor messageSecurityBindingDesc)write the descriptor class to a DOM tree and return it
Element messageSecurityBindingNode = (Element)super.writeDescriptor(parent, nodeName, messageSecurityBindingDesc);
// message-security
ArrayList messageSecDescs =
messageSecurityBindingDesc.getMessageSecurityDescriptors();
if (!messageSecDescs.isEmpty()) {
MessageSecurityNode messageSecurityNode =
new MessageSecurityNode();
for (Iterator messageSecIterator = messageSecDescs.iterator();
messageSecIterator.hasNext();) {
MessageSecurityDescriptor messageSecDesc =
(MessageSecurityDescriptor) messageSecIterator.next();
messageSecurityNode.writeDescriptor(messageSecurityBindingNode, WebServicesTagNames.MESSAGE_SECURITY, messageSecDesc);
}
}
// auth-layer
if (messageSecurityBindingDesc.getAttributeValue(
messageSecurityBindingDesc.AUTH_LAYER) != null) {
setAttribute(messageSecurityBindingNode, WebServicesTagNames.AUTH_LAYER, messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.AUTH_LAYER));
}
// provider-id
if (messageSecurityBindingDesc.getAttributeValue(
messageSecurityBindingDesc.PROVIDER_ID) != null) {
setAttribute(messageSecurityBindingNode, WebServicesTagNames.PROVIDER_ID, messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.PROVIDER_ID));
}
return messageSecurityBindingNode;
|
|