public class ApplicationFileInstaller extends Object
Constructor and Description |
---|
ApplicationFileInstaller() |
Modifier and Type | Method and Description |
---|---|
static ZipFileApplicationDetails |
getAppDetails(File applicationFile)
Detects and Builds an AppDetail based on the zip file provided.
|
static URI |
install(File application)
Installs the given application file to the system repository.
|
public static URI install(File application) throws ApplicationServiceException
application
- Application file to install.ApplicationServiceException
- If any errors occur while trying to install the
application.public static ZipFileApplicationDetails getAppDetails(File applicationFile) throws ApplicationServiceException
To start the process, we find the features.xml file. Once we find it within the zip file, we specifically get a stream to that file. Next we parse through the features.xml and extract the version/appname.
applicationFile
- the file to detect appname and version from.ZipFileApplicationDetails
containing appname and version.ApplicationServiceException
- any errors that happening during extracting the
appname/version from the zipfile.This work is licensed under a Creative Commons Attribution 4.0 International License.