Fix for DS-1120: AIP Backup & Restore : SITE AIP has a different checksum everytime when orphaned Collection/Community groups exist (applied to both 1.8.x branch and Trunk)

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6939 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Tim Donohue
2012-02-15 19:04:13 +00:00
parent d79056c1d2
commit fd11d2e90e

View File

@@ -834,14 +834,16 @@ public class PackageUtils
if(dso==null)
{
// No such object. Change the name to something harmless.
// No such object. Change the name to something harmless, but predictable.
// NOTE: this name *must* be predictable. If we generate the same AIP
// twice in a row, we must end up with the same group name each time.
String newName;
if (orphanGroups.containsKey(groupName))
newName = orphanGroups.get(groupName);
else
{
newName= "GROUP_" + Utils.generateHexKey() + "_"
+ objType + "_" + groupType;
newName= "ORPHANED_" + objType + "_GROUP_"
+ objID + "_" + groupType;
orphanGroups.put(groupName, newName);
// A given group should only be translated once, since the
// new name contains unique random elements which would be