Merge pull request #3329 from atmire/w2p-80200_Retain_UUIDs

Fix #3330: Retain UUIDs on packager restore
This commit is contained in:
Tim Donohue
2021-10-07 11:12:08 -05:00
committed by GitHub
18 changed files with 528 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import javax.persistence.Cacheable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -89,6 +90,16 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
}
/**
* Takes a pre-determined UUID to be passed to the object to allow for the
* restoration of previously defined UUID's.
*
* @param uuid Takes a uuid to be passed to the Pre-Defined UUID Generator
*/
protected Community(UUID uuid) {
this.predefinedUUID = uuid;
}
void addSubCommunity(Community subCommunity) {
subCommunities.add(subCommunity);
setModified();