mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-2402 (Extend classification schedule REST API)
RM-2433 (Extend reclassification REST API) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@109730 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,6 +22,7 @@ import static org.alfresco.util.WebScriptUtils.getJSONArrayFromJSONObject;
|
||||
import static org.alfresco.util.WebScriptUtils.getJSONArrayValue;
|
||||
import static org.alfresco.util.WebScriptUtils.getRequestContentAsJsonObject;
|
||||
import static org.alfresco.util.WebScriptUtils.getStringValueFromJSONObject;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
import static org.apache.commons.lang3.time.DateFormatUtils.ISO_DATE_FORMAT;
|
||||
import static org.springframework.extensions.webscripts.Status.STATUS_BAD_REQUEST;
|
||||
|
||||
@@ -111,10 +112,10 @@ public abstract class ClassifyContentBase extends AbstractRmWebScript
|
||||
String classifiedBy = getStringValueFromJSONObject(jsonObject, CLASSIFIED_BY);
|
||||
String classificationAgency = getStringValueFromJSONObject(jsonObject, CLASSIFICATION_AGENCY, false, false);
|
||||
Set<String> classificationReasonIds = getClassificationReasonIds(jsonObject);
|
||||
Object downgradeDate = jsonObject.isNull(DOWNGRADE_DATE) ? null : getStringValueFromJSONObject(jsonObject, DOWNGRADE_DATE, false, false);
|
||||
String downgradeDate = getStringValueFromJSONObject(jsonObject, DOWNGRADE_DATE, false, false);
|
||||
String downgradeEvent = getStringValueFromJSONObject(jsonObject, DOWNGRADE_EVENT, false, false);
|
||||
String downgradeInstructions = getStringValueFromJSONObject(jsonObject, DOWNGRADE_INSTRUCTIONS, false, false);
|
||||
Object declassificationDate = jsonObject.isNull(DECLASSIFICATION_DATE) ? null : getStringValueFromJSONObject(jsonObject, DECLASSIFICATION_DATE, false, false);
|
||||
String declassificationDate = getStringValueFromJSONObject(jsonObject, DECLASSIFICATION_DATE, false, false);
|
||||
String declassificationEvent = getStringValueFromJSONObject(jsonObject, DECLASSIFICATION_EVENT, false, false);
|
||||
Set<String> exemptionCategoryIds = getExemptionCategoryIds(jsonObject);
|
||||
String lastReclassifyBy = getStringValueFromJSONObject(jsonObject, LAST_RECLASSIFY_BY, false, false);
|
||||
@@ -200,15 +201,15 @@ public abstract class ClassifyContentBase extends AbstractRmWebScript
|
||||
* @param date The {@link Object} which will be parsed
|
||||
* @return The parsed date. If the given date is <code>null</code> then <code>null</code> will be returned.
|
||||
*/
|
||||
private Date parseDate(Object date)
|
||||
private Date parseDate(String date)
|
||||
{
|
||||
Date parsedDate = null;
|
||||
|
||||
if (date != null)
|
||||
if (isNotBlank(date))
|
||||
{
|
||||
try
|
||||
{
|
||||
parsedDate = DateUtils.parseDate((String) date, ISO_DATE_FORMAT.getPattern());
|
||||
parsedDate = DateUtils.parseDate(date, ISO_DATE_FORMAT.getPattern());
|
||||
}
|
||||
catch (ParseException error)
|
||||
{
|
||||
|
Reference in New Issue
Block a user