FileDocCategorySizeDatePackage
MessageSecurityNode.javaAPI DocGlassfish v2 API5435Fri May 04 22:31:46 BST 2007com.sun.enterprise.deployment.node.runtime.common

MessageSecurityNode

public 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.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

       if (descriptor == null) {
            descriptor = new MessageSecurityDescriptor();
        }
        return descriptor;
    
public org.w3c.dom.NodewriteDescriptor(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

param
parent node for the DOM tree
param
node name for
param
the descriptor to write
return
the DOM tree top node

    
        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;