mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
120259 rneamtu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 120179 amorarasu: Merged DEV to 5.0.N (5.0.4) 120074 nabacioaiei: MNT-15252 : Any repository amp having set module.repo.version.min=5.0.2.1 cannot be applied to an Alfresco One 5.0.2.1 instance. - modified ModuleDetailsImpl to ignore version.label(if it exists) from module.repo.version.min and module.repo.version.max and log a warning. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123616 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -45,12 +45,23 @@ public class ModuleDetailsHelper
|
||||
* @return Returns the initialized module details
|
||||
*/
|
||||
public static ModuleDetails createModuleDetailsFromPropertiesStream(InputStream is) throws IOException
|
||||
{
|
||||
return createModuleDetailsFromPropertiesStream(is, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to create module details from a stream of a properties file
|
||||
* @param is the properties input stream, which will be closed during the call
|
||||
* @param log logger
|
||||
* @return Returns the initialized module details
|
||||
*/
|
||||
public static ModuleDetails createModuleDetailsFromPropertiesStream(InputStream is, LogOutput log) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
Properties properties = new Properties();
|
||||
properties.load(is);
|
||||
return new ModuleDetailsImpl(properties);
|
||||
return new ModuleDetailsImpl(properties, log);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -66,6 +77,19 @@ public class ModuleDetailsHelper
|
||||
* @throws IOException
|
||||
*/
|
||||
public static ModuleDetails createModuleDetailsFromPropertyLocation(String location) throws IOException
|
||||
{
|
||||
return createModuleDetailsFromPropertyLocation(location, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a module details helper object based on a file location.
|
||||
*
|
||||
* @param location file location
|
||||
* @param log logger
|
||||
* @return Returns the module details or null if the location points to nothing
|
||||
* @throws IOException
|
||||
*/
|
||||
public static ModuleDetails createModuleDetailsFromPropertyLocation(String location, LogOutput log) throws IOException
|
||||
{
|
||||
ModuleDetails result = null;
|
||||
TFileInputStream is;
|
||||
@@ -82,7 +106,7 @@ public class ModuleDetailsHelper
|
||||
|
||||
try
|
||||
{
|
||||
result = createModuleDetailsFromPropertiesStream(is);
|
||||
result = createModuleDetailsFromPropertiesStream(is, log);
|
||||
}
|
||||
catch (IOException exception)
|
||||
{
|
||||
|
Reference in New Issue
Block a user