Package org.alfresco.repo.module.tool
Class ModuleManagementTool
- java.lang.Object
-
- org.alfresco.repo.module.tool.ModuleManagementTool
-
- All Implemented Interfaces:
LogOutput
public class ModuleManagementTool extends java.lang.Object implements 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
Fields Modifier and Type Field Description static java.lang.StringBACKUP_DIRStandard directories found in the alfresco war
-
Constructor Summary
Constructors Constructor Description ModuleManagementTool()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableModule(java.lang.String moduleId, java.lang.String warLocation)voidenableModule(java.lang.String moduleId, java.lang.String warLocation)voidinfo(java.lang.Object message)voidinstallModule(java.lang.String ampFileLocation, java.lang.String warFileLocation)Installs a given AMP file into a given WAR file.voidinstallModule(java.lang.String ampFileLocation, java.lang.String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR)Installs a given AMP file into a given WAR file.voidinstallModules(java.lang.String directory, java.lang.String warFileLocation)Installs all modules within a folder into the given WAR file.voidinstallModules(java.lang.String directoryLocation, java.lang.String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR)booleanisVerbose()Indicates whether the management tool is currently in verbose reporting mode.voidlistModules(java.lang.String warLocation)Lists all the currently installed modules in the WARstatic voidmain(java.lang.String[] args)MainvoidsetVerbose(boolean verbose)Sets the verbose setting for the mangement toolvoiduninstallModule(java.lang.String moduleId, java.lang.String warFileLocation, boolean preview, boolean purge)Cleans the WAR file of all files relating to the currently installed version of the the Module.
-
-
-
Field Detail
-
BACKUP_DIR
public static final java.lang.String BACKUP_DIR
Standard directories found in the alfresco war- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public void installModules(java.lang.String directory, java.lang.String warFileLocation) throws java.io.IOExceptionInstalls all modules within a folder into the given WAR file.- Throws:
java.io.IOException- See Also:
installModule(String, String, boolean, boolean, boolean)
-
installModules
public void installModules(java.lang.String directoryLocation, java.lang.String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) throws java.io.IOException- Throws:
java.io.IOException
-
installModule
public void installModule(java.lang.String ampFileLocation, java.lang.String warFileLocation)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(String, String, boolean, boolean, boolean)
-
installModule
public void installModule(java.lang.String ampFileLocation, java.lang.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(java.lang.String moduleId, java.lang.String warFileLocation, boolean preview, boolean purge) throws java.io.IOExceptionCleans 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:
java.io.IOException
-
disableModule
public void disableModule(java.lang.String moduleId, java.lang.String warLocation)- Throws:
java.lang.UnsupportedOperationException
-
enableModule
public void enableModule(java.lang.String moduleId, java.lang.String warLocation)- Throws:
java.lang.UnsupportedOperationException
-
listModules
public void listModules(java.lang.String warLocation)
Lists all the currently installed modules in the WAR- Parameters:
warLocation- the war location- Throws:
ModuleManagementToolException
-
main
public static void main(java.lang.String[] args)
Main- Parameters:
args- command line interface arguments
-
-