mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
add tests to check the content bin is available for:
- the copy when the original file is destroyed - file when having a record version that gets deleted
This commit is contained in:
@@ -30,7 +30,6 @@ package org.alfresco.rest.v0.service;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||
import org.alfresco.rest.v0.RecordCategoriesAPI;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -85,6 +84,24 @@ public class DispositionScheduleService extends BaseAPI
|
||||
dataUser.getAdminUser().getPassword(), categoryName, cutOffStep);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for adding a destroy with ghosting after period
|
||||
*
|
||||
* @param categoryName the category in whose schedule the step will be added
|
||||
* @param period
|
||||
* @return
|
||||
*/
|
||||
public void addDestroyWithGhostingAfterPeriodStep(String categoryName, String period)
|
||||
{
|
||||
HashMap<RETENTION_SCHEDULE, String> destroyStep = new HashMap<>();
|
||||
destroyStep.put(RETENTION_SCHEDULE.NAME, "destroy");
|
||||
destroyStep.put(RETENTION_SCHEDULE.RETENTION_PERIOD, "immediately|");
|
||||
destroyStep.put(RETENTION_SCHEDULE.DESCRIPTION, "Destroy immediately");
|
||||
destroyStep.put(RETENTION_SCHEDULE.RETENTION_GHOST, "on");
|
||||
recordCategoriesAPI.addDispositionScheduleSteps(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), categoryName, destroyStep);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for adding a cut off after an event occurs step
|
||||
*
|
||||
|
Reference in New Issue
Block a user