Package org.alfresco.repo.module.tool
Class ModuleManagementTool
java.lang.Object
org.alfresco.repo.module.tool.ModuleManagementTool
- All Implemented Interfaces:
LogOutput
Module management tool.
Manages the modules installed in a war file. Allows modules to be installed, updated, enabled, disabled and uninstalled. Information about the module installed is also available.
- Since:
- 2.0
- Author:
- Roy Wetherall, Derek Hulley
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringStandard directories found in the alfresco war -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisableModule(String moduleId, String warLocation) voidenableModule(String moduleId, String warLocation) voidvoidinstallModule(String ampFileLocation, String warFileLocation) Installs a given AMP file into a given WAR file.voidinstallModule(String ampFileLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) Installs a given AMP file into a given WAR file.voidinstallModules(String directory, String warFileLocation) Installs all modules within a folder into the given WAR file.voidinstallModules(String directoryLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) booleanIndicates whether the management tool is currently in verbose reporting mode.voidlistModules(String warLocation) Lists all the currently installed modules in the WARstatic voidMainvoidsetVerbose(boolean verbose) Sets the verbose setting for the mangement toolvoiduninstallModule(String moduleId, String warFileLocation, boolean preview, boolean purge) Cleans the WAR file of all files relating to the currently installed version of the the Module.
-
Field Details
-
BACKUP_DIR
Standard directories found in the alfresco war- See Also:
-
-
Constructor Details
-
ModuleManagementTool
public ModuleManagementTool()Constructor
-
-
Method Details
-
isVerbose
public boolean isVerbose()Indicates whether the management tool is currently in verbose reporting mode.- Returns:
- true if verbose, false otherwise
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose setting for the mangement tool- Parameters:
verbose- true if verbose, false otherwise
-
installModules
Installs all modules within a folder into the given WAR file.- Throws:
IOException- See Also:
-
installModules
public void installModules(String directoryLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) throws IOException - Throws:
IOException
-
installModule
Installs a given AMP file into a given WAR file.- Parameters:
ampFileLocation- the location of the AMP file to be installedwarFileLocation- the location of the WAR file into which the AMP file is to be installed- See Also:
-
installModule
public void installModule(String ampFileLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) Installs a given AMP file into a given WAR file.- Parameters:
ampFileLocation- the location of the AMP file to be installedwarFileLocation- the location of the WAR file into which the AMP file is to be installed.preview- indicates whether this should be a preview install. This means that the process of installation will be followed and reported, but the WAR file will not be modified.forceInstall- indicates whether the installed files will be replaced regardless of the currently installed version of the AMP. Generally used during development of the AMP.backupWAR- indicates whether we should backup the war we are modifying or not
-
uninstallModule
public void uninstallModule(String moduleId, String warFileLocation, boolean preview, boolean purge) throws IOException Cleans the WAR file of all files relating to the currently installed version of the the Module.- Parameters:
warFileLocation- the war file locationmoduleId- the module idpreview- indicates whether this is a preview installationpurge- Fully delete all files (including those marked "PRESERVED")- Throws:
IOException
-
disableModule
- Throws:
UnsupportedOperationException
-
enableModule
- Throws:
UnsupportedOperationException
-
listModules
Lists all the currently installed modules in the WAR- Parameters:
warLocation- the war location- Throws:
ModuleManagementToolException
-
main
Main- Parameters:
args- command line interface arguments
-
info
-