Class ApplicationFactory
- java.lang.Object
-
- com.sun.enterprise.deployment.archivist.ApplicationFactory
-
@Service public class ApplicationFactory extends Object
Factory for application object- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description ApplicationFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationcreateApplicationFromStandardDD(ReadableArchive archive, String archiveType)This method creates an Application object from reading the standard deployment descriptor.StringgetApplicationName(File jarFile)ApplicationopenArchive(Archivist archivist, URI jarFile, boolean handleRuntimeInfo)Open a jar file and return an application object for the modules contained in the archive/directory.ApplicationopenArchive(Archivist archivist, ReadableArchive in, boolean handleRuntimeInfo)Open a jar file and return an application object for the modules contained in the archive.ApplicationopenArchive(String appName, Archivist archivist, ReadableArchive in, boolean handleRuntimeInfo)Open a jar file and return an application object for the modules contained in the archive.ApplicationopenArchive(URI jarFile, String archiveType)Open a jar file and return an application object for the modules contained in the archive.ApplicationopenArchive(URI jarFile, String archiveType, boolean handleRuntimeInfo)Open a jar file with the default Archivists and return an application object for the modules contained in the archive.ApplicationopenWith(Application application, ReadableArchive archive, Archivist archivist)This method populates the rest of the Application object from the previous standard deployment descriptor reading
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
-
Method Detail
-
openArchive
public Application openArchive(URI jarFile, String archiveType) throws IOException, SAXParseException
Open a jar file and return an application object for the modules contained in the archive. If the archive is a standalone module, this API will create an empty application and add the standalone module to it- Parameters:
jarFile- the archive file- Returns:
- the application object
- Throws:
IOExceptionSAXParseException
-
openArchive
public Application openArchive(Archivist archivist, URI jarFile, boolean handleRuntimeInfo) throws IOException, SAXParseException
Open a jar file and return an application object for the modules contained in the archive/directory. If the archive/directory is a standalone module, this API will create an empty application and add the standalone module to it- Parameters:
archivist- to use to open the archive filejarFile- the archive filehandleRuntimeInfo- set to true to read configuration deployment descriptors- Returns:
- the application object
- Throws:
IOExceptionSAXParseException
-
openArchive
public Application openArchive(Archivist archivist, ReadableArchive in, boolean handleRuntimeInfo) throws IOException, SAXParseException
Open a jar file and return an application object for the modules contained in the archive. If the archive is a standalone module, this API will create an empty application and add the standalone module to it- Parameters:
archivist- to use to open the archive filein- the archive abstractionhandleRuntimeInfo- true to read configuration deployment descriptors- Returns:
- the application object
- Throws:
IOExceptionSAXParseException
-
openArchive
public Application openArchive(String appName, Archivist archivist, ReadableArchive in, boolean handleRuntimeInfo) throws IOException, SAXParseException
Open a jar file and return an application object for the modules contained in the archive. If the archive is a standalone module, this API will create an empty application and add the standalone module to it- Parameters:
appName- the application moduleIDarchivist- to use to open the archive filein- the input archivehandleRuntimeInfo- set to true to read configuration deployment descriptors- Returns:
- the application object
- Throws:
IOExceptionSAXParseException
-
createApplicationFromStandardDD
public Application createApplicationFromStandardDD(ReadableArchive archive, String archiveType) throws IOException, SAXParseException
This method creates an Application object from reading the standard deployment descriptor.- Parameters:
archive- the archive for the application- Throws:
IOExceptionSAXParseException
-
openWith
public Application openWith(Application application, ReadableArchive archive, Archivist archivist) throws IOException, SAXParseException
This method populates the rest of the Application object from the previous standard deployment descriptor reading- Parameters:
archive- the archive for the application- Throws:
IOExceptionSAXParseException
-
openArchive
public Application openArchive(URI jarFile, String archiveType, boolean handleRuntimeInfo) throws IOException, SAXParseException
Open a jar file with the default Archivists and return an application object for the modules contained in the archive. If the archive is a standalone module, this API will create an empty application and add the standalone module to it- Parameters:
jarFile- the archive filehandleRuntimeInfo- set to true to read configuration deployment descriptors- Returns:
- the application object
- Throws:
IOExceptionSAXParseException
-
getApplicationName
public String getApplicationName(File jarFile) throws IOException
- Parameters:
jarFile- the .ear file- Returns:
- the application name from an application .ear file
- Throws:
IOException
-
-