Search in sources :

Example 1 with PolicyComponent

use of org.alfresco.repo.policy.PolicyComponent in project alfresco-remote-api by Alfresco.

the class WebDAVonContentUpdateTest method setUp.

@Before
public void setUp() throws Exception {
    searchService = ctx.getBean("SearchService", SearchService.class);
    fileFolderService = ctx.getBean("FileFolderService", FileFolderService.class);
    nodeService = ctx.getBean("NodeService", NodeService.class);
    transactionService = ctx.getBean("transactionService", TransactionService.class);
    webDAVHelper = ctx.getBean("webDAVHelper", WebDAVHelper.class);
    lockService = ctx.getBean("LockService", LockService.class);
    policyComponent = ctx.getBean("policyComponent", PolicyComponent.class);
    namespaceService = ctx.getBean("namespaceService", NamespaceService.class);
    AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
    repositoryHelper = (Repository) ctx.getBean("repositoryHelper");
    companyHomeNodeRef = repositoryHelper.getCompanyHome();
    InputStream testDataIS = getClass().getClassLoader().getResourceAsStream(TEST_DATA_FILE_NAME);
    InputStream davLockInfoIS = getClass().getClassLoader().getResourceAsStream(DAV_LOCK_INFO_XML);
    testDataFile = IOUtils.toByteArray(testDataIS);
    davLockInfoFile = IOUtils.toByteArray(davLockInfoIS);
    testDataIS.close();
    davLockInfoIS.close();
    txn = transactionService.getUserTransaction();
    txn.begin();
}
Also used : PolicyComponent(org.alfresco.repo.policy.PolicyComponent) TransactionService(org.alfresco.service.transaction.TransactionService) LockService(org.alfresco.service.cmr.lock.LockService) NamespaceService(org.alfresco.service.namespace.NamespaceService) InputStream(java.io.InputStream) SearchService(org.alfresco.service.cmr.search.SearchService) NodeService(org.alfresco.service.cmr.repository.NodeService) FileFolderService(org.alfresco.service.cmr.model.FileFolderService) Before(org.junit.Before)

Aggregations

InputStream (java.io.InputStream)1 PolicyComponent (org.alfresco.repo.policy.PolicyComponent)1 LockService (org.alfresco.service.cmr.lock.LockService)1 FileFolderService (org.alfresco.service.cmr.model.FileFolderService)1 NodeService (org.alfresco.service.cmr.repository.NodeService)1 SearchService (org.alfresco.service.cmr.search.SearchService)1 NamespaceService (org.alfresco.service.namespace.NamespaceService)1 TransactionService (org.alfresco.service.transaction.TransactionService)1 Before (org.junit.Before)1