mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature/RM-6302_AddEditFunctionalityToDispositionSchedule_AutomationTest1' into 'release/V2.7'
Merge to release/V2.7 See merge request records-management/records-management!1004
This commit is contained in:
@@ -662,7 +662,7 @@ public abstract class BaseAPI
|
||||
RETENTION_GHOST,
|
||||
RETENTION_ELIGIBLE_FIRST_EVENT,
|
||||
RETENTION_EVENTS,
|
||||
|
||||
COMBINE_DISPOSITION_STEP_CONDITIONS
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -51,6 +51,8 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RecordCategoriesAPI.class);
|
||||
private static final String RM_ACTIONS_API = "{0}rma/actions/ExecutionQueue";
|
||||
private static final String DISPOSITION_ACTIONS_API = "{0}node/{1}/dispositionschedule/dispositionactiondefinitions";
|
||||
private static final String DISPOSITION_SCHEDULE_API = "{0}node/{1}/dispositionschedule";
|
||||
|
||||
|
||||
/**
|
||||
* Creates a retention schedule for the category given as parameter
|
||||
@@ -71,6 +73,21 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the disposition schedule nodeRef
|
||||
*
|
||||
* @param user
|
||||
* @param password
|
||||
* @param categoryName
|
||||
* @return the disposition schedule nodeRef
|
||||
*/
|
||||
public String getDispositionScheduleNodeRef(String user, String password, String categoryName)
|
||||
{
|
||||
String catNodeRef = NODE_PREFIX + getItemNodeRef(user, password, "/" + categoryName);
|
||||
JSONObject dispositionSchedule = doGetRequest(user, password, MessageFormat.format(DISPOSITION_SCHEDULE_API, "{0}", catNodeRef));
|
||||
return dispositionSchedule.getJSONObject("data").getString("nodeRef").replace(getNodeRefSpacesStore(), "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention schedule authority and instructions, also if it is applied to records or folders
|
||||
*
|
||||
@@ -108,7 +125,12 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
addPropertyToRequest(requestParams, "period", properties, RETENTION_SCHEDULE.RETENTION_PERIOD);
|
||||
addPropertyToRequest(requestParams, "ghostOnDestroy", properties, RETENTION_SCHEDULE.RETENTION_GHOST);
|
||||
addPropertyToRequest(requestParams, "periodProperty", properties, RETENTION_SCHEDULE.RETENTION_PERIOD_PROPERTY);
|
||||
addPropertyToRequest(requestParams, "events", properties, RETENTION_SCHEDULE.RETENTION_EVENTS);
|
||||
String events = getPropertyValue(properties, RETENTION_SCHEDULE.RETENTION_EVENTS);
|
||||
if(!events.equals(""))
|
||||
{
|
||||
requestParams.append("events", events);
|
||||
}
|
||||
addPropertyToRequest(requestParams, "combineDispositionStepConditions", properties, RETENTION_SCHEDULE.COMBINE_DISPOSITION_STEP_CONDITIONS);
|
||||
addPropertyToRequest(requestParams, "eligibleOnFirstCompleteEvent", properties, RETENTION_SCHEDULE.RETENTION_ELIGIBLE_FIRST_EVENT);
|
||||
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, MessageFormat.format(DISPOSITION_ACTIONS_API, "{0}", catNodeRef));
|
||||
|
Reference in New Issue
Block a user