mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-QA to HEAD (4.2) (including moving test classes into separate folders)
51903 to 54309 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2012 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -25,9 +25,9 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class RootActionEvaluator extends AbstractActionEvaluator<NodeRef>
|
||||
public class RootActionEvaluator<ObjectType> extends AbstractActionEvaluator<ObjectType>
|
||||
{
|
||||
private AbstractActionEvaluator<NodeRef> evaluator;
|
||||
private AbstractActionEvaluator<ObjectType> evaluator;
|
||||
private boolean allow;
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ public class RootActionEvaluator extends AbstractActionEvaluator<NodeRef>
|
||||
* @param serviceRegistry
|
||||
* @param action
|
||||
*/
|
||||
protected RootActionEvaluator(AbstractActionEvaluator<NodeRef> evaluator, boolean allow)
|
||||
protected RootActionEvaluator(AbstractActionEvaluator<ObjectType> evaluator, boolean allow)
|
||||
{
|
||||
super(evaluator.getServiceRegistry(), evaluator.getAction());
|
||||
this.evaluator = evaluator;
|
||||
@@ -47,13 +47,14 @@ public class RootActionEvaluator extends AbstractActionEvaluator<NodeRef>
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.cmis.CMISActionEvaluator#isAllowed(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public boolean isAllowed(NodeRef nodeRef)
|
||||
public boolean isAllowed(ObjectType id)
|
||||
{
|
||||
if (nodeRef.equals(getServiceRegistry().getCMISService().getDefaultRootNodeRef()))
|
||||
if ((id instanceof NodeRef) && id.equals(getServiceRegistry().getCMISService().getDefaultRootNodeRef()))
|
||||
{
|
||||
return allow;
|
||||
}
|
||||
return evaluator.isAllowed(nodeRef);
|
||||
|
||||
return evaluator.isAllowed(id);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -68,4 +69,3 @@ public class RootActionEvaluator extends AbstractActionEvaluator<NodeRef>
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user