public class DefaultInstallerManager extends AbstractManager implements InstallerManager
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultInstallerManager.InstallerCreationException |
InstallerManager.ARCH, InstallerManager.JVM, InstallerManager.OS, InstallerManager.PACKAGE_FILE_NAME_FIELDS, InstallerManager.STATEACCESS_READ, ACCESS_WRITE, PACKAGE_EXTENSION, PACKAGE_INDEX_EXTENSION, PACKAGE_INFO_FILE_NAME, PACKAGE_SET_EXTENSION| Constructor and Description |
|---|
DefaultInstallerManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalAddonRepository(File path) |
void |
addLocalAddonRepository(File path,
String type)
Adds an addon local repository location to the manager list,
and register the type of addons for this repository.
|
DependenciesCalculator |
createDependenciesCalculator(InstallPackageService installService)
Create a dependencies calculator.
|
Dependency |
createDependency()
Create a empty dependency object.
|
Dependency |
createDependency(PackageInfo packageInfo)
Create a dependency instance with the data of the package.
|
MakePackageService |
createMakePackage(File packageFolder,
PackageInfo packageInfo) |
PackageInfo |
createPackageInfo() |
PackageInfo |
createPackageInfo(File file) |
PackageInfo |
createPackageInfo(InputStream stream)
Create a PackageInfo and load contents from the specified InputStream using the
default reader.
|
Version |
createVersion()
Create a version instance
|
File |
getAddonFolder(String code)
Gets the folder of the addon with the code provided, or null if not
found.
|
List<File> |
getAddonFolders()
Gets a List of all the addon folders.
|
List<File> |
getAddonFolders(String type)
Gets a List of all the addon folders of a type of package.
|
String |
getArchitecture()
Returns the Architecture code of the system
|
String |
getDefaultIndexSetFileExtension()
Returns the default extensions of the index set files.
|
File |
getDefaultLocalAddonRepository()
The local addons folder where normally all addons are installed.
|
File |
getDefaultLocalAddonRepository(String packageType)
Get the path to the default local repository for a type of package.
|
File |
getDefaultLocalAddonRepository(String packageType,
int access)
Get the path to the default local repository for a type of package.
|
String |
getDefaultLocalRepositoryType(File file)
Retrieve the default type of addons for the file.
|
String |
getDefaultPackageFileExtension()
Returns the default extensions of the package files.
|
PackageInfoReader |
getDefaultPackageInfoReader() |
PackageInfoWriter |
getDefaultPackageInfoWriter() |
String |
getDefaultPackageSetFileExtension()
Returns the default extensions of the package set files.
|
URL |
getDownloadBaseURL() |
PackageInfo[] |
getInstalledPackages()
Returns a list of package infos for the already installed plugins.
|
PackageInfo[] |
getInstalledPackages(File pluginsDirectory)
Returns a list of package infos for the already installed plugins.
|
InstallPackageService |
getInstallPackageService()
It creates and returns an object that is used to install a package in
gvSIG.
|
List<File> |
getLocalAddonRepositories()
Gets a List of all the folders where there might be addons folders
(addons repositories).
|
List<File> |
getLocalAddonRepositories(String type)
Gets a List of all the folders where there might be addons folders
for the specified type of packages
(addons repositories).
|
MakePluginPackageService |
getMakePluginPackageService()
It creates and returns an object that is used to create a bundle that
contains inside a package of type plugin.
|
String |
getOperatingSystem()
Return the OS code of the system
|
String |
getOperatingSystemFamily() |
String |
getOperatingSystemName() |
String |
getOperatingSystemVersion() |
String |
getPackageFileName(PackageInfo info)
Returns the name of the package file for a given package info.
|
String |
getPackageIndexFileName(PackageInfo info)
Returns the name of the package index file for a given package info.
|
String |
getPackageIndexNameFormat() |
String |
getPackageNameFormat() |
String |
getPackageSetFileName(PackageInfo info)
Returns the name of the package set file for a given package info.
|
String |
getPackageSetNameFormat()
Returns the package bundle file name format.
|
List<byte[]> |
getPublicKeys() |
Service |
getService(DynObject parameters)
Creates a new
Service based on the given parameters. |
String |
getVersion() |
Version |
getVersionEx() |
boolean |
hasProviderToThisPackage(PackageInfo packageInfo) |
boolean |
needAdminRights() |
void |
registerInstallPackageService(Class<? extends InstallPackageService> clazz)
It registers a class that implements the service for the installation of
a package that is inside a bundle.
|
void |
registerMakePluginPackageService(Class<? extends MakePluginPackageService> clazz)
It registers a class that implements the service for the creation of
bundle that contains inside a package of type plugin.
|
void |
setDefaultLocalAddonRepository(File defaultAddonsRepository)
The local addons folder where normally all addons are installed.
|
void |
setDefaultLocalAddonRepository(File defaultAddonsRepository,
String packageType)
Set the path to the default local repository for a type of package
|
void |
setDownloadBaseURL(URL url) |
void |
setPackageIndexNameFormat(String packageIndexNameFormat) |
void |
setPackageNameFormat(String packageNameFormat) |
void |
setPackageSetNameFormat(String packageSetNameFormat)
Sets the package bundle file name format.
|
void |
setVersion(String version) |
void |
setVersion(Version version) |
createServiceParameters, getProviderManagerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateServiceParameterspublic String getPackageSetNameFormat()
InstallerManager
The string has to use a suitable MessageFormat format, and the
available field numbers are the ones defined in the
BUNDLE_FILE_NAME_FIELDS interface.
getPackageSetNameFormat in interface InstallerManagerpublic void setPackageSetNameFormat(String packageSetNameFormat)
InstallerManagersetPackageSetNameFormat in interface InstallerManagerpackageSetNameFormat - the package bundle file name format.InstallerManager.getPackageSetNameFormat()public String getPackageNameFormat()
public void setPackageNameFormat(String packageNameFormat)
public String getPackageIndexNameFormat()
public void setPackageIndexNameFormat(String packageIndexNameFormat)
public MakePluginPackageService getMakePluginPackageService() throws MakePluginPackageServiceException
InstallerManagerMakePluginPackageService interface. *getMakePluginPackageService in interface InstallerManagerMakePluginPackageServiceExceptionpublic InstallPackageService getInstallPackageService() throws InstallPackageServiceException
InstallerManagerInstallPackageService
interface.getInstallPackageService in interface InstallerManagerInstallPackageServiceException - when there is a problem creating the service.public void registerMakePluginPackageService(Class<? extends MakePluginPackageService> clazz)
InstallerManagerMakePluginPackageService interface.registerMakePluginPackageService in interface InstallerManagerclazz - class that implements the MakePluginPackageService
interface.public void registerInstallPackageService(Class<? extends InstallPackageService> clazz)
InstallerManagerInstallPackageService interface.registerInstallPackageService in interface InstallerManagerclazz - class that implements the InstallPackageService
interface.public Service getService(DynObject parameters) throws ServiceException
ManagerService based on the given parameters.getService in interface Managerparameters - of the Service to createServiceServiceException - if there is an error creating the Service, or the parameters
are not validpublic String getPackageSetFileName(PackageInfo info)
InstallerManagergetPackageSetFileName in interface InstallerManagerinfo - of the pluginpublic String getPackageFileName(PackageInfo info)
InstallerManagergetPackageFileName in interface InstallerManagerinfo - of the pluginpublic String getPackageIndexFileName(PackageInfo info)
InstallerManagergetPackageIndexFileName in interface InstallerManagerinfo - of the pluginpublic PackageInfo[] getInstalledPackages(File pluginsDirectory) throws MakePluginPackageServiceException
InstallerManagergetInstalledPackages in interface InstallerManagerpluginsDirectory - where to look for the installed pluginsMakePluginPackageServiceException - if there is an error loading the information of the installed
pluginspublic PackageInfo[] getInstalledPackages() throws MakePluginPackageServiceException
InstallerManagergetInstalledPackages in interface InstallerManagerMakePluginPackageServiceException - if there is an error loading the information of the installed
pluginspublic String getDefaultPackageFileExtension()
InstallerManagergetDefaultPackageFileExtension in interface InstallerManagerpublic String getDefaultPackageSetFileExtension()
InstallerManagergetDefaultPackageSetFileExtension in interface InstallerManagerpublic String getDefaultIndexSetFileExtension()
InstallerManagergetDefaultIndexSetFileExtension in interface InstallerManagerpublic String getOperatingSystem()
InstallerManagergetOperatingSystem in interface InstallerManagerpublic String getOperatingSystemFamily()
getOperatingSystemFamily in interface InstallerManagerpublic String getOperatingSystemName()
getOperatingSystemName in interface InstallerManagerpublic String getOperatingSystemVersion()
getOperatingSystemVersion in interface InstallerManagerpublic String getArchitecture()
InstallerManagergetArchitecture in interface InstallerManagerpublic Dependency createDependency(PackageInfo packageInfo)
InstallerManagercreateDependency in interface InstallerManagerpublic Dependency createDependency()
InstallerManagercreateDependency in interface InstallerManagerpublic DependenciesCalculator createDependenciesCalculator(InstallPackageService installService)
InstallerManagercreateDependenciesCalculator in interface InstallerManagerpublic Version createVersion()
InstallerManagercreateVersion in interface InstallerManagerpublic PackageInfoReader getDefaultPackageInfoReader()
getDefaultPackageInfoReader in interface InstallerManagerpublic PackageInfoWriter getDefaultPackageInfoWriter()
getDefaultPackageInfoWriter in interface InstallerManagerpublic MakePackageService createMakePackage(File packageFolder, PackageInfo packageInfo)
createMakePackage in interface InstallerManagerpublic PackageInfo createPackageInfo()
createPackageInfo in interface InstallerManagerpublic PackageInfo createPackageInfo(InputStream stream) throws BaseException
InstallerManagercreatePackageInfo in interface InstallerManagerstream - as URLBaseExceptionpublic PackageInfo createPackageInfo(File file) throws BaseException
BaseExceptionpublic URL getDownloadBaseURL()
getDownloadBaseURL in interface InstallerManagerpublic String getVersion()
getVersion in interface InstallerManagerpublic void setVersion(Version version)
setVersion in interface InstallerManagerpublic Version getVersionEx()
getVersionEx in interface InstallerManagerpublic void setDownloadBaseURL(URL url)
setDownloadBaseURL in interface InstallerManagerpublic void setVersion(String version)
setVersion in interface InstallerManagerpublic File getDefaultLocalAddonRepository()
InstallerManagergetDefaultLocalAddonRepository in interface InstallerManagerpublic void setDefaultLocalAddonRepository(File defaultAddonsRepository)
InstallerManagersetDefaultLocalAddonRepository in interface InstallerManagerpublic void addLocalAddonRepository(File path)
addLocalAddonRepository in interface InstallerManagerpublic File getDefaultLocalAddonRepository(String packageType)
InstallerManagergetDefaultLocalAddonRepository in interface InstallerManagerpackageType - type of package for that ask the default pathpublic boolean needAdminRights()
needAdminRights in interface InstallerManagerpublic File getDefaultLocalAddonRepository(String packageType, int access)
InstallerManagergetDefaultLocalAddonRepository in interface InstallerManagerpackageType - type of package for that ask the default pathaccess - type of access to the repository.public void setDefaultLocalAddonRepository(File defaultAddonsRepository, String packageType)
InstallerManagersetDefaultLocalAddonRepository in interface InstallerManagerdefaultAddonsRepository - path to the repositorypackageType - type of package in this repository pathpublic void addLocalAddonRepository(File path, String type)
InstallerManageraddLocalAddonRepository in interface InstallerManagerpath - of the repositorytype - of addons in this repositorypublic String getDefaultLocalRepositoryType(File file)
InstallerManagergetDefaultLocalRepositoryType in interface InstallerManagerpublic List<File> getLocalAddonRepositories()
InstallerManagergetLocalAddonRepositories in interface InstallerManagerpublic List<File> getLocalAddonRepositories(String type)
InstallerManagergetLocalAddonRepositories in interface InstallerManagerpublic List<File> getAddonFolders()
InstallerManagergetAddonFolders in interface InstallerManagerpublic List<File> getAddonFolders(String type)
InstallerManagergetAddonFolders in interface InstallerManagerpublic File getAddonFolder(String code)
InstallerManagergetAddonFolder in interface InstallerManagercode - of the addonpublic List<byte[]> getPublicKeys()
getPublicKeys in interface InstallerManagerpublic boolean hasProviderToThisPackage(PackageInfo packageInfo)
hasProviderToThisPackage in interface InstallerManager