mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
104 lines
3.0 KiB
Java
104 lines
3.0 KiB
Java
|
|
package org.alfresco.repo.workflow;
|
|
|
|
import org.alfresco.repo.i18n.MessageService;
|
|
import org.alfresco.repo.tenant.TenantService;
|
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
|
import org.alfresco.service.cmr.workflow.WorkflowException;
|
|
import org.alfresco.service.namespace.NamespaceService;
|
|
import org.alfresco.service.namespace.QName;
|
|
|
|
/**
|
|
* @author Nick Smith
|
|
* @since 3.4.e
|
|
*/
|
|
public abstract class AlfrescoBpmEngine extends BPMEngine
|
|
{
|
|
protected TenantService tenantService;
|
|
protected MessageService messageService;
|
|
protected NamespaceService namespaceService;
|
|
protected DictionaryService dictionaryService;
|
|
protected WorkflowObjectFactory factory;
|
|
protected WorkflowAuthorityManager authorityManager;
|
|
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
@Override
|
|
public void afterPropertiesSet() throws Exception
|
|
{
|
|
super.afterPropertiesSet();
|
|
if (tenantService ==null)
|
|
{
|
|
throw new WorkflowException("TenantService not specified");
|
|
}
|
|
if (messageService ==null)
|
|
{
|
|
throw new WorkflowException("MessageService not specified");
|
|
}
|
|
if (namespaceService ==null)
|
|
{
|
|
throw new WorkflowException("NamespaceService not specified");
|
|
}
|
|
WorkflowQNameConverter qNameConverter = new WorkflowQNameConverter(namespaceService);
|
|
QName defaultStartTaskType = getDefaultStartTaskType();
|
|
this.factory = new WorkflowObjectFactory(qNameConverter, tenantService, messageService, dictionaryService, getEngineId(), defaultStartTaskType);
|
|
}
|
|
|
|
/**
|
|
* Sets the Tenant Service
|
|
*
|
|
* @param tenantService TenantService
|
|
*/
|
|
public void setTenantService(TenantService tenantService)
|
|
{
|
|
this.tenantService = tenantService;
|
|
}
|
|
|
|
/**
|
|
* Sets the Message Service
|
|
*
|
|
* @param messageService MessageService
|
|
*/
|
|
public void setMessageService(MessageService messageService)
|
|
{
|
|
this.messageService = messageService;
|
|
}
|
|
|
|
/**
|
|
* Sets the Namespace Service
|
|
*
|
|
* @param namespaceService NamespaceService
|
|
*/
|
|
public void setNamespaceService(NamespaceService namespaceService)
|
|
{
|
|
this.namespaceService = namespaceService;
|
|
}
|
|
|
|
/**
|
|
* @param dictionaryService the dictionaryService to set
|
|
*/
|
|
public void setDictionaryService(DictionaryService dictionaryService)
|
|
{
|
|
this.dictionaryService = dictionaryService;
|
|
}
|
|
|
|
/**
|
|
* @param factory the factory to set
|
|
*/
|
|
public void setWorkflowObjectFactory(WorkflowObjectFactory factory)
|
|
{
|
|
this.factory = factory;
|
|
}
|
|
|
|
/**
|
|
* @param authorityManager the authorityManager to set
|
|
*/
|
|
public void setWorkflowAuthorityManager(WorkflowAuthorityManager authorityManager)
|
|
{
|
|
this.authorityManager = authorityManager;
|
|
}
|
|
|
|
protected abstract QName getDefaultStartTaskType();
|
|
}
|