use of org.apache.chemistry.opencmis.commons.data.FailedToDeleteData in project copper-cms by PogeyanOSS.
the class ObjectActor method deleteTree.
private static JSONObject deleteTree(PostRequest request) throws CmisObjectNotFoundException, CmisInvalidArgumentException, CmisNotSupportedException, CmisStorageException, CmisRuntimeException {
String permission = request.getUserObject().getPermission();
if (!Helpers.checkingUserPremission(permission, "post")) {
throw new CmisRuntimeException(request.getUserName() + " is not authorized to applyAcl.");
}
String objectId = request.getObjectId();
Boolean allVersions = request.getBooleanParameter(QueryGetRequest.PARAM_ALL_VERSIONS);
UnfileObject unfileObjects = request.getEnumParameter(QueryGetRequest.PARAM_UNFILE_OBJECTS, UnfileObject.class);
Boolean continueOnFailure = request.getBooleanParameter(QueryGetRequest.PARAM_CONTINUE_ON_FAILURE);
FailedToDeleteData ftd = CmisObjectService.Impl.deleteTree(request.getRepositoryId(), objectId, allVersions, unfileObjects, continueOnFailure, request.getUserObject());
if (ftd != null && CmisPropertyConverter.Impl.isNotEmpty(ftd.getIds())) {
JSONObject JSONObject = JSONConverter.convert(ftd);
return JSONObject;
}
return null;
}
Aggregations