mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -36,8 +36,8 @@ public class AVMCrawlTest extends AVMServiceTestBase
|
||||
public void testCrawl()
|
||||
{
|
||||
int n = 2; // Number of Threads.
|
||||
int m = 4; // How many multiples of content to start with.
|
||||
long runTime = 1200000; // Ten minutes
|
||||
int m = 2; // How many multiples of content to start with.
|
||||
long runTime = 600000; // Ten minutes
|
||||
fService.purgeAVMStore("main");
|
||||
BulkLoader loader = new BulkLoader();
|
||||
loader.setAvmService(fService);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -891,33 +891,4 @@ public class AVMServiceImpl implements AVMService
|
||||
}
|
||||
return fAVMRepository.hasAspect(version, path, aspectName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ACL on a node.
|
||||
* @param path The path to the node.
|
||||
* @param acl The ACL to set.
|
||||
*/
|
||||
public void setACL(String path, DbAccessControlList acl)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Null path.");
|
||||
}
|
||||
fAVMRepository.setACL(path, acl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ACL on a node.
|
||||
* @param version The version to look under.
|
||||
* @param path The path to the node.
|
||||
* @return The ACL.
|
||||
*/
|
||||
public DbAccessControlList getACL(int version, String path)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Null path.");
|
||||
}
|
||||
return fAVMRepository.getACL(version, path);
|
||||
}
|
||||
}
|
||||
|
@@ -35,8 +35,8 @@ public class AVMStressTest extends AVMServiceTestBase
|
||||
{
|
||||
try
|
||||
{
|
||||
int nCopies = 4;
|
||||
int nThreads = 8;
|
||||
int nCopies = 2;
|
||||
int nThreads = 2;
|
||||
BulkLoader loader = new BulkLoader();
|
||||
loader.setAvmService(fService);
|
||||
long start = System.currentTimeMillis();
|
||||
|
@@ -32,7 +32,7 @@ public class SimultaneousLoadTest extends AVMServiceTestBase
|
||||
{
|
||||
try
|
||||
{
|
||||
int n = 8;
|
||||
int n = 4;
|
||||
int m = 1;
|
||||
fReaper.setInactiveBaseSleep(60000);
|
||||
for (int i = 0; i < n; i++)
|
||||
|
Reference in New Issue
Block a user