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:
Rodica Sutu
2019-02-12 10:49:55 +02:00
parent 59c6909d2d
commit da21154350
2 changed files with 143 additions and 15 deletions

View File

@@ -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
*