Package org.glassfish.deployment.common
Class RootDeploymentDescriptor
java.lang.Object
java.util.Observable
org.glassfish.deployment.common.DynamicAttributesDescriptor
org.glassfish.deployment.common.Descriptor
org.glassfish.deployment.common.RootDeploymentDescriptor
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprotected ClassLoaderclass loader associated to this module to load classes contained in the archive fileprotected Map<Class<? extends RootDeploymentDescriptor>,List<RootDeploymentDescriptor>> Extensions for this module descriptor, keyed by type, indexed using the instance's indexprotected ModuleDescriptor<RootDeploymentDescriptor>contains the information for this module (like it's module name) -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new RootDeploymentDescriptorRootDeploymentDescriptor(String name, String description) Construct a new RootDeploymentDescriptor with a name and description -
Method Summary
Modifier and TypeMethodDescription<T extends RootDeploymentDescriptor>
voidaddExtensionDescriptor(Class<? extends RootDeploymentDescriptor> type, T instance, String index) abstract ClassLoaderabstract StringThis method returns all the extensions deployment descriptors in the scope<T extends RootDeploymentDescriptor>
TgetExtensionsDescriptors(Class<? extends RootDeploymentDescriptor> type, String index) This method returns one extension of the passed type in the scope with the right index<T extends RootDeploymentDescriptor>
Collection<T>getExtensionsDescriptors(Class<T> type) This method returns all extensions of the passed type in the scope<T extends RootDeploymentDescriptor>
ModuleDescriptor<T>abstract org.glassfish.api.deployment.archive.ArchiveTypegetName()abstract booleanabstract booleanisEmpty()Returns true if this root deployment descriptor does not describe anythingbooleanvoidprint(StringBuffer toStringBuffer) print a meaningful string for this objectvoidsetClassLoader(ClassLoader classLoader) Sets the class loader for this applicationvoidsetDisplayName(String name) sets the display name for this bundlevoidsetModuleDescriptor(ModuleDescriptor<RootDeploymentDescriptor> descriptor) Sets the module descriptor for this bundlefinal voidsetModuleID(String moduleID) each module is uniquely identified with a moduleIDvoidSets the name of this descriptor.voidsetSchemaLocation(String schemaLocation) voidsetSpecVersion(String specVersion) Sets the specification version of the deployment descriptorMethods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setSmallIconUri, visitMethods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toStringMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
classLoader
class loader associated to this module to load classes contained in the archive file -
extensions
Extensions for this module descriptor, keyed by type, indexed using the instance's index -
moduleDescriptor
contains the information for this module (like it's module name)
-
-
Constructor Details
-
RootDeploymentDescriptor
public RootDeploymentDescriptor()Construct a new RootDeploymentDescriptor -
RootDeploymentDescriptor
Construct a new RootDeploymentDescriptor with a name and description
-
-
Method Details
-
setModuleID
each module is uniquely identified with a moduleID- Parameters:
moduleID- for this module
-
getModuleID
- Returns:
- the module ID for this module descriptor
-
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
- Returns:
- the specification version of the deployment descriptor loaded by this descriptor
-
setSpecVersion
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
- Returns:
- the tracer visitor for this descriptor
-
setClassLoader
Sets the class loader for this application -
getClassLoader
- Returns:
- the class loader associated with this module
-
setDisplayName
sets the display name for this bundle- Overrides:
setDisplayNamein classDescriptor- Parameters:
name- the display name
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor- Returns:
- the display name
-
setName
Description copied from class:DescriptorSets the name of this descriptor.- Overrides:
setNamein classDescriptor- Parameters:
name- the new name of the descriptor.
-
getName
- Overrides:
getNamein classDescriptor- Returns:
- the name of this descriptor
-
setSchemaLocation
-
getSchemaLocation
-
getModuleDescriptor
- Returns:
- the module descriptor for this bundle
-
setModuleDescriptor
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
print a meaningful string for this object- Overrides:
printin classDescriptor
-
getExtensionsDescriptors
This method returns all the extensions deployment descriptors in the scope- Returns:
- an unmodifiable collection of extensions or empty collection if none.
-
getExtensionsDescriptors
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 typeindex- 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
- Returns:
- the main descriptor associated with it if it's an extension descriptor, otherwise return itself
-