org.alfresco.repo.security.permissions.impl
Class AbstractReadPermissionTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.security.permissions.impl.AbstractReadPermissionTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ReadPermissionTest

public class AbstractReadPermissionTest
extends junit.framework.TestCase


Nested Class Summary
protected  class AbstractReadPermissionTest.Counter
           
 
Field Summary
protected  AccessControlListDAO accessControlListDao
           
protected  AclDAO aclDaoComponent
           
protected  ADMLuceneIndexer admLuceneIndexer
           
protected static org.springframework.context.ApplicationContext applicationContext
           
protected  AuthenticationComponent authenticationComponent
           
protected  MutableAuthenticationDao authenticationDAO
           
protected  MutableAuthenticationService authenticationService
           
protected  java.lang.String[] authorities
           
protected  AuthorityDAO authorityDAO
           
protected  AuthorityService authorityService
           
protected  java.lang.String AVMStore
           
protected  AbstractReadPermissionTest.Counter c0001
           
protected  AbstractReadPermissionTest.Counter c001
           
protected  AbstractReadPermissionTest.Counter c01
           
protected  int COUNT
           
protected  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
           
protected  FileFolderService fileFolderService
           
protected  IndexerAndSearcher fIndexerAndSearcher
           
protected  AVMService fService
           
protected  boolean logToFile
           
protected  org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver
           
protected  NodeDAO nodeDAO
           
protected  org.alfresco.service.cmr.repository.NodeService nodeService
           
protected  OwnableService ownableService
           
protected  ModelDAO permissionModelDAO
           
protected  PermissionServiceSPI permissionService
           
protected  PersonService personService
           
protected  RetryingTransactionHelper retryingTransactionHelper
           
protected static java.lang.String ROLE_AUTHENTICATED
           
protected  org.alfresco.service.cmr.repository.NodeRef rootNodeRef
           
protected  ServiceRegistry serviceRegistry
           
protected  org.springframework.orm.hibernate3.LocalSessionFactoryBean sessionFactory
           
protected  org.alfresco.service.cmr.repository.NodeRef systemNodeRef
           
protected  java.lang.String TEST_RUN
           
protected  java.lang.String TEST_WEBPROJ_DEFAULT_WEBAPP
           
protected  java.lang.String TEST_WEBPROJ_DESCRIPTION
           
protected  java.lang.String TEST_WEBPROJ_DNS
           
protected  boolean TEST_WEBPROJ_DONT_USE_AS_TEMPLATE
           
protected  java.lang.String TEST_WEBPROJ_NAME
           
protected  java.lang.String TEST_WEBPROJ_TITLE
           
protected  boolean TEST_WEBPROJ_USE_AS_TEMPLATE
           
protected  javax.transaction.UserTransaction testTX
           
protected  TransactionService transactionService
           
protected  java.lang.String[] webAuthorities
           
protected  WebProjectService wpService
           
 
Constructor Summary
AbstractReadPermissionTest()
           
 
Method Summary
protected  org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority, int returnNodes, boolean inherit)
           
protected  org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority, java.lang.String permission, boolean inherit)
           
protected  org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority, java.lang.String permission, int returnNodes, boolean inherit)
           
protected  void build1000NodesReadDenied(java.lang.String authority)
           
protected  void buildNodes()
           
protected  void buildNodes(java.lang.String user, java.lang.String permission, int n, boolean inherit)
           
protected  org.alfresco.service.cmr.repository.NodeRef[] buildOwnedNodes(java.lang.String authority, int returnNodes)
           
protected  void createAuthentication(java.lang.String name)
           
protected  void createGroup(java.lang.String name)
           
protected  void deleteAuthentication(java.lang.String name)
           
protected  void runAs(java.lang.String userName)
           
 void setUp()
           
protected  void setupBasicTree(java.lang.String authority)
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

applicationContext

protected static org.springframework.context.ApplicationContext applicationContext

ROLE_AUTHENTICATED

protected static final java.lang.String ROLE_AUTHENTICATED
See Also:
Constant Field Values

nodeService

protected org.alfresco.service.cmr.repository.NodeService nodeService

dictionaryService

protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService

permissionService

protected PermissionServiceSPI permissionService

authenticationService

protected MutableAuthenticationService authenticationService

authenticationDAO

protected MutableAuthenticationDao authenticationDAO

sessionFactory

protected org.springframework.orm.hibernate3.LocalSessionFactoryBean sessionFactory

rootNodeRef

protected org.alfresco.service.cmr.repository.NodeRef rootNodeRef

namespacePrefixResolver

protected org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver

serviceRegistry

protected ServiceRegistry serviceRegistry

systemNodeRef

protected org.alfresco.service.cmr.repository.NodeRef systemNodeRef

authenticationComponent

protected AuthenticationComponent authenticationComponent

permissionModelDAO

protected ModelDAO permissionModelDAO

personService

protected PersonService personService

authorityService

protected AuthorityService authorityService

authorityDAO

protected AuthorityDAO authorityDAO

nodeDAO

protected NodeDAO nodeDAO

aclDaoComponent

protected AclDAO aclDaoComponent

admLuceneIndexer

protected ADMLuceneIndexer admLuceneIndexer

retryingTransactionHelper

protected RetryingTransactionHelper retryingTransactionHelper

transactionService

protected TransactionService transactionService

accessControlListDao

protected AccessControlListDAO accessControlListDao

fileFolderService

protected FileFolderService fileFolderService

ownableService

protected OwnableService ownableService

testTX

protected javax.transaction.UserTransaction testTX

fService

protected AVMService fService

fIndexerAndSearcher

protected IndexerAndSearcher fIndexerAndSearcher

wpService

protected WebProjectService wpService

logToFile

protected boolean logToFile

webAuthorities

protected java.lang.String[] webAuthorities

authorities

protected java.lang.String[] authorities

AVMStore

protected java.lang.String AVMStore

TEST_RUN

protected final java.lang.String TEST_RUN

TEST_WEBPROJ_DNS

protected final java.lang.String TEST_WEBPROJ_DNS

TEST_WEBPROJ_NAME

protected final java.lang.String TEST_WEBPROJ_NAME

TEST_WEBPROJ_TITLE

protected final java.lang.String TEST_WEBPROJ_TITLE
See Also:
Constant Field Values

TEST_WEBPROJ_DESCRIPTION

protected final java.lang.String TEST_WEBPROJ_DESCRIPTION
See Also:
Constant Field Values

TEST_WEBPROJ_DEFAULT_WEBAPP

protected final java.lang.String TEST_WEBPROJ_DEFAULT_WEBAPP
See Also:
Constant Field Values

TEST_WEBPROJ_USE_AS_TEMPLATE

protected final boolean TEST_WEBPROJ_USE_AS_TEMPLATE
See Also:
Constant Field Values

TEST_WEBPROJ_DONT_USE_AS_TEMPLATE

protected final boolean TEST_WEBPROJ_DONT_USE_AS_TEMPLATE
See Also:
Constant Field Values

COUNT

protected int COUNT

c01

protected AbstractReadPermissionTest.Counter c01

c001

protected AbstractReadPermissionTest.Counter c001

c0001

protected AbstractReadPermissionTest.Counter c0001
Constructor Detail

AbstractReadPermissionTest

public AbstractReadPermissionTest()
Method Detail

createAuthentication

protected void createAuthentication(java.lang.String name)

createGroup

protected void createGroup(java.lang.String name)

runAs

protected void runAs(java.lang.String userName)

build1000Nodes

protected org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority,
                                                                       int returnNodes,
                                                                       boolean inherit)

buildOwnedNodes

protected org.alfresco.service.cmr.repository.NodeRef[] buildOwnedNodes(java.lang.String authority,
                                                                        int returnNodes)

buildNodes

protected void buildNodes(java.lang.String user,
                          java.lang.String permission,
                          int n,
                          boolean inherit)

build1000Nodes

protected org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority,
                                                                       java.lang.String permission,
                                                                       int returnNodes,
                                                                       boolean inherit)

build1000Nodes

protected org.alfresco.service.cmr.repository.NodeRef[] build1000Nodes(java.lang.String authority,
                                                                       java.lang.String permission,
                                                                       boolean inherit)

build1000NodesReadDenied

protected void build1000NodesReadDenied(java.lang.String authority)

buildNodes

protected void buildNodes()

setupBasicTree

protected void setupBasicTree(java.lang.String authority)
                       throws java.lang.Exception
Throws:
java.lang.Exception

deleteAuthentication

protected void deleteAuthentication(java.lang.String name)

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.