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


Java WorkflowAdminServiceImpl类代码示例

本文整理汇总了Java中org.alfresco.repo.workflow.WorkflowAdminServiceImpl的典型用法代码示例。如果您正苦于以下问题:Java WorkflowAdminServiceImpl类的具体用法?Java WorkflowAdminServiceImpl怎么用?Java WorkflowAdminServiceImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setUp

import org.alfresco.repo.workflow.WorkflowAdminServiceImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    ApplicationContext appContext = getServer().getApplicationContext();

    namespaceService = (NamespaceService) appContext.getBean("NamespaceService");
    workflowService = (WorkflowService) appContext.getBean("WorkflowService");
    MutableAuthenticationService authenticationService = (MutableAuthenticationService) appContext.getBean("AuthenticationService");
    PersonService personService = (PersonService) appContext.getBean("PersonService");
    SearchService searchService = (SearchService) appContext.getBean("SearchService");
    FileFolderService fileFolderService = (FileFolderService) appContext.getBean("FileFolderService");
    nodeService = (NodeService) appContext.getBean("NodeService");
    
    // for the purposes of the tests make sure workflow engine is enabled/visible.
    WorkflowAdminServiceImpl workflowAdminService = (WorkflowAdminServiceImpl) appContext.getBean("workflowAdminService");
    this.wfTestHelper = new WorkflowTestHelper(workflowAdminService, getEngine(), true);
    
    AuthorityService authorityService = (AuthorityService) appContext.getBean("AuthorityService");
    personManager = new TestPersonManager(authenticationService, personService, nodeService);
    groupManager = new TestGroupManager(authorityService);

    authenticationComponent = (AuthenticationComponent) appContext.getBean("authenticationComponent");
    dictionaryService = (DictionaryService) appContext.getBean("dictionaryService");

    personManager.createPerson(USER1);
    personManager.createPerson(USER2);
    personManager.createPerson(USER3);

    authenticationComponent.setSystemUserAsCurrentUser();

    groupManager.addUserToGroup(GROUP, USER2);

    packageRef = workflowService.createPackage(null);

    NodeRef companyHome = searchService.selectNodes(nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE), COMPANY_HOME, null, namespaceService, false).get(0);

    contentNodeRef = fileFolderService.create(companyHome, TEST_CONTENT + System.currentTimeMillis(), ContentModel.TYPE_CONTENT).getNodeRef();

    authenticationComponent.clearCurrentSecurityContext();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:42,代码来源:AbstractWorkflowRestApiTest.java

示例2: setUp

import org.alfresco.repo.workflow.WorkflowAdminServiceImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
    ServiceRegistry services = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
    workflowService = services.getWorkflowService();
    WorkflowAdminServiceImpl adminService = (WorkflowAdminServiceImpl) ctx.getBean(WorkflowAdminServiceImpl.NAME);

    AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
    testHelper = new WorkflowTestHelper(adminService, JBPMEngine.ENGINE_ID, false);
    testHelper.setVisible(true);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:13,代码来源:JbpmTimerTest.java

示例3: onSetUpInTransaction

import org.alfresco.repo.workflow.WorkflowAdminServiceImpl; //导入依赖的package包/类
/**
 * Called during the transaction setup
 */
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
    super.onSetUpInTransaction();
    this.invitationService = (InvitationService) this.applicationContext.getBean("InvitationService");
    this.siteService = (SiteService) this.applicationContext.getBean("SiteService");
    this.personService = (PersonService) this.applicationContext.getBean("PersonService");
    this.authenticationComponent = (AuthenticationComponent) this.applicationContext
                .getBean("authenticationComponent");
    this.invitationServiceImpl = (InvitationServiceImpl) applicationContext.getBean("invitationService");
    this.workflowAdminService = (WorkflowAdminServiceImpl)applicationContext.getBean(WorkflowAdminServiceImpl.NAME);

    this.templateService = (TemplateServiceImpl)applicationContext.getBean("templateService");
    
    this.startSendEmails = invitationServiceImpl.isSendEmails();
    
    this.enabledEngines = workflowAdminService.getEnabledEngines();
    this.visibleEngines = workflowAdminService.getVisibleEngines();

    invitationServiceImpl.setSendEmails(true);
    
    // TODO MER 20/11/2009 Bodge - turn off email sending to prevent errors
    // during unit testing
    // (or sending out email by accident from tests)
    mailService = (MailActionExecuter) ((ApplicationContextFactory) this.applicationContext
            .getBean("OutboundSMTP")).getApplicationContext().getBean("mail");
    mailService.setTestMode(true);
    
    
    createPerson(USER_MANAGER, USER_MANAGER + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_ONE, USER_ONE_EMAIL, USER_ONE_FIRSTNAME, USER_ONE_LASTNAME);
    createPerson(USER_TWO, USER_TWO + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_EVE, USER_EVE + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_NOEMAIL, null, USER_NOEMAIL, USER_NOEMAIL);

    this.authenticationComponent.setCurrentUser(USER_MANAGER);

    SiteInfo siteInfo = siteService.getSite(SITE_SHORT_NAME_INVITE);
    if (siteInfo == null)
    {
        siteInfo = siteService.createSite("InviteSitePreset", SITE_SHORT_NAME_INVITE, "InviteSiteTitle",
                    "InviteSiteDescription", SiteVisibility.MODERATED);
        
        siteService.setMembership(SITE_SHORT_NAME_INVITE, USER_NOEMAIL, SiteModel.SITE_MANAGER);
    }

    SiteInfo siteInfoRed = siteService.getSite(SITE_SHORT_NAME_RED);
    if (siteInfoRed == null)
    {
        siteService.createSite("InviteSiteRed", SITE_SHORT_NAME_RED, "InviteSiteTitle", "InviteSiteDescription",
                    SiteVisibility.MODERATED);
    }
    SiteInfo siteInfoBlue = siteService.getSite(SITE_SHORT_NAME_BLUE);
    if (siteInfoBlue == null)
    {
        siteService.createSite("InviteSiteBlue", SITE_SHORT_NAME_BLUE, "InviteSiteTitle", "InviteSiteDescription",
                    SiteVisibility.MODERATED);
    }

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

示例4: setUp

import org.alfresco.repo.workflow.WorkflowAdminServiceImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    ApplicationContext appContext = getServer().getApplicationContext();

    namespaceService = (NamespaceService) appContext.getBean("NamespaceService");
    workflowService = (WorkflowService) appContext.getBean("WorkflowService");
    MutableAuthenticationService authenticationService = (MutableAuthenticationService) appContext.getBean("AuthenticationService");
    PersonService personService = (PersonService) appContext.getBean("PersonService");
    SearchService searchService = (SearchService) appContext.getBean("SearchService");
    FileFolderService fileFolderService = (FileFolderService) appContext.getBean("FileFolderService");
    nodeService = (NodeService) appContext.getBean("NodeService");
    
    // for the purposes of the tests make sure workflow engine is enabled/visible.
    WorkflowAdminServiceImpl workflowAdminService = (WorkflowAdminServiceImpl) appContext.getBean("workflowAdminService");
    this.wfTestHelper = new WorkflowTestHelper(workflowAdminService, getEngine(), true);
    
    AuthorityService authorityService = (AuthorityService) appContext.getBean("AuthorityService");
    personManager = new TestPersonManager(authenticationService, personService, nodeService);
    groupManager = new TestGroupManager(authorityService, searchService);

    authenticationComponent = (AuthenticationComponent) appContext.getBean("authenticationComponent");
    dictionaryService = (DictionaryService) appContext.getBean("dictionaryService");

    personManager.createPerson(USER1);
    personManager.createPerson(USER2);
    personManager.createPerson(USER3);

    authenticationComponent.setSystemUserAsCurrentUser();

    groupManager.addUserToGroup(GROUP, USER2);

    packageRef = workflowService.createPackage(null);

    NodeRef companyHome = searchService.selectNodes(nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE), COMPANY_HOME, null, namespaceService, false).get(0);

    contentNodeRef = fileFolderService.create(companyHome, TEST_CONTENT + System.currentTimeMillis(), ContentModel.TYPE_CONTENT).getNodeRef();

    authenticationComponent.clearCurrentSecurityContext();
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:42,代码来源:AbstractWorkflowRestApiTest.java

示例5: onSetUpInTransaction

import org.alfresco.repo.workflow.WorkflowAdminServiceImpl; //导入依赖的package包/类
/**
 * Called during the transaction setup
 */
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
    super.onSetUpInTransaction();
    this.invitationService = (InvitationService) this.applicationContext.getBean("InvitationService");
    this.siteService = (SiteService) this.applicationContext.getBean("SiteService");
    this.personService = (PersonService) this.applicationContext.getBean("PersonService");
    this.authenticationComponent = (AuthenticationComponent) this.applicationContext
                .getBean("authenticationComponent");
    this.invitationServiceImpl = (InvitationServiceImpl) applicationContext.getBean("invitationService");
    this.workflowAdminService = (WorkflowAdminServiceImpl)applicationContext.getBean(WorkflowAdminServiceImpl.NAME); 
    
    this.templateService = (TemplateServiceImpl)applicationContext.getBean("templateService");
    
    this.startSendEmails = invitationServiceImpl.isSendEmails();
    
    this.enabledEngines = workflowAdminService.getEnabledEngines();
    this.visibleEngines = workflowAdminService.getVisibleEngines();

    invitationServiceImpl.setSendEmails(true);
    
    // TODO MER 20/11/2009 Bodge - turn off email sending to prevent errors
    // during unit testing
    // (or sending out email by accident from tests)
    mailService = (MailActionExecuter) ((ApplicationContextFactory) this.applicationContext
            .getBean("OutboundSMTP")).getApplicationContext().getBean("mail");
    mailService.setTestMode(true);
    
    
    createPerson(USER_MANAGER, USER_MANAGER + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_ONE, USER_ONE_EMAIL, USER_ONE_FIRSTNAME, USER_ONE_LASTNAME);
    createPerson(USER_TWO, USER_TWO + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_EVE, USER_EVE + "@alfrescotesting.com", PERSON_FIRSTNAME, PERSON_LASTNAME);
    createPerson(USER_NOEMAIL, null, USER_NOEMAIL, USER_NOEMAIL);

    this.authenticationComponent.setCurrentUser(USER_MANAGER);

    SiteInfo siteInfo = siteService.getSite(SITE_SHORT_NAME_INVITE);
    if (siteInfo == null)
    {
        siteInfo = siteService.createSite("InviteSitePreset", SITE_SHORT_NAME_INVITE, "InviteSiteTitle",
                    "InviteSiteDescription", SiteVisibility.MODERATED);
        
        siteService.setMembership(SITE_SHORT_NAME_INVITE, USER_NOEMAIL, SiteModel.SITE_MANAGER);
    }

    SiteInfo siteInfoRed = siteService.getSite(SITE_SHORT_NAME_RED);
    if (siteInfoRed == null)
    {
        siteService.createSite("InviteSiteRed", SITE_SHORT_NAME_RED, "InviteSiteTitle", "InviteSiteDescription",
                    SiteVisibility.MODERATED);
    }
    SiteInfo siteInfoBlue = siteService.getSite(SITE_SHORT_NAME_BLUE);
    if (siteInfoBlue == null)
    {
        siteService.createSite("InviteSiteBlue", SITE_SHORT_NAME_BLUE, "InviteSiteTitle", "InviteSiteDescription",
                    SiteVisibility.MODERATED);
    }

}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:65,代码来源:AbstractInvitationServiceImplTest.java


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