Search in sources :

Example 1 with ResourceEnvReferenceContainer

use of com.sun.enterprise.deployment.types.ResourceEnvReferenceContainer in project Payara by payara.

the class ResourceEnvDescriptionNode method writeDescriptors.

/**
 * write all occurrences of the descriptor corresponding to the current
 * node from the parent descriptor to an JAXP DOM node and return it
 *
 * This API will be invoked by the parent node when the parent node
 * writes out a mix of statically and dynamically registered sub nodes.
 *
 * This method should be overriden by the sub classes if it
 * needs to be called by the parent node.
 *
 * @param parent node in the DOM tree
 * @param nodeName the name of the node
 * @param parentDesc parent descriptor of the descriptor to be written
 * @return the JAXP DOM node
 */
@Override
public Node writeDescriptors(Node parent, String nodeName, Descriptor parentDesc) {
    if (parentDesc instanceof ResourceEnvReferenceContainer) {
        ResourceEnvReferenceContainer resourceEnvReferenceContainer = (ResourceEnvReferenceContainer) parentDesc;
        // resource-env-description*
        Set<ResourceEnvReferenceDescriptor> resourceEnvReferenceDescriptors = resourceEnvReferenceContainer.getResourceEnvReferenceDescriptors();
        for (ResourceEnvReferenceDescriptor resourceEnvReferenceDescriptor : resourceEnvReferenceDescriptors) {
            writeDescriptor(parent, nodeName, resourceEnvReferenceDescriptor);
        }
    }
    return parent;
}
Also used : ResourceEnvReferenceDescriptor(com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor) ResourceEnvReferenceContainer(com.sun.enterprise.deployment.types.ResourceEnvReferenceContainer)

Aggregations

ResourceEnvReferenceDescriptor (com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor)1 ResourceEnvReferenceContainer (com.sun.enterprise.deployment.types.ResourceEnvReferenceContainer)1