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

RuntimeDescriptorNode

public class RuntimeDescriptorNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
Superclass for all the runtime descriptor nodes
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        
        if (abstractDescriptor==null) {
	    abstractDescriptor = RuntimeDescriptorFactory.getDescriptor(getXMLPath());
            if (abstractDescriptor ==null) {
                return getParentNode().getDescriptor();
            }
        }
        return abstractDescriptor;
    
public voidsetElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)
receives notification of the value for a particular tag

param
element the xml element
param
value it's associated value

	if (getDispatchTable().containsKey(element.getQName())) {
	    super.setElementValue(element, value);
	} else {
	    Object o = getDescriptor();
	    if (o instanceof RuntimeDescriptor) {
		RuntimeDescriptor rd = (RuntimeDescriptor) o;
		rd.setValue(element.getQName(), value);
	    } else {
                DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
                    new Object[]{element.getQName() , value });
            }
	}
    
public static voidwriteCommonComponentInfo(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)
writes all information common to all J2EE components

param
xml node parent to add the info to
param
the descriptor

        if (descriptor instanceof EjbReferenceContainer) {
            EjbRefNode.writeEjbReferences(parent, (EjbReferenceContainer) descriptor);
        }	
        if (descriptor instanceof ResourceReferenceContainer) {
            ResourceRefNode.writeResourceReferences(parent, (ResourceReferenceContainer) descriptor);
        }
        if (descriptor instanceof ResourceEnvReferenceContainer) {
            ResourceEnvRefNode.writeResoureEnvReferences(parent, (ResourceEnvReferenceContainer) descriptor);
        }
        if( descriptor instanceof JndiNameEnvironment ) {
            ServiceRefNode.writeServiceReferences
                (parent, (JndiNameEnvironment) descriptor);
        }
        if (descriptor instanceof MessageDestinationReferenceContainer) {
            MessageDestinationRefNode.writeMessageDestinationReferences(parent, 
                (MessageDestinationReferenceContainer) descriptor);
        }
    
public static voidwriteMessageDestinationInfo(org.w3c.dom.Node parent, com.sun.enterprise.deployment.BundleDescriptor descriptor)

        for(Iterator iter = descriptor.getMessageDestinations().iterator();
            iter.hasNext();) {
            MessageDestinationRuntimeNode node = 
                new MessageDestinationRuntimeNode();
            node.writeDescriptor(parent, RuntimeTagNames.MESSAGE_DESTINATION,
                                 (MessageDestinationDescriptor) iter.next());
        }