Package org.alfresco.repo.module.tool
Class ModuleDetailsHelper
java.lang.Object
org.alfresco.repo.module.tool.ModuleDetailsHelper
Module details helper used by the module mangement tool
- Author:
- Roy Wetherall, Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleDetailsFactory method to create module details from a stream of a properties filestatic ModuleDetailsFactory method to create module details from a stream of a properties filestatic ModuleDetailsCreates a module details helper object based on a file location.static ModuleDetailscreateModuleDetailsFromPropertyLocation(String location, LogOutput log) Creates a module details helper object based on a file location.static ModuleDetailscreateModuleDetailsFromWarAndId(String warLocation, String moduleId) Creates a module details instance based on a war location and the module idstatic de.schlichtherle.truezip.file.TFilegetModuleDetailsFileFromWarAndId(String warLocation, String moduleId) static StringgetModulePropertiesFileLocation(String warLocation, String moduleId) Gets the file locationstatic StringgetModulePropertiesFilePathInWar(String moduleId) static voidsaveModuleDetails(String warLocation, ModuleDetails moduleDetails) Saves the module details to the war in the correct location based on the module id
-
Constructor Details
-
ModuleDetailsHelper
public ModuleDetailsHelper()
-
-
Method Details
-
createModuleDetailsFromPropertiesStream
public static ModuleDetails createModuleDetailsFromPropertiesStream(InputStream is) throws IOException Factory method to create module details from a stream of a properties file- Parameters:
is- the properties input stream, which will be closed during the call- Returns:
- Returns the initialized module details
- Throws:
IOException
-
createModuleDetailsFromPropertiesStream
public static ModuleDetails createModuleDetailsFromPropertiesStream(InputStream is, LogOutput log) throws IOException Factory method to create module details from a stream of a properties file- Parameters:
is- the properties input stream, which will be closed during the calllog- logger- Returns:
- Returns the initialized module details
- Throws:
IOException
-
createModuleDetailsFromPropertyLocation
public static ModuleDetails createModuleDetailsFromPropertyLocation(String location) throws IOException Creates a module details helper object based on a file location.- Parameters:
location- file location- Returns:
- Returns the module details or null if the location points to nothing
- Throws:
IOException
-
createModuleDetailsFromPropertyLocation
public static ModuleDetails createModuleDetailsFromPropertyLocation(String location, LogOutput log) throws IOException Creates a module details helper object based on a file location.- Parameters:
location- file locationlog- logger- Returns:
- Returns the module details or null if the location points to nothing
- Throws:
IOException
-
createModuleDetailsFromWarAndId
public static ModuleDetails createModuleDetailsFromWarAndId(String warLocation, String moduleId) throws IOException Creates a module details instance based on a war location and the module id- Parameters:
warLocation- the war locationmoduleId- the module id- Returns:
- Returns the module details for the given module ID as it occurs in the WAR, or null if there are no module details available.
- Throws:
IOException
-
getModuleDetailsFileFromWarAndId
public static de.schlichtherle.truezip.file.TFile getModuleDetailsFileFromWarAndId(String warLocation, String moduleId) - Parameters:
warLocation- the location of the WAR filemoduleId- the module ID within the WAR- Returns:
- Returns a file handle to the module properties file within the given WAR. The file may or may not exist.
-
getModulePropertiesFileLocation
Gets the file location- Parameters:
warLocation- the war locationmoduleId- the module id- Returns:
- the file location
-
getModulePropertiesFilePathInWar
- Parameters:
moduleId- the module ID- Returns:
- Returns the path of the module file within a WAR
-
saveModuleDetails
Saves the module details to the war in the correct location based on the module id- Parameters:
warLocation- the war locationmoduleDetails- the module id
-