mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Changed AVMNodeConverter.ToAVMVersionPath() to return a
Pair<Integer, String>. Fixed avm.jsp which got busted by last checkin. Added implementation of AddChild to AVMNodeService. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3983 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,7 @@ import org.alfresco.repo.domain.DbAccessControlList;
|
||||
import org.alfresco.service.cmr.avm.AVMException;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* The AVM implementation for getting and setting ACLs.
|
||||
@@ -56,9 +57,9 @@ public class AVMAccessControlListDAO implements AccessControlListDAO
|
||||
*/
|
||||
public DbAccessControlList getAccessControlList(NodeRef nodeRef)
|
||||
{
|
||||
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = (Integer)avmVersionPath[0];
|
||||
String path = (String)avmVersionPath[1];
|
||||
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = avmVersionPath.getFirst();
|
||||
String path = avmVersionPath.getSecond();
|
||||
try
|
||||
{
|
||||
return fAVMRepository.getACL(version, path);
|
||||
@@ -77,13 +78,13 @@ public class AVMAccessControlListDAO implements AccessControlListDAO
|
||||
*/
|
||||
public void setAccessControlList(NodeRef nodeRef, DbAccessControlList acl)
|
||||
{
|
||||
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = (Integer)avmVersionPath[0];
|
||||
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = avmVersionPath.getFirst();
|
||||
if (version >= 0)
|
||||
{
|
||||
throw new InvalidNodeRefException("Read Only Node.", nodeRef);
|
||||
}
|
||||
String path = (String)avmVersionPath[1];
|
||||
String path = avmVersionPath.getSecond();
|
||||
try
|
||||
{
|
||||
fAVMRepository.setACL(path, acl);
|
||||
|
Reference in New Issue
Block a user