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 StringgetArchiveExtension()List<ConfigurationDeploymentDescriptorFile>getConfigurationDDFiles()WebBundleDescriptorImplgetDefaultBundleDescriptor()protected URLgetDefaultWebXML()Obtains the location of default-web.xml.WebBundleDescriptorImplgetDefaultWebXmlBundleDescriptor()Vector<String>getLibraries(Archive archive)ArchiveTypegetModuleType()DeploymentDescriptorFile<WebBundleDescriptorImpl>getStandardDDFile()protected voidpostAnnotationProcess(WebBundleDescriptorImpl descriptor, ReadableArchive archive)perform any action after annotation processedprotected booleanpostHandles(ReadableArchive abstractArchive)In the case of web archive, the super handles() method should be able to make a unique identification.protected voidpostOpen(WebBundleDescriptorImpl descriptor, ReadableArchive archive)perform any post deployment descriptor reading actionprotected voidpostStandardDDsRead(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.voidsetDescriptor(Application descriptor)Archivist read XML deployment descriptors and keep the parsed result in the DOL descriptor instances.voidvalidate(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:
getModuleTypein 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:
getStandardDDFilein classArchivist<WebBundleDescriptorImpl>- Returns:
- the DeploymentDescriptorFile responsible for handling standard deployment descriptor
-
getConfigurationDDFiles
public List<ConfigurationDeploymentDescriptorFile> getConfigurationDDFiles()
- Specified by:
getConfigurationDDFilesin classArchivist<WebBundleDescriptorImpl>- Returns:
- the list of the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors
-
getDefaultBundleDescriptor
public WebBundleDescriptorImpl getDefaultBundleDescriptor()
- Specified by:
getDefaultBundleDescriptorin 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:
postStandardDDsReadin 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:
postOpenin 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:
validatein 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:
postHandlesin classArchivist<WebBundleDescriptorImpl>- Returns:
- true if the archivist is handling the provided archive
- Throws:
IOException
-
getArchiveExtension
protected String getArchiveExtension()
- Specified by:
getArchiveExtensionin classArchivist<WebBundleDescriptorImpl>- Returns:
- The archive extension handled by a specific archivist
-
getLibraries
public Vector<String> getLibraries(Archive archive)
- Overrides:
getLibrariesin 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:Archivistperform any action after annotation processed- Overrides:
postAnnotationProcessin classArchivist<WebBundleDescriptorImpl>- Parameters:
descriptor- the deployment descriptor for the modulearchive- the module archive- Throws:
IOException
-
-