本文整理汇总了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();
}
示例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);
}
示例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);
}
}
示例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();
}
示例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);
}
}