mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4316 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4317 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4319 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4328 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4652 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,6 +41,7 @@ public class ImportFileUpdater
|
||||
|
||||
/** The current import version number **/
|
||||
private String version;
|
||||
private boolean shownWarning = false;
|
||||
|
||||
/**
|
||||
* Updates the passed import file into the equivalent 1.4 format.
|
||||
@@ -52,6 +53,7 @@ public class ImportFileUpdater
|
||||
{
|
||||
XmlPullParser reader = getReader(source);
|
||||
XMLWriter writer = getWriter(destination);
|
||||
this.shownWarning = false;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -206,11 +208,20 @@ public class ImportFileUpdater
|
||||
}
|
||||
else if (reader.getName().equals(NAME_RULE) == true)
|
||||
{
|
||||
if (this.version.startsWith("1.3") == true)
|
||||
if (this.shownWarning == false && this.version == null)
|
||||
{
|
||||
System.out.println("WARNING: No version information has been found in this import file. It will be presumed it has been exported from 1.3");
|
||||
this.shownWarning = true;
|
||||
}
|
||||
if (this.version == null || this.version.startsWith("1.3") == true || this.version.startsWith("1.2") == true)
|
||||
{
|
||||
new RuleCallback().doCallback(reader, writer);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException("Import files of version " + this.version + " are not supported by this tool.");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user