use of org.apache.chemistry.opencmis.commons.enums.IncludeRelationships in project copper-cms by PogeyanOSS.
the class NavigationActor method getCheckedOutDocs.
private JSONObject getCheckedOutDocs(QueryGetRequest request) throws CmisObjectNotFoundException, CmisRuntimeException {
String permission = request.getUserObject().getPermission();
if (!Helpers.checkingUserPremission(permission, "get")) {
throw new CmisRuntimeException(request.getUserName() + " is not authorized to applyAcl.");
}
String folderId = request.getObjectId();
String filter = request.getParameter(QueryGetRequest.PARAM_FILTER);
String orderBy = request.getParameter(QueryGetRequest.PARAM_ORDER_BY);
Boolean includeAllowableActions = request.getBooleanParameter(QueryGetRequest.PARAM_ALLOWABLE_ACTIONS);
includeAllowableActions = includeAllowableActions == null ? false : includeAllowableActions;
IncludeRelationships includeRelationships = request.getEnumParameter(QueryGetRequest.PARAM_RELATIONSHIPS, IncludeRelationships.class);
String renditionFilter = request.getParameter(QueryGetRequest.PARAM_RENDITION_FILTER);
BigInteger maxItems = request.getBigIntegerParameter(QueryGetRequest.PARAM_MAX_ITEMS);
BigInteger skipCount = request.getBigIntegerParameter(QueryGetRequest.PARAM_SKIP_COUNT);
boolean succinct = request.getBooleanParameter(QueryGetRequest.PARAM_SUCCINCT, false);
DateTimeFormat dateTimeFormat = request.getDateTimeFormatParameter();
ObjectList docs = CmisNavigationService.Impl.getCheckedOutDocs(request.getRepositoryId(), folderId, filter, orderBy, includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, null, null, request.getUserObject());
if (docs == null) {
throw new CmisRuntimeException("Children are null!");
}
JSONObject jsonDocs = JSONConverter.convert(docs, CmisTypeCacheService.get(request.getRepositoryId()), JSONConverter.PropertyMode.OBJECT, succinct, dateTimeFormat);
return jsonDocs;
}
Aggregations