com.sun.enterprise.deployment.archivist
Class WebArchivist

java.lang.Object
  extended by com.sun.enterprise.deployment.archivist.Archivist<WebBundleDescriptor>
      extended by com.sun.enterprise.deployment.archivist.WebArchivist

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class WebArchivist
extends Archivist<WebBundleDescriptor>

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, CONNECTOR_EXTENSION, descriptor, EJB_EXTENSION, handleRuntimeInfo, logger, manifest, MANIFEST_VERSION_VALUE, path, UPLOAD_EXTENSION, WEB_EXTENSION, WEB_FRAGMENT_EXTENSION
 
Constructor Summary
WebArchivist()
           
 
Method Summary
protected  java.lang.String getArchiveExtension()
           
 DeploymentDescriptorFile getConfigurationDDFile()
           
 WebBundleDescriptor getDefaultBundleDescriptor()
           
protected  java.net.URL getDefaultWebXML()
          Obtains the location of default-web.xml.
 WebBundleDescriptor getDefaultWebXmlBundleDescriptor()
           
 java.util.Vector getLibraries(Archive archive)
           
 XModuleType getModuleType()
           
 DeploymentDescriptorFile<WebBundleDescriptor> getStandardDDFile()
           
 DeploymentDescriptorFile getSunConfigurationDDFile()
           
 java.lang.String getWebServicesDeploymentDescriptorPath()
           
 DeploymentDescriptorFile getWLConfigurationDDFile()
           
protected  void postAnnotationProcess(WebBundleDescriptor descriptor, ReadableArchive archive)
          perform any action after annotation processed
protected  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(WebBundleDescriptor descriptor, ReadableArchive archive)
          perform any post deployment descriptor reading action
protected  void postStandardDDsRead(WebBundleDescriptor descriptor, ReadableArchive archive, java.util.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(java.lang.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, applyRuntimeInfo, containsRuntimeDeploymentDescriptors, copyAnEntry, copyExtraElements, copyInto, copyInto, copyInto, copyInto, copyInto, copyJarElements, copyStandardDeploymentDescriptors, createModuleDescriptor, extractEntry, getAnnotationErrorHandler, getClassLoader, getClassPath, getDeploymentDescriptorPath, getDescriptor, getListOfFilesToSkip, getManifest, getPath, getRuntimeDeploymentDescriptorPath, getRuntimeXMLValidation, getRuntimeXMLValidationLevel, getScanner, getTempFile, getTempFile, getUniqueEntryFilenameFor, getWebServicesDDFile, getXMLValidation, getXMLValidationLevel, handles, hasRuntimeDeploymentDescriptor, hasStandardDeploymentDescriptor, initializeContext, isAnnotationProcessingRequested, isHandlingRuntimeInfo, isProcessAnnotation, open, open, open, open, open, open, openWith, performOptionalPkgDependenciesCheck, postRuntimeDDsRead, printDescriptor, processAnnotations, processAnnotations, readAnnotations, readAnnotations, readMetaInfo, readRuntimeDDFromDeploymentPlan, readRuntimeDDFromDeploymentPlan, readRuntimeDeploymentDescriptor, readRuntimeDeploymentDescriptor, readStandardDeploymentDescriptor, renameTmp, saveRuntimeInfo, setAnnotationErrorHandler, setAnnotationProcessingRequested, setArchiveUri, setClassLoader, setClassPath, setDescriptor, setHandleRuntimeInfo, setManifest, setModuleDescriptor, setRuntimeXMLValidation, setRuntimeXMLValidationLevel, setXMLValidation, setXMLValidationLevel, supportsModuleType, write, write, write, write, writeContents, writeContents, writeContents, writeDeploymentDescriptors, writeExtraDeploymentDescriptors, writeRuntimeDeploymentDescriptors, writeRuntimeDeploymentDescriptors, writeStandardDeploymentDescriptors, writeStandardDeploymentDescriptors, writeWebServicesDescriptors, writeWLRuntimeDeploymentDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebArchivist

public WebArchivist()
Method Detail

getModuleType

public XModuleType getModuleType()
Specified by:
getModuleType in class Archivist<WebBundleDescriptor>
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


getWebServicesDeploymentDescriptorPath

public java.lang.String getWebServicesDeploymentDescriptorPath()
Overrides:
getWebServicesDeploymentDescriptorPath in class Archivist<WebBundleDescriptor>
Returns:
the location of the web services related deployment descriptor file inside this archive or null if this archive does not support webservices implementation.

getStandardDDFile

public DeploymentDescriptorFile<WebBundleDescriptor> getStandardDDFile()
Specified by:
getStandardDDFile in class Archivist<WebBundleDescriptor>
Returns:
the DeploymentDescriptorFile responsible for handling standard deployment descriptor

getConfigurationDDFile

public DeploymentDescriptorFile getConfigurationDDFile()
Specified by:
getConfigurationDDFile in class Archivist<WebBundleDescriptor>
Returns:
if exists the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors

getSunConfigurationDDFile

public DeploymentDescriptorFile getSunConfigurationDDFile()
Overrides:
getSunConfigurationDDFile in class Archivist<WebBundleDescriptor>
Returns:
if exists the DeploymentDescriptorFile responsible for handling the Sun configuration deployment descriptors

getWLConfigurationDDFile

public DeploymentDescriptorFile getWLConfigurationDDFile()
Overrides:
getWLConfigurationDDFile in class Archivist<WebBundleDescriptor>
Returns:
if exists the DeploymentDescriptorFile responsible for handling the WL configuration deployment descriptors

getDefaultBundleDescriptor

public WebBundleDescriptor getDefaultBundleDescriptor()
Specified by:
getDefaultBundleDescriptor in class Archivist<WebBundleDescriptor>
Returns:
a default BundleDescriptor for this archivist

getDefaultWebXmlBundleDescriptor

public WebBundleDescriptor getDefaultWebXmlBundleDescriptor()
Returns:
a validated WebBundleDescriptor corresponding to default-web.xml that can be used in webtier.

postStandardDDsRead

protected void postStandardDDsRead(WebBundleDescriptor descriptor,
                                   ReadableArchive archive,
                                   java.util.Map<ExtensionsArchivist,RootDeploymentDescriptor> extensions)
                            throws java.io.IOException
After reading all the standard deployment descriptors, merge any resource descriptors from EJB descriptors into the WebBundleDescriptor.

Overrides:
postStandardDDsRead in class Archivist<WebBundleDescriptor>
Parameters:
descriptor - the deployment descriptor for the module
archive - the module archive
extensions - map of extension archivists
Throws:
java.io.IOException

getDefaultWebXML

protected java.net.URL getDefaultWebXML()
                                 throws java.io.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:
java.io.IOException

postOpen

protected void postOpen(WebBundleDescriptor descriptor,
                        ReadableArchive archive)
                 throws java.io.IOException
perform any post deployment descriptor reading action

Overrides:
postOpen in class Archivist<WebBundleDescriptor>
Parameters:
descriptor - the deployment descriptor for the module
archive - the module archive
Throws:
java.io.IOException

validate

public void validate(java.lang.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 class Archivist<WebBundleDescriptor>

postHandles

protected boolean postHandles(ReadableArchive abstractArchive)
                       throws java.io.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 class Archivist<WebBundleDescriptor>
Returns:
true if the archivist is handling the provided archive
Throws:
java.io.IOException

getArchiveExtension

protected java.lang.String getArchiveExtension()
Specified by:
getArchiveExtension in class Archivist<WebBundleDescriptor>
Returns:
The archive extension handled by a specific archivist

getLibraries

public java.util.Vector getLibraries(Archive archive)
Overrides:
getLibraries in class Archivist<WebBundleDescriptor>
Returns:
a list of libraries included in the archivist

postAnnotationProcess

protected void postAnnotationProcess(WebBundleDescriptor descriptor,
                                     ReadableArchive archive)
                              throws java.io.IOException
Description copied from class: Archivist
perform any action after annotation processed

Overrides:
postAnnotationProcess in class Archivist<WebBundleDescriptor>
Parameters:
descriptor - the deployment descriptor for the module
archive - the module archive
Throws:
java.io.IOException


Copyright © 2012 GlassFish Community. All Rights Reserved.