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:
Britt Park
2006-09-30 17:51:15 +00:00
parent 0db9ace91f
commit c2e407165e
8 changed files with 136 additions and 107 deletions

View File

@@ -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);