MessageSecurityNodepublic class MessageSecurityNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode This node handles message-security element |
Fields Summary |
---|
com.sun.enterprise.deployment.runtime.common.MessageSecurityDescriptor | descriptor |
Constructors Summary |
---|
public MessageSecurityNode()
registerElementHandler(new XMLElement(
WebServicesTagNames.MESSAGE), MessageNode.class,
"addMessageDescriptor");
registerElementHandler(new XMLElement(
WebServicesTagNames.REQUEST_PROTECTION), ProtectionNode.class,
"setRequestProtectionDescriptor");
registerElementHandler(new XMLElement(
WebServicesTagNames.RESPONSE_PROTECTION), ProtectionNode.class,
"setResponseProtectionDescriptor");
|
Methods Summary |
---|
public java.lang.Object | getDescriptor()
if (descriptor == null) {
descriptor = new MessageSecurityDescriptor();
}
return descriptor;
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.common.MessageSecurityDescriptor messageSecurityDesc)write the descriptor class to a DOM tree and return it
Node messageSecurityNode = super.writeDescriptor(parent, nodeName,
messageSecurityDesc);
ArrayList messageDescs =
messageSecurityDesc.getMessageDescriptors();
if (!messageDescs.isEmpty()) {
MessageNode messageNode = new MessageNode();
for (Iterator messageIterator = messageDescs.iterator();
messageIterator.hasNext();) {
MessageDescriptor messageDesc =
(MessageDescriptor) messageIterator.next();
messageNode.writeDescriptor(messageSecurityNode,
WebServicesTagNames.MESSAGE, messageDesc);
}
}
// request-protection
ProtectionDescriptor requestProtectionDesc =
messageSecurityDesc.getRequestProtectionDescriptor();
if (requestProtectionDesc != null) {
ProtectionNode requestProtectionNode = new ProtectionNode();
requestProtectionNode.writeDescriptor(messageSecurityNode,
WebServicesTagNames.REQUEST_PROTECTION, requestProtectionDesc);
}
// response-protection
ProtectionDescriptor responseProtectionDesc =
messageSecurityDesc.getResponseProtectionDescriptor();
if (responseProtectionDesc != null) {
ProtectionNode responseProtectionNode = new ProtectionNode();
responseProtectionNode.writeDescriptor(messageSecurityNode,
WebServicesTagNames.RESPONSE_PROTECTION,
responseProtectionDesc);
}
return messageSecurityNode;
|
|