Class WebArchivist
- java.lang.Object
-
- com.sun.enterprise.deployment.archivist.Archivist<WebBundleDescriptorImpl>
-
- org.glassfish.web.deployment.archivist.WebArchivist
-
- Direct Known Subclasses:
EmbeddedWebArchivist
@Service @PerLookup public class WebArchivist extends Archivist<WebBundleDescriptorImpl>
This module is responsible for reading and write web applications archive files (war).- Version:
- Author:
- Jerome Dochez
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.archivist.Archivist
annotationProcessingRequested, APPCLIENT_EXTENSION, APPLICATION_EXTENSION, classLoader, confDDFiles, CONNECTOR_EXTENSION, descriptor, EJB_EXTENSION, extensionsArchivists, habitat, handleRuntimeInfo, locator, manifest, MANIFEST_VERSION_VALUE, path, standardDD, UPLOAD_EXTENSION, WEB_EXTENSION, WEB_FRAGMENT_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description WebArchivist()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getArchiveExtension()
List<ConfigurationDeploymentDescriptorFile>
getConfigurationDDFiles()
WebBundleDescriptorImpl
getDefaultBundleDescriptor()
protected URL
getDefaultWebXML()
Obtains the location of default-web.xml.WebBundleDescriptorImpl
getDefaultWebXmlBundleDescriptor()
Vector<String>
getLibraries(Archive archive)
ArchiveType
getModuleType()
DeploymentDescriptorFile<WebBundleDescriptorImpl>
getStandardDDFile()
protected void
postAnnotationProcess(WebBundleDescriptorImpl descriptor, ReadableArchive archive)
perform any action after annotation processedprotected boolean
postHandles(ReadableArchive abstractArchive)
In the case of web archive, the super handles() method should be able to make a unique identification.protected void
postOpen(WebBundleDescriptorImpl descriptor, ReadableArchive archive)
perform any post deployment descriptor reading actionprotected void
postStandardDDsRead(WebBundleDescriptorImpl descriptor, ReadableArchive archive, Map<ExtensionsArchivist,RootDeploymentDescriptor> extensions)
After reading all the standard deployment descriptors, merge any resource descriptors from EJB descriptors into the WebBundleDescriptor.void
setDescriptor(Application descriptor)
Archivist read XML deployment descriptors and keep the parsed result in the DOL descriptor instances.void
validate(ClassLoader aClassLoader)
validates the DOL Objects associated with this archivist, usually it requires that a class loader being set on this archivist or passed as a parameter-
Methods inherited from class com.sun.enterprise.deployment.archivist.Archivist
addFileToArchive, copyAnEntry, copyExtraElements, copyInto, copyInto, copyInto, copyInto, copyInto, copyJarElements, copyStandardDeploymentDescriptors, createModuleDescriptor, getAllWebservicesDeploymentDescriptorPaths, getAnnotationErrorHandler, getClassLoader, getClassPath, getDeploymentDescriptorPath, getDescriptor, getExtensionArchivists, getListOfFilesToSkip, getManifest, getPath, getRuntimeDeploymentDescriptorPath, getRuntimeXMLValidation, getRuntimeXMLValidationLevel, getScanner, getTempFile, getTempFile, getUniqueEntryFilenameFor, getXMLValidation, getXMLValidationLevel, handles, hasRuntimeDeploymentDescriptor, hasStandardDeploymentDescriptor, initializeContext, isAnnotationProcessingRequested, isHandlingRuntimeInfo, isProcessAnnotation, open, open, open, open, open, open, openWith, performOptionalPkgDependenciesCheck, postRuntimeDDsRead, postValidate, printDescriptor, processAnnotations, processAnnotations, readAnnotations, readAnnotations, readMetaInfo, readRuntimeDeploymentDescriptor, readRuntimeDeploymentDescriptor, readStandardDeploymentDescriptor, renameTmp, setAnnotationErrorHandler, setAnnotationProcessingRequested, setArchiveUri, setClassLoader, setClassPath, setDescriptor, setExtensionArchivists, setHandleRuntimeInfo, setManifest, setModuleDescriptor, setRuntimeXMLValidation, setRuntimeXMLValidationLevel, setXMLValidation, setXMLValidationLevel, write, write, write, write, writeContents, writeContents, writeContents, writeDeploymentDescriptors, writeExtensionDeploymentDescriptors, writeRuntimeDeploymentDescriptors, writeStandardDeploymentDescriptors
-
-
-
-
Method Detail
-
getModuleType
public ArchiveType getModuleType()
- Specified by:
getModuleType
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- the module type handled by this archivist as defined in the application DTD
-
setDescriptor
public void setDescriptor(Application descriptor)
Archivist read XML deployment descriptors and keep the parsed result in the DOL descriptor instances. Sets the descriptor for a particular Archivst type
-
getStandardDDFile
public DeploymentDescriptorFile<WebBundleDescriptorImpl> getStandardDDFile()
- Specified by:
getStandardDDFile
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- the DeploymentDescriptorFile responsible for handling standard deployment descriptor
-
getConfigurationDDFiles
public List<ConfigurationDeploymentDescriptorFile> getConfigurationDDFiles()
- Specified by:
getConfigurationDDFiles
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- the list of the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors
-
getDefaultBundleDescriptor
public WebBundleDescriptorImpl getDefaultBundleDescriptor()
- Specified by:
getDefaultBundleDescriptor
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- a default BundleDescriptor for this archivist
-
getDefaultWebXmlBundleDescriptor
public WebBundleDescriptorImpl getDefaultWebXmlBundleDescriptor()
- Returns:
- a validated WebBundleDescriptor corresponding to default-web.xml that can be used in webtier.
-
postStandardDDsRead
protected void postStandardDDsRead(WebBundleDescriptorImpl descriptor, ReadableArchive archive, Map<ExtensionsArchivist,RootDeploymentDescriptor> extensions) throws IOException
After reading all the standard deployment descriptors, merge any resource descriptors from EJB descriptors into the WebBundleDescriptor.- Overrides:
postStandardDDsRead
in classArchivist<WebBundleDescriptorImpl>
- Parameters:
descriptor
- the deployment descriptor for the modulearchive
- the module archiveextensions
- map of extension archivists- Throws:
IOException
-
getDefaultWebXML
protected URL getDefaultWebXML() throws IOException
Obtains the location of default-web.xml. This allows subclasses to load the file from elsewhere.- Returns:
- null if not found, in which case the default web.xml will not be read and web.xml in the applications need to have everything.
- Throws:
IOException
-
postOpen
protected void postOpen(WebBundleDescriptorImpl descriptor, ReadableArchive archive) throws IOException
perform any post deployment descriptor reading action- Overrides:
postOpen
in classArchivist<WebBundleDescriptorImpl>
- Parameters:
descriptor
- the deployment descriptor for the modulearchive
- the module archive- Throws:
IOException
-
validate
public void validate(ClassLoader aClassLoader)
validates the DOL Objects associated with this archivist, usually it requires that a class loader being set on this archivist or passed as a parameter- Overrides:
validate
in classArchivist<WebBundleDescriptorImpl>
-
postHandles
protected boolean postHandles(ReadableArchive abstractArchive) throws IOException
In the case of web archive, the super handles() method should be able to make a unique identification. If not, then the archive is definitely not a war.- Specified by:
postHandles
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- true if the archivist is handling the provided archive
- Throws:
IOException
-
getArchiveExtension
protected String getArchiveExtension()
- Specified by:
getArchiveExtension
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- The archive extension handled by a specific archivist
-
getLibraries
public Vector<String> getLibraries(Archive archive)
- Overrides:
getLibraries
in classArchivist<WebBundleDescriptorImpl>
- Returns:
- a list of libraries included in the archivist
-
postAnnotationProcess
protected void postAnnotationProcess(WebBundleDescriptorImpl descriptor, ReadableArchive archive) throws IOException
Description copied from class:Archivist
perform any action after annotation processed- Overrides:
postAnnotationProcess
in classArchivist<WebBundleDescriptorImpl>
- Parameters:
descriptor
- the deployment descriptor for the modulearchive
- the module archive- Throws:
IOException
-
-