当前位置: 首页>>代码示例>>Java>>正文


Java Repository.getCompanyHome方法代码示例

本文整理汇总了Java中org.alfresco.repo.model.Repository.getCompanyHome方法的典型用法代码示例。如果您正苦于以下问题:Java Repository.getCompanyHome方法的具体用法?Java Repository.getCompanyHome怎么用?Java Repository.getCompanyHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.repo.model.Repository的用法示例。


在下文中一共展示了Repository.getCompanyHome方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initBasicServices

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@BeforeClass public static void initBasicServices() throws Exception
{
    behaviourFilter = (BehaviourFilter)APP_CONTEXT_INIT.getApplicationContext().getBean("policyBehaviourFilter");
    contentService = (ContentService)APP_CONTEXT_INIT.getApplicationContext().getBean("ContentService");
    nodeService = (NodeService)APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService");
    repositoryHelper = (Repository)APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
    siteService = (SiteService)APP_CONTEXT_INIT.getApplicationContext().getBean("SiteService");
    transactionHelper = (RetryingTransactionHelper)APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper");

    authenticationComponent = (AuthenticationComponent)APP_CONTEXT_INIT.getApplicationContext().getBean("authenticationComponent");
    commentService = (CommentService)APP_CONTEXT_INIT.getApplicationContext().getBean("commentService");
    authenticationService = (MutableAuthenticationService)APP_CONTEXT_INIT.getApplicationContext().getBean("AuthenticationService");
    personService = (PersonService)APP_CONTEXT_INIT.getApplicationContext().getBean("PersonService");
    postDAO = (ActivityPostDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("postDAO");
    permissionServiceImpl = (PermissionServiceImpl)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionServiceImpl");
    permissionModelDAO = (ModelDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionsModelDAO");
    lockService = (LockService)APP_CONTEXT_INIT.getApplicationContext().getBean("lockService");

    COMPANY_HOME = repositoryHelper.getCompanyHome();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:21,代码来源:CommentsTest.java

示例2: initStaticData

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@BeforeClass public static void initStaticData() throws Exception
{
    COPY_SERVICE              = (CopyService)                 APP_CONTEXT_INIT.getApplicationContext().getBean("copyService");
    NODE_SERVICE              = (NodeService)                 APP_CONTEXT_INIT.getApplicationContext().getBean("nodeService");
    RATING_NAMING_CONVENTIONS = (RatingNamingConventionsUtil) APP_CONTEXT_INIT.getApplicationContext().getBean("rollupNamingConventions");
    RATING_SERVICE            = (RatingService)               APP_CONTEXT_INIT.getApplicationContext().getBean("ratingService");
    SCRIPT_SERVICE            = (ScriptService)               APP_CONTEXT_INIT.getApplicationContext().getBean("scriptService");
    TRANSACTION_HELPER        = (RetryingTransactionHelper)   APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper");
    
    Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
    COMPANY_HOME = repositoryHelper.getCompanyHome();
    
    // Create some static test content
    TEST_FOLDER = STATIC_TEST_NODES.createNode(COMPANY_HOME, "testFolder", ContentModel.TYPE_FOLDER, AuthenticationUtil.getAdminUserName());
    COPY_DEST_FOLDER = STATIC_TEST_NODES.createNode(COMPANY_HOME, "testCopyDestinationFolder", ContentModel.TYPE_FOLDER, AuthenticationUtil.getAdminUserName());

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:RatingServiceIntegrationTest.java

示例3: setupTest

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@BeforeClass public static void setupTest() throws Exception
{
	
	SERVICE_REGISTRY          = (ServiceRegistry)APP_CONTEXT_INIT.getApplicationContext().getBean(ServiceRegistry.SERVICE_REGISTRY);
    NODE_SERVICE              = SERVICE_REGISTRY.getNodeService();
    TRANSACTION_HELPER        = SERVICE_REGISTRY.getTransactionService().getRetryingTransactionHelper();
    ACTION_SERVICE			  = SERVICE_REGISTRY.getActionService();
    RULE_SERVICE			  = SERVICE_REGISTRY.getRuleService();
    CONTENT_SERVICE 		  = SERVICE_REGISTRY.getContentService();
    MAIL_ACTION_EXECUTER 		  = APP_CONTEXT_INIT.getApplicationContext().getBean("OutboundSMTP", ApplicationContextFactory.class).getApplicationContext().getBean("mail", MailActionExecuter.class);
    
    WAS_IN_TEST_MODE = MAIL_ACTION_EXECUTER.isTestMode();
    MAIL_ACTION_EXECUTER.setTestMode(true);
    
    Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
    COMPANY_HOME = repositoryHelper.getCompanyHome();
    
    // Create some static test content
    TEST_FOLDER = STATIC_TEST_NODES.createNode(COMPANY_HOME, "testFolder", ContentModel.TYPE_FOLDER, AuthenticationUtil.getAdminUserName());
   
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:RuleServiceIntegrationTest.java

示例4: testConvertMultiplePropertyForActivitiScriptNode

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
/**
 *  MNT-16053: Conversion for property with multiple=true, on an Activiti script node, fails.
 */
@Test
public void testConvertMultiplePropertyForActivitiScriptNode()
{
    ArrayList<String> numbers = new ArrayList<>();
    numbers.add("Phone #1");
    numbers.add("Phone #2");
    Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext()
            .getBean("repositoryHelper");
    NodeRef companyHome = repositoryHelper.getCompanyHome();

    ActivitiScriptNode scriptNode = new ActivitiScriptNode(companyHome, SERVICE_REGISTRY); 
    try 
    {
        // Do a conversion of a multiple property (this is a residual property, but it doesn't matter, the conversion code is the same, regardless of the property being in the model or not).
        scriptNode.getValueConverter().convertValueForScript(QName.createQName("cm:phonenumbers"), numbers);
    }
    catch (Exception e)
    {
        fail("Converting multiple property for Activiti script fails with " + e);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:ScriptNodeTest.java

示例5: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception
{
    ctx = ApplicationContextHelper.getApplicationContext();
    ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
    txnHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper();
    fileFolderService = serviceRegistry.getFileFolderService();
    repository = (Repository) ctx.getBean("repositoryHelper");
    fixedAclUpdater = (FixedAclUpdater) ctx.getBean("fixedAclUpdater");
    permissionsDaoComponent = (PermissionsDaoComponent) ctx.getBean("admPermissionsDaoComponent");
    permissionService = (PermissionService) ctx.getBean("permissionService");
    nodeDAO = (NodeDAO) ctx.getBean("nodeDAO");

    AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());

    NodeRef home = repository.getCompanyHome();
    // create a folder hierarchy for which will change permission inheritance
    int[] filesPerLevel = { 5, 5, 10 };
    RetryingTransactionCallback<NodeRef> cb = createFolderHierchyCallback(home, fileFolderService, "ROOT", filesPerLevel);
    folderNodeRef = txnHelper.doInTransaction(cb);

    // change setFixedAclMaxTransactionTime to lower value so setInheritParentPermissions on created folder hierarchy require async call
    setFixedAclMaxTransactionTime(permissionsDaoComponent, home, 50);

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:FixedAclUpdaterTest.java

示例6: testRelativePath

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
/**
 * MNT-16380
 */
public void testRelativePath() throws Exception
{
    Repository repositoryHelper = (Repository) getServer().getApplicationContext().getBean("repositoryHelper");
    NodeRef companyHome = repositoryHelper.getCompanyHome();

    rootFolder = createNode(companyHome, "rootFolder", ContentModel.TYPE_FOLDER);

    NodeRef doc1 = createNodeWithTextContent(rootFolder, "doc1", ContentModel.TYPE_CONTENT, "doc1 file content");

    NodeRef folderX = createNode(rootFolder, "X", ContentModel.TYPE_FOLDER);
    NodeRef folderY = createNode(folderX, "Y", ContentModel.TYPE_FOLDER);
    NodeRef folderZ = createNode(folderY, "Z", ContentModel.TYPE_FOLDER);

    NodeRef doc2 = createNodeWithTextContent(folderZ, "doc2", ContentModel.TYPE_CONTENT, "doc2 file content");

    // uri with relative path at the end
    String uri = URL_CONTENT_DOWNLOAD + doc1.getId() + "/X/Y/Z/doc2";
    Response resp = sendRequest(new GetRequest(uri), 200);

    // check if we really have doc2 as target
    Assert.assertEquals("doc2 file content", resp.getContentAsString());
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:26,代码来源:ContentGetTest.java

示例7: onSetUpInTransaction

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
/**
 * Called during the transaction setup
 */
@SuppressWarnings("deprecation")
protected void onSetUpInTransaction() throws Exception
{
    super.onSetUpInTransaction();

    // Get the required services
    this.nodeService = (NodeService) this.getApplicationContext().getBean("NodeService");
    this.serviceRegistry = (ServiceRegistry) this.getApplicationContext().getBean("ServiceRegistry");
    this.nodeCrawlerFactory = (NodeCrawlerFactory) this.getApplicationContext().getBean("NodeCrawlerFactory");
    Repository repositoryHelper = (Repository) this.applicationContext.getBean("repositoryHelper");
    this.companyHome = repositoryHelper.getCompanyHome();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:NodeCrawlerTest.java

示例8: createTestContent

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
/**
 * Create test content, can be versionable.
 * @param versionable boolean
 */
private void createTestContent(boolean versionable)
{
    Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
    NodeRef companyHome = repositoryHelper.getCompanyHome();
     
    // Create some test content
    testNode = testNodes.createQuickFile(MimetypeMap.MIMETYPE_TEXT_PLAIN, companyHome, "userOnesDoc", TEST_USER1.getUsername(), versionable);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:ScriptNodeTest.java

示例9: initStaticData

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@BeforeClass public static void initStaticData() throws Exception
{
    CONTENT_SERVICE           = APP_CONTEXT_INIT.getApplicationContext().getBean("ContentService", ContentService.class);
    PERSON_SERVICE            = APP_CONTEXT_INIT.getApplicationContext().getBean("PersonService", PersonService.class);
    PREFERENCE_SERVICE        = APP_CONTEXT_INIT.getApplicationContext().getBean("PreferenceService", PreferenceService.class);
    SCRIPT_SERVICE            = APP_CONTEXT_INIT.getApplicationContext().getBean("ScriptService", ScriptService.class);
    TRANSACTION_HELPER        = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
    
    Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
    COMPANY_HOME = repositoryHelper.getCompanyHome();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:PreferenceServiceImplTest.java

示例10: initStaticData

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@BeforeClass public static void initStaticData() throws Exception
{
    COCI_SERVICE       = APP_CONTEXT_INIT.getApplicationContext().getBean("checkOutCheckInService", CheckOutCheckInService.class);
    CONTENT_SERVICE    = APP_CONTEXT_INIT.getApplicationContext().getBean("ContentService", ContentService.class);
    NODE_SERVICE       = APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService", NodeService.class);
    SITE_SERVICE       = APP_CONTEXT_INIT.getApplicationContext().getBean("SiteService", SiteService.class);
    TRANSACTION_HELPER = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
    VERSION_SERVICE    = APP_CONTEXT_INIT.getApplicationContext().getBean("VersionService", VersionService.class);
    
    Repository repositoryHelper = APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper", Repository.class);
    COMPANY_HOME = repositoryHelper.getCompanyHome();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:TemporaryNodesTest.java

示例11: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception
{
    transactionService = ctx.getBean("transactionService", TransactionService.class);
    searchService = ctx.getBean("SearchService", SearchService.class);
    nodeService = ctx.getBean("NodeService", NodeService.class);
    contentService = ctx.getBean("contentService", ContentService.class);
    webDAVHelper = ctx.getBean("webDAVHelper", WebDAVHelper.class);         
    repositoryHelper = (Repository)ctx.getBean("repositoryHelper");
    companyHomeNodeRef = repositoryHelper.getCompanyHome();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:12,代码来源:DeleteMethodTest.java

示例12: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@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();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:28,代码来源:WebDAVonContentUpdateTest.java

示例13: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@Override
protected void setUp() throws Exception
{
    applicationContext = ApplicationContextHelper.getApplicationContext();
    repositoryHelper = (Repository)this.applicationContext.getBean("repositoryHelper");
    ApplicationContextFactory fileServers = (ApplicationContextFactory) this.applicationContext.getBean("fileServers");
    cifsHelper = (CifsHelper) fileServers.getApplicationContext().getBean("cifsHelper");
    driver = (ExtendedDiskInterface)this.applicationContext.getBean("contentDiskDriver");
    mlAwareNodeService = (NodeService) this.applicationContext.getBean("mlAwareNodeService"); 
    nodeService = (NodeService)applicationContext.getBean("nodeService");
    transactionService = (TransactionService)applicationContext.getBean("transactionService");
    contentService = (ContentService)applicationContext.getBean("contentService");
    ruleService = (RuleService)applicationContext.getBean("ruleService");
    actionService = (ActionService)this.applicationContext.getBean("actionService");
    personService = (PersonService) this.applicationContext.getBean("personService");
    authenticationService = (MutableAuthenticationService) this.applicationContext.getBean("authenticationService");
    permissionService = (PermissionService) this.applicationContext.getBean("permissionService");
    ownableService = (OwnableService) this.applicationContext.getBean("ownableService");
    fileFolderService = (FileFolderService) this.applicationContext.getBean("fileFolderService");
    checkOutCheckInService = (CheckOutCheckInService) this.applicationContext.getBean("checkOutCheckInService");
    
    assertNotNull("content disk driver is null", driver);
    assertNotNull("repositoryHelper is null", repositoryHelper);
    assertNotNull("mlAwareNodeService is null", mlAwareNodeService);
    assertNotNull("nodeService is null", nodeService);
    assertNotNull("transactionService is null", transactionService);
    assertNotNull("contentService is null", contentService);
    assertNotNull("ruleService is null", ruleService);
    assertNotNull("actionService is null", actionService);
    assertNotNull("cifsHelper", cifsHelper);
    assertNotNull("checkOutCheckInService", checkOutCheckInService);
    
    AuthenticationUtil.setRunAsUserSystem();
    
    // remove our test root 
    RetryingTransactionCallback<Void> removeRootCB = new RetryingTransactionCallback<Void>() {

        @Override
        public Void execute() throws Throwable
        {
            NodeRef companyHome = repositoryHelper.getCompanyHome();
            NodeRef rootNode = nodeService.getChildByName(companyHome, ContentModel.ASSOC_CONTAINS, TEST_ROOT_PATH);
            if(rootNode != null)
            {
                logger.debug("Clean up test root node");
                nodeService.deleteNode(rootNode);
            }
            return null;
        }
    };
    final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
    
    tran.doInTransaction(removeRootCB, false, true);
    
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:56,代码来源:ContentDiskDriverTest.java

示例14: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@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);
    authenticationService = ctx.getBean("authenticationService", MutableAuthenticationService.class);
    personService = ctx.getBean("PersonService", PersonService.class);
    lockService = ctx.getBean("LockService", LockService.class);
    contentService = ctx.getBean("contentService", ContentService.class);
    checkOutCheckInService = ctx.getBean("CheckOutCheckInService", CheckOutCheckInService.class);
    permissionService = ctx.getBean("PermissionService", PermissionService.class);
    namespaceService = ctx.getBean("namespaceService", NamespaceService.class);

    AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());

    repositoryHelper = (Repository)ctx.getBean("repositoryHelper");
    companyHomeNodeRef = repositoryHelper.getCompanyHome();
    txn = transactionService.getUserTransaction();
    txn.begin();
    createUser(USER1_NAME);
    createUser(USER2_NAME);

    InputStream testDataIS = getClass().getClassLoader().getResourceAsStream(TEST_DATA_FILE_NAME);
    InputStream davLockInfoAdminIS = getClass().getClassLoader().getResourceAsStream(DAV_LOCK_INFO_ADMIN);
    InputStream davLockInfoUser2IS = getClass().getClassLoader().getResourceAsStream(DAV_LOCK_INFO_USER2);
    
    testDataFile = IOUtils.toByteArray(testDataIS);
    davLockInfoAdminFile = IOUtils.toByteArray(davLockInfoAdminIS);
    davLockInfoUser2File = IOUtils.toByteArray(davLockInfoUser2IS);

    testDataIS.close();
    davLockInfoAdminIS.close();
    davLockInfoUser2IS.close();

    // Create a test file with versionable aspect and content
    Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
    versionableDocName = "doc-" + GUID.generate();
    properties.put(ContentModel.PROP_NAME, versionableDocName);

    versionableDoc = nodeService.createNode(companyHomeNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName(ContentModel.USER_MODEL_URI, versionableDocName),
            ContentModel.TYPE_CONTENT, properties).getChildRef();
    contentService.getWriter(versionableDoc, ContentModel.PROP_CONTENT, true).putContent("WebDAVTestContent");
    nodeService.addAspect(versionableDoc, ContentModel.ASPECT_VERSIONABLE, null);

    txn.commit();

    txn = transactionService.getUserTransaction();
    txn.begin();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:53,代码来源:PutMethodTest.java

示例15: setUp

import org.alfresco.repo.model.Repository; //导入方法依赖的package包/类
@Override
protected void setUp() throws Exception
{
    applicationContext = ApplicationContextHelper.getApplicationContext();

    // Get the required services
    descriptorService = (DescriptorService) this.applicationContext.getBean("DescriptorService");
    transferServiceImpl = (TransferServiceImpl2) this.applicationContext.getBean("transferService2");
    transferService = transferServiceImpl;
    authenticationComponent = (AuthenticationComponent) applicationContext.getBean("authenticationComponent");
    transactionService = (TransactionService) applicationContext.getBean("transactionComponent");
    repository = (Repository) applicationContext.getBean("repositoryHelper");
    fileFolderService = (FileFolderService) applicationContext.getBean("fileFolderService");
           
    localRepositoryId = descriptorService.getCurrentRepositoryDescriptor().getId();
    version =  new TransferVersionImpl(descriptorService.getServerDescriptor());
    
    mockedTransferTransmitter = mock(TransferTransmitter.class);
    mockedCallback = mock(TransferCallback.class);
    transferServiceImpl.setTransmitter(mockedTransferTransmitter);

    authenticationComponent.setCurrentUser("admin");
    
    tx = transactionService.getUserTransaction();
    tx.begin();
    target = createTransferTarget(TRANSFER_TARGET_NAME);
    tx.commit();
        
    tx = transactionService.getUserTransaction();
    tx.begin();
    
    transfer = new Transfer();
    transfer.setTransferTarget(target);
    transfer.setTransferId(GUID.generate());
    transfer.setToVersion(version);
    
    companyHome = repository.getCompanyHome();
    
    folder1 = fileFolderService.create(companyHome, "folder1", ContentModel.TYPE_FOLDER).getNodeRef();

    file1 = fileFolderService.create(folder1, "file1", ContentModel.TYPE_CONTENT).getNodeRef();
    fileFolderService.getWriter(file1).putContent("This is purely test content.");
    file1ContentUrl = fileFolderService.getFileInfo(file1).getContentData().getContentUrl();

    file2 = fileFolderService.create(folder1, "file2", ContentModel.TYPE_CONTENT).getNodeRef();
    fileFolderService.getWriter(file2).putContent("This is purely test content.");
    file2ContentUrl = fileFolderService.getFileInfo(file2).getContentData().getContentUrl();
    
    file3 = fileFolderService.create(folder1, "file3", ContentModel.TYPE_CONTENT).getNodeRef();
    fileFolderService.getWriter(file3).putContent("This is purely test content.");
    file3ContentUrl = fileFolderService.getFileInfo(file3).getContentData().getContentUrl();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:53,代码来源:TransferServiceCallbackTest.java


注:本文中的org.alfresco.repo.model.Repository.getCompanyHome方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。