FileDocCategorySizeDatePackage
ArchivistFactory.javaAPI DocGlassfish v2 API4830Fri May 04 22:31:36 BST 2007com.sun.enterprise.deployment.archivist

ArchivistFactory

public class ArchivistFactory extends Object
This factory class is responsible for creating Archivists
author
Jerome Dochez
version

Fields Summary
private static final PluggableArchivistsHelper
defaultArchivists
Constructors Summary
private ArchivistFactory()
no need to create ArchivistFactory

    
          
      
    
Methods Summary
public static ArchivistgetArchivistForArchive(java.io.File jarFileOrDirectory)

return
a new Archivist implementation for the archive file type Supported J2EE modules are defined in the J2EE platform spec

    
        return defaultArchivists.getArchivistForArchive(jarFileOrDirectory);
    
public static ArchivistgetArchivistForArchive(java.lang.String path)

return
a new Archivist implementation for the archive file type Supported J2EE modules are defined in the J2EE platform spec

    
        return defaultArchivists.getArchivistForArchive(path);
    
public static ArchivistgetArchivistForArchive(com.sun.enterprise.deployment.deploy.shared.AbstractArchive archive)

return
a new Archivist implementation for the archive file type Supported J2EE modules are defined in the J2EE platform spec

   
        return defaultArchivists.getArchivistForArchive(archive);
    
public static ArchivistgetArchivistForType(javax.enterprise.deploy.shared.ModuleType type)

return
a new Archivist implementation for the type passed. Supported types are defined in the application.xml DTD

        return defaultArchivists.getArchivistForType(type);
    
public static PluggableArchivistsgetPluggableArchivists()

        return defaultArchivists;
    
private static PluggableArchivistsHelperinitDefaultArchivists()

        
        // initialize our default Archivists helper singleton 
        // instance.
        PluggableArchivistsHelper result = new PluggableArchivistsHelper();
        result.registerArchivist(new ApplicationArchivist());
        result.registerArchivist(new WebArchivist());
        result.registerArchivist(new ConnectorArchivist());
        result.registerArchivist(new AppClientArchivist());        
        result.registerArchivist(new EjbArchivist());
        
        return result;
    
public static voidregisterArchivist(Archivist archivist)
register a new type of archivist

param
archivist to register...

        defaultArchivists.registerArchivist(archivist);