Class ExtensionsArchivist
- java.lang.Object
-
- com.sun.enterprise.deployment.archivist.ExtensionsArchivist
-
- Direct Known Subclasses:
EjbInWarArchivist
,PersistenceArchivist
,WebServicesArchivist
@Contract public abstract class ExtensionsArchivist extends Object
An extension archivist is processing extensions deployment descriptors like web services, persistence or even EJB information within a war file. They do not represent a top level archivist, as it is not capable of loading BundleDescriptors directly but require a top level archivist to do so before they can process their own metadata- Author:
- Jerome Dochez
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ConfigurationDeploymentDescriptorFile>
confDDFiles
static Logger
deplLogger
protected DeploymentDescriptorFile
standardDD
-
Constructor Summary
Constructors Constructor Description ExtensionsArchivist()
-
Method Summary
-
-
-
Field Detail
-
deplLogger
public static final Logger deplLogger
-
standardDD
protected DeploymentDescriptorFile standardDD
-
confDDFiles
protected List<ConfigurationDeploymentDescriptorFile> confDDFiles
-
-
Method Detail
-
getStandardDDFile
public abstract DeploymentDescriptorFile getStandardDDFile(RootDeploymentDescriptor descriptor)
- Returns:
- the DeploymentDescriptorFile responsible for handling standard deployment descriptor
-
getConfigurationDDFiles
public abstract List<ConfigurationDeploymentDescriptorFile> getConfigurationDDFiles(RootDeploymentDescriptor descriptor)
- Returns:
- the list of the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors
-
getConfigurationDDFile
public ConfigurationDeploymentDescriptorFile getConfigurationDDFile(Archivist main, RootDeploymentDescriptor descriptor, ReadableArchive archive) throws IOException
- Returns:
- if exists the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors
- Throws:
IOException
-
supportsModuleType
public abstract boolean supportsModuleType(ArchiveType moduleType)
- Parameters:
the
- moduleType- Returns:
- whether this extension archivist supports this module type
-
getDefaultDescriptor
public abstract <T extends RootDeploymentDescriptor> T getDefaultDescriptor()
- Returns:
- a default Descriptor for this archivist
-
getScanner
public ModuleScanner getScanner()
Returns the scanner for this archivist
-
addExtension
public <T extends RootDeploymentDescriptor> void addExtension(RootDeploymentDescriptor root, RootDeploymentDescriptor extension)
Add the extension descriptor to the main descriptor- Parameters:
root
- the main descriptorextension
- the extension descriptor
-
open
public Object open(Archivist main, ReadableArchive archive, RootDeploymentDescriptor descriptor) throws IOException, SAXParseException
Read the standard deployment descriptor of the extension- Parameters:
archivist
- the primary archivist for this archivearchive
- the archivedescriptor
- the main deployment descriptor- Returns:
- the extension descriptor object
- Throws:
IOException
SAXParseException
-
readRuntimeDeploymentDescriptor
public Object readRuntimeDeploymentDescriptor(Archivist main, ReadableArchive archive, RootDeploymentDescriptor descriptor) throws IOException, SAXParseException
Read the runtime deployment descriptors of the extension- Parameters:
archivist
- the primary archivist for this archivearchive
- the archivedescriptor
- the extension deployment descriptor- Returns:
- the extension descriptor object with additional runtime information
- Throws:
IOException
SAXParseException
-
writeDeploymentDescriptors
public void writeDeploymentDescriptors(Archivist main, BundleDescriptor descriptor, ReadableArchive in, WritableArchive out) throws IOException
writes the deployment descriptors (standard and runtime) to a JarFile using the right deployment descriptor path- Parameters:
in
- the input archiveout
- the abstract archive file to write to- Throws:
IOException
-
writeStandardDeploymentDescriptors
public void writeStandardDeploymentDescriptors(Archivist main, BundleDescriptor descriptor, WritableArchive out) throws IOException
writes the standard deployment descriptors to an abstract archive- Parameters:
out
- archive to write to- Throws:
IOException
-
writeRuntimeDeploymentDescriptors
public void writeRuntimeDeploymentDescriptors(Archivist main, BundleDescriptor descriptor, ReadableArchive in, WritableArchive out) throws IOException
writes the runtime deployment descriptors to an abstract archive- Parameters:
in
- the input archiveout
- output archive- Throws:
IOException
-
-