Pulled configurable OpenCMIS properties out of Spring context and some minor formatting

# OpenCMIS
 opencmis.connector.default.store=${spaces.store}
 opencmis.connector.default.rootPath=/${spaces.company_home.childname}
 opencmis.connector.default.typesDefaultMaxItems=500
 opencmis.connector.default.typesDefaultDepth=-1
 opencmis.connector.default.objectsDefaultMaxItems=10000
 opencmis.connector.default.objectsDefaultDepth=100
 opencmis.connector.default.openHttpSession=false


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32595 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-12-07 12:57:25 +00:00
parent 514af39053
commit 4eccacfa12
7 changed files with 136 additions and 75 deletions

View File

@@ -34,14 +34,13 @@ public class CanCancelCheckOutActionEvaluator extends AbstractActionEvaluator
/**
* Construct
*
* @param serviceRegistry
* @param permission
*/
protected CanCancelCheckOutActionEvaluator(ServiceRegistry serviceRegistry)
{
super(serviceRegistry, Action.CAN_CANCEL_CHECK_OUT);
permissionEvaluator = new PermissionActionEvaluator(serviceRegistry, Action.CAN_CANCEL_CHECK_OUT,
permissionEvaluator = new PermissionActionEvaluator(
serviceRegistry,
Action.CAN_CANCEL_CHECK_OUT,
PermissionService.CANCEL_CHECK_OUT);
}

View File

@@ -34,14 +34,13 @@ public class CanCheckInActionEvaluator extends AbstractActionEvaluator
/**
* Construct
*
* @param serviceRegistry
* @param permission
*/
protected CanCheckInActionEvaluator(ServiceRegistry serviceRegistry)
{
super(serviceRegistry, Action.CAN_CHECK_IN);
permissionEvaluator = new PermissionActionEvaluator(serviceRegistry, Action.CAN_CHECK_IN,
permissionEvaluator = new PermissionActionEvaluator(
serviceRegistry,
Action.CAN_CHECK_IN,
PermissionService.CHECK_IN);
}

View File

@@ -22,6 +22,7 @@ import org.alfresco.opencmis.dictionary.CMISNodeInfo;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockType;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.PermissionService;
import org.apache.chemistry.opencmis.commons.enums.Action;
@@ -37,26 +38,28 @@ public class CanCheckOutActionEvaluator extends AbstractActionEvaluator
/**
* Construct
*
* @param serviceRegistry
* @param permission
*/
protected CanCheckOutActionEvaluator(ServiceRegistry serviceRegistry)
{
super(serviceRegistry, Action.CAN_CHECK_OUT);
permissionEvaluator = new PermissionActionEvaluator(serviceRegistry, Action.CAN_CHECK_OUT,
permissionEvaluator = new PermissionActionEvaluator(
serviceRegistry,
Action.CAN_CHECK_OUT,
PermissionService.CHECK_OUT);
lockService = serviceRegistry.getLockService();
}
/**
* Node must be versionable, must not have a Private Working Copy and must not be locked.
*/
public boolean isAllowed(CMISNodeInfo nodeInfo)
{
if (nodeInfo.hasPWC() || lockService.getLockType(nodeInfo.getNodeRef()) == LockType.READ_ONLY_LOCK)
NodeRef nodeRef = nodeInfo.getNodeRef();
if (nodeInfo.hasPWC() || lockService.getLockType(nodeRef) == LockType.READ_ONLY_LOCK)
{
return false;
}
return permissionEvaluator.isAllowed(nodeInfo);
}
}