Cleanup of ACL reading/writing for PermissionsDaoComponent. All access is

through the AccessControlListDAO interface.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3700 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-06 00:41:41 +00:00
parent fff09ab01d
commit 920c487867
14 changed files with 298 additions and 196 deletions

View File

@@ -29,7 +29,6 @@ import java.util.Set;
import java.util.SortedMap;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.DbAccessControlList;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.node.AbstractNodeServiceImpl;
import org.alfresco.service.cmr.avm.AVMException;
@@ -1428,46 +1427,4 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
{
throw new UnsupportedOperationException("AVM does not support this operation.");
}
/**
* Set the ACL on a node.
* @param nodeRef The reference to the node.
* @param acl The list to set.
*/
public void setAccessControlList(NodeRef nodeRef, DbAccessControlList acl)
{
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
int version = (Integer)avmVersionPath[0];
if (version >= 0)
{
throw new InvalidNodeRefException("Read Only Node.", nodeRef);
}
try
{
fAVMService.setACL((String)avmVersionPath[1], acl);
}
catch (AVMNotFoundException e)
{
throw new InvalidNodeRefException("Not Found.", nodeRef);
}
}
/**
* Get the ACL on a node.
* @param nodeRef The reference to the node.
* @return The ACL.
*/
public DbAccessControlList getAccessControlList(NodeRef nodeRef)
{
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
try
{
return fAVMService.getACL((Integer)avmVersionPath[0],
(String)avmVersionPath[1]);
}
catch (AVMNotFoundException e)
{
throw new InvalidNodeRefException("Not Found.", nodeRef);
}
}
}