Skip to content

Commit

Permalink
KNL-1494 Copy Root Collection Properties (sakaiproject#3810)
Browse files Browse the repository at this point in the history
Properties on root collection are persisted on dupe / import / whatnot.
  • Loading branch information
master-bob authored and ottenhoff committed Jan 26, 2017
1 parent 87cffa1 commit c85af70
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8199,6 +8199,15 @@ public Map<String, String> transferCopyEntitiesRefMigrator(String fromContext, S
// get the root collection
ContentCollection oCollection = getCollection(fromContext);

// Copy the Resource Properties from Root Collection to New Root Collection
ResourceProperties oCollectionProperties = oCollection.getProperties();
ContentCollectionEdit toCollectionEdit = (ContentCollectionEdit) toCollection;
ResourcePropertiesEdit toColPropEdit = toCollectionEdit.getPropertiesEdit();
toColPropEdit.clear();
toColPropEdit.addAll(oCollectionProperties);
hideImportedContent(toCollectionEdit);
m_storage.commitCollection(toCollectionEdit);

// Get the collection members from the 'new' collection
List oResources = oCollection.getMemberResources();
for (int i = 0; i < oResources.size(); i++)
Expand Down

0 comments on commit c85af70

Please sign in to comment.