FileDocCategorySizeDatePackage
SecurityPermissionNode.javaAPI DocGlassfish v2 API4386Fri May 04 22:31:40 BST 2007com.sun.enterprise.deployment.node.connector

SecurityPermissionNode

public class SecurityPermissionNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This node is responsible for handling the Connector DTD related security-permission XML tag
author
Sheetal Vartak
version

Fields Summary
Constructors Summary
Methods Summary
protected java.util.MapgetDispatchTable()
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.

return
the map with the element name as a key, the setter method as a value

    
        Map table = super.getDispatchTable();
        table.put(ConnectorTagNames.SECURITY_PERMISSION_SPEC, "setPermission");
	return table;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.ConnectorDescriptor descriptor)
write the descriptor class to a DOM tree and return it

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


	Iterator secPerms = descriptor.getSecurityPermissions().iterator();

	//auth mechanism info
	for (;secPerms.hasNext();) {

	    //for (Iterator secPerms = ((OutboundResourceAdapter)descriptor).getSecurityPermissions().iterator(); secPerms.hasNext();) {
	    SecurityPermission secPerm = (SecurityPermission) secPerms.next();
	    Node secNode = appendChild(parent, ConnectorTagNames.SECURITY_PERMISSION);
            writeLocalizedDescriptions(secNode, secPerm);        
            appendTextChild(secNode, ConnectorTagNames.SECURITY_PERMISSION_SPEC, secPerm.getPermission());  
	}
	return null;