Class RootDeploymentDescriptor

All Implemented Interfaces:
Serializable

public abstract class RootDeploymentDescriptor extends Descriptor
This descriptor contains all common information amongst root element of the J2EE Deployment Descriptors (application, ejb-jar, web-app, connector...).
Author:
Jerome Dochez
See Also:
  • Field Details

  • Constructor Details

    • RootDeploymentDescriptor

      public RootDeploymentDescriptor()
      Construct a new RootDeploymentDescriptor
    • RootDeploymentDescriptor

      public RootDeploymentDescriptor(String name, String description)
      Construct a new RootDeploymentDescriptor with a name and description
  • Method Details

    • setModuleID

      public final void setModuleID(String moduleID)
      each module is uniquely identified with a moduleID
      Parameters:
      moduleID - for this module
    • getModuleID

      public String getModuleID()
      Returns:
      the module ID for this module descriptor
    • getDefaultSpecVersion

      public abstract String getDefaultSpecVersion()
      Returns:
      the default version of the deployment descriptor loaded by this descriptor
    • isEmpty

      public abstract boolean isEmpty()
      Returns true if this root deployment descriptor does not describe anything
      Returns:
      true if this root descriptor is empty
    • getSpecVersion

      public String getSpecVersion()
      Returns:
      the specification version of the deployment descriptor loaded by this descriptor
    • setSpecVersion

      public void setSpecVersion(String specVersion)
      Sets the specification version of the deployment descriptor
      Parameters:
      specVersion - version number
    • getModuleType

      public abstract org.glassfish.api.deployment.archive.ArchiveType getModuleType()
      Returns:
      the module type for this bundle descriptor
    • getTracerVisitor

      public DescriptorVisitor getTracerVisitor()
      Returns:
      the tracer visitor for this descriptor
    • setClassLoader

      public void setClassLoader(ClassLoader classLoader)
      Sets the class loader for this application
    • getClassLoader

      public abstract ClassLoader getClassLoader()
      Returns:
      the class loader associated with this module
    • setDisplayName

      public void setDisplayName(String name)
      sets the display name for this bundle
      Overrides:
      setDisplayName in class Descriptor
      Parameters:
      name - the display name
    • getDisplayName

      public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor
      Returns:
      the display name
    • setName

      public void setName(String name)
      Description copied from class: Descriptor
      Sets the name of this descriptor.
      Overrides:
      setName in class Descriptor
      Parameters:
      name - the new name of the descriptor.
    • getName

      public String getName()
      Description copied from class: Descriptor
      The name of this descriptor as a String.
      Overrides:
      getName in class Descriptor
      Returns:
      the name of this descriptor
    • setSchemaLocation

      public void setSchemaLocation(String schemaLocation)
    • getSchemaLocation

      public String getSchemaLocation()
    • getModuleDescriptor

      public <T extends RootDeploymentDescriptor> ModuleDescriptor<T> getModuleDescriptor()
      Returns:
      the module descriptor for this bundle
    • setModuleDescriptor

      public void setModuleDescriptor(ModuleDescriptor<RootDeploymentDescriptor> descriptor)
      Sets the module descriptor for this bundle
      Parameters:
      descriptor - for the module
    • isApplication

      public abstract boolean isApplication()
      Returns:
      true if this module is an application object
    • print

      public void print(StringBuffer toStringBuffer)
      print a meaningful string for this object
      Overrides:
      print in class Descriptor
    • getExtensionsDescriptors

      public Collection<RootDeploymentDescriptor> getExtensionsDescriptors()
      This method returns all the extensions deployment descriptors in the scope
      Returns:
      an unmodifiable collection of extensions or empty collection if none.
    • getExtensionsDescriptors

      public <T extends RootDeploymentDescriptor> Collection<T> getExtensionsDescriptors(Class<T> type)
      This method returns all extensions of the passed type in the scope
      Parameters:
      type - requested extension type
      Returns:
      an unmodifiable collection of extensions or empty collection if none.
    • getExtensionsDescriptors

      public <T extends RootDeploymentDescriptor> T getExtensionsDescriptors(Class<? extends RootDeploymentDescriptor> type, String index)
      This method returns one extension of the passed type in the scope with the right index
      Parameters:
      type - requested extension type
      index - is the instance index
      Returns:
      an unmodifiable collection of extensions or empty collection if none.
    • addExtensionDescriptor

      public <T extends RootDeploymentDescriptor> void addExtensionDescriptor(Class<? extends RootDeploymentDescriptor> type, T instance, String index)
    • isExtensionDescriptor

      public boolean isExtensionDescriptor()
      Returns:
      whether this descriptor is an extension descriptor of a main descriptor, e.g. the EjbBundleDescriptor for ejb in war case should return true.
    • getMainDescriptor

      public RootDeploymentDescriptor getMainDescriptor()
      Returns:
      the main descriptor associated with it if it's an extension descriptor, otherwise return itself