Class ApplicationFactory


  • @Service
    public class ApplicationFactory
    extends Object
    Factory for application object
    Author:
    Jerome Dochez
    • Field Detail

      • logger

        protected static final Logger logger
    • Constructor Detail

      • ApplicationFactory

        public ApplicationFactory()
    • 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:
        IOException
        SAXParseException
      • 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 file
        jarFile - the archive file
        handleRuntimeInfo - set to true to read configuration deployment descriptors
        Returns:
        the application object
        Throws:
        IOException
        SAXParseException
      • 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 file
        in - the archive abstraction
        handleRuntimeInfo - true to read configuration deployment descriptors
        Returns:
        the application object
        Throws:
        IOException
        SAXParseException
      • 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 moduleID
        archivist - to use to open the archive file
        in - the input archive
        handleRuntimeInfo - set to true to read configuration deployment descriptors
        Returns:
        the application object
        Throws:
        IOException
        SAXParseException
      • 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 file
        handleRuntimeInfo - set to true to read configuration deployment descriptors
        Returns:
        the application object
        Throws:
        IOException
        SAXParseException
      • getApplicationName

        public String getApplicationName​(File jarFile)
                                  throws IOException
        Parameters:
        jarFile - the .ear file
        Returns:
        the application name from an application .ear file
        Throws:
        IOException