Package org.alfresco.repo.module.tool
Interface WarHelper
-
- All Known Implementing Classes:
WarHelperImpl
public interface WarHelperPerforms various actions on a war file or exploded war directory- Author:
- Gethin James
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMODULE_CONFIG_IN_WARstatic java.lang.StringMODULE_NAMESPACE_DIR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringbackup(de.schlichtherle.truezip.file.TFile file)Backs up a given file or directory.voidcheckCompatibleEdition(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)This checks to see if the module that is being installed is compatible with the war.voidcheckCompatibleVersion(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)Checks to see if the module is compatible with the version of Alfresco.voidcheckModuleDependencies(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)Checks the dependencies of this modulejava.util.jar.ManifestfindManifest(de.schlichtherle.truezip.file.TFile war)Finds a war manifest file.ModuleDetailsgetModuleDetailsOrAlias(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)Gets the module details or an available aliasbooleanisShareWar(de.schlichtherle.truezip.file.TFile war)Indicates if the war file specified is a "Share" war.java.util.List<ModuleDetails>listModules(de.schlichtherle.truezip.file.TFile war)Lists all the currently installed modules in the WAR
-
-
-
Field Detail
-
MODULE_NAMESPACE_DIR
static final java.lang.String MODULE_NAMESPACE_DIR
- See Also:
- Constant Field Values
-
MODULE_CONFIG_IN_WAR
static final java.lang.String MODULE_CONFIG_IN_WAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getModuleDetailsOrAlias
ModuleDetails getModuleDetailsOrAlias(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)
Gets the module details or an available alias- Parameters:
war- a valid war file or exploded directory from a warinstallingModuleDetails- ModuleDetails- Returns:
- ModuleDetails
-
checkModuleDependencies
void checkModuleDependencies(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)Checks the dependencies of this module- Parameters:
war- TFileinstallingModuleDetails- ModuleDetails
-
checkCompatibleVersion
void checkCompatibleVersion(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)Checks to see if the module is compatible with the version of Alfresco.- Parameters:
war- a valid war file or exploded directory from a war
-
checkCompatibleEdition
void checkCompatibleEdition(de.schlichtherle.truezip.file.TFile war, ModuleDetails installingModuleDetails)This checks to see if the module that is being installed is compatible with the war. If not module edition is specfied then it will just return. However, if an edition is specified and it doesn't match then an error is thrown.- Parameters:
war- a valid war file or exploded directory from a warinstallingModuleDetails- ModuleDetails
-
isShareWar
boolean isShareWar(de.schlichtherle.truezip.file.TFile war)
Indicates if the war file specified is a "Share" war. The default is FALSE Returns true if the Share war manifest states its a share war.- Parameters:
war- TFile- Returns:
- boolean - true if it is a share war
- Since:
- 3.4.11,4.1.1,Community 4.2
-
listModules
java.util.List<ModuleDetails> listModules(de.schlichtherle.truezip.file.TFile war)
Lists all the currently installed modules in the WAR- Parameters:
war- the war- Returns:
- an unordered list of module details.
- Throws:
ModuleManagementToolException- Since:
- 5.1
-
backup
java.lang.String backup(de.schlichtherle.truezip.file.TFile file) throws java.io.IOExceptionBacks up a given file or directory.- Parameters:
file- the file to backup- Returns:
- the absolute path to the backup file.
- Throws:
java.io.IOException- Since:
- 5.1
-
findManifest
java.util.jar.Manifest findManifest(de.schlichtherle.truezip.file.TFile war) throws ModuleManagementToolExceptionFinds a war manifest file.- Parameters:
war- the war- Returns:
- Manifest
- Throws:
ModuleManagementToolException- Since:
- 5.1
-
-