FileDocCategorySizeDatePackage
RuntimeDDFileFactory.javaAPI DocGlassfish v2 API3314Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.io.runtime

RuntimeDDFileFactory

public class RuntimeDDFileFactory extends Object
Factory for runtime DeploymentDescriptorFile implementations
author
Jerome Dochez

Fields Summary
Constructors Summary
private RuntimeDDFileFactory()
no instance necessary for this factory

    
Methods Summary
public static com.sun.enterprise.deployment.io.DeploymentDescriptorFilegetDDFileFor(RootDeploymentDescriptor descriptor)
Creates and return an appropriate DeploymentDescriptorFile capable of handling the passed descriptor

param
descriptor used to identify the associated DeploymentDescriptorFile
return
the created DeploymentDescriptorFile

        if (descriptor instanceof Application) {
            return new ApplicationRuntimeDDFile();
        }
        if (descriptor instanceof EjbBundleDescriptor) {
            return new EjbRuntimeDDFile();
        }
        if (descriptor instanceof WebBundleDescriptor) {
            return new WebRuntimeDDFile();
        }
        if (descriptor instanceof ConnectorDescriptor) {
            return new ConnectorRuntimeDDFile();
        } 
        if (descriptor instanceof ApplicationClientDescriptor) {
            return new AppClientRuntimeDDFile();
        }
        return null;