@Override public boolean hasLock() { if (!isCheckedOut()) { return false; } AllowableActions allowableActions = _document.getAllowableActions(); Set<Action> allowableActionsSet = allowableActions.getAllowableActions(); if (allowableActionsSet.contains(Action.CAN_CHECK_IN)) { return true; } List<CmisExtensionElement> cmisExtensionElements = allowableActions.getExtensions(); for (CmisExtensionElement cmisExtensionElement : cmisExtensionElements) { String name = cmisExtensionElement.getName(); if (name.equals("canCheckInSpecified")) { return GetterUtil.getBoolean(cmisExtensionElement.getValue()); } } return false; }
public boolean hasLock() { if (!isCheckedOut()) { return false; } AllowableActions allowableActions = _document.getAllowableActions(); Set<Action> allowableActionsSet = allowableActions.getAllowableActions(); return allowableActionsSet.contains(Action.CAN_CHECK_IN); }
// ////////////////////////////////////////////////////////////////////////// // Permission Check called from each CMIS method // ////////////////////////////////////////////////////////////////////////// @Override public boolean checkPermission(CallContext callContext, Action action, ObjectData objectData) { AllowableActions _actions = objectData.getAllowableActions(); if (_actions == null) { return false; } else { Set<Action> actions = _actions.getAllowableActions(); if (CollectionUtils.isEmpty(actions)) { return false; } else { return actions.contains(action); } } }