FileDocCategorySizeDatePackage
JavaWebStartAccessNode.javaAPI DocGlassfish v2 API5089Fri May 04 22:31:42 BST 2007com.sun.enterprise.deployment.node.runtime

JavaWebStartAccessNode

public class JavaWebStartAccessNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
author
tjquinn

Fields Summary
protected com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor
descriptor
Constructors Summary
public JavaWebStartAccessNode()
Creates a new instance of JavaWebStartAccessNode

    
Methods Summary
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

	if (descriptor==null) {
	    descriptor = new JavaWebStartAccessDescriptor();
            XMLNode parentNode = getParentNode();
            if (parentNode != null && (parentNode instanceof AppClientRuntimeNode)) {
                Object parentDescriptor = parentNode.getDescriptor();
                if (parentDescriptor != null && (parentDescriptor instanceof ApplicationClientDescriptor) ) {
                    ApplicationClientDescriptor acDescriptor = (ApplicationClientDescriptor) parentDescriptor;
                    acDescriptor.setJavaWebStartAccessDescriptor(descriptor);
                }
                
            }
	} 
	return descriptor;
    
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(RuntimeTagNames.CONTEXT_ROOT, "setContextRoot");
        table.put(RuntimeTagNames.ELIGIBLE, "setEligible");
        table.put(RuntimeTagNames.VENDOR, "setVendor");
        return table;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor descr)
write the descriptor class to a DOM tree and return it

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

    
	Node accessNode = super.writeDescriptor(parent, nodeName, descr);
        appendTextChild(accessNode, RuntimeTagNames.CONTEXT_ROOT, descr.getContextRoot());
        appendTextChild(accessNode, RuntimeTagNames.ELIGIBLE, Boolean.toString(descr.isEligible()));
        appendTextChild(accessNode, RuntimeTagNames.VENDOR, descr.getVendor());

	return accessNode;
    
public static voidwriteJavaWebStartInfo(org.w3c.dom.Node parent, com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor descr)

        if (descr != null) {
            JavaWebStartAccessNode newNode = new JavaWebStartAccessNode();
            newNode.writeDescriptor(parent, RuntimeTagNames.JAVA_WEB_START_ACCESS, descr);
        }