FileDocCategorySizeDatePackage
DisplayableComponentNode.javaAPI DocGlassfish v2 API4103Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.node

DisplayableComponentNode

public abstract class DisplayableComponentNode extends DeploymentDescriptorNode
This node class is responsible for handling all the information related to displayable elements like display-name or icons.
author
Jerome Dochez
version

Fields Summary
Constructors Summary
public DisplayableComponentNode()

        super();
        registerElementHandler(new XMLElement(TagNames.NAME), LocalizedInfoNode.class);       
        registerElementHandler(new XMLElement(TagNames.ICON), IconNode.class);           
        registerElementHandler(new XMLElement(TagNames.SMALL_ICON), IconNode.class);           
        registerElementHandler(new XMLElement(TagNames.LARGE_ICON), IconNode.class);           
    
Methods Summary
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor 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

        Node node = super.writeDescriptor(parent, descriptor);        
        
        // description, display-name, icons...
        writeDisplayableComponentInfo(node, descriptor);
        return node;
    
protected voidwriteDisplayableComponentInfo(org.w3c.dom.Node node, com.sun.enterprise.deployment.Descriptor descriptor)
write the localized descriptions, display-names and icons info

param
the node to write the info to
param
the descriptor containing the displayable information

        LocalizedNode localizedNode = new LocalizedNode();
        localizedNode.writeLocalizedMap(node, TagNames.DESCRIPTION, descriptor.getLocalizedDescriptions());
        localizedNode.writeLocalizedMap(node, TagNames.NAME, descriptor.getLocalizedDisplayNames());
        IconNode iconNode = new IconNode();
        iconNode.writeLocalizedInfo(node, descriptor);