Kie :: Spring 6.2.0.CR2

org.kie.spring.factorybeans
Class TaskServiceFactoryBean

java.lang.Object
  extended by org.kie.spring.factorybeans.TaskServiceFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class TaskServiceFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

Creates instance of TaskService based on set properties. Following are mandatory properties that must be provided:

Transaction Manager must be Spring transaction manager as based on its presence entire persistence and transaction support is configured.
Optionally EntityManager can be provided to be used instead of always creating new one from EntityManagerFactory - e.g. when using shared entity manager from Spring.
In addition to above there are optional properties that can be set on task service instance: This factory creates single instance of task service only as it's intended to be shared across all other beans in the system.


Constructor Summary
TaskServiceFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void checkPersistence()
           
 void close()
           
 javax.persistence.EntityManager getEntityManager()
           
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
           
 List<org.jbpm.services.task.lifecycle.listeners.TaskLifeCycleEventListener> getListeners()
           
 Object getObject()
           
 Class<?> getObjectType()
           
 org.springframework.transaction.PlatformTransactionManager getTransactionManager()
           
 org.kie.api.task.UserGroupCallback getUserGroupCallback()
           
 org.kie.internal.task.api.UserInfo getUserInfo()
           
 boolean isSingleton()
           
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
           
 void setListeners(List<org.jbpm.services.task.lifecycle.listeners.TaskLifeCycleEventListener> listeners)
           
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 void setUserGroupCallback(org.kie.api.task.UserGroupCallback userGroupCallback)
           
 void setUserInfo(org.kie.internal.task.api.UserInfo userInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskServiceFactoryBean

public TaskServiceFactoryBean()
Method Detail

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

close

public void close()

checkPersistence

protected void checkPersistence()

getEntityManagerFactory

public javax.persistence.EntityManagerFactory getEntityManagerFactory()

setEntityManagerFactory

public void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)

getEntityManager

public javax.persistence.EntityManager getEntityManager()

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)

getTransactionManager

public org.springframework.transaction.PlatformTransactionManager getTransactionManager()

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

getUserGroupCallback

public org.kie.api.task.UserGroupCallback getUserGroupCallback()

setUserGroupCallback

public void setUserGroupCallback(org.kie.api.task.UserGroupCallback userGroupCallback)

getUserInfo

public org.kie.internal.task.api.UserInfo getUserInfo()

setUserInfo

public void setUserInfo(org.kie.internal.task.api.UserInfo userInfo)

getListeners

public List<org.jbpm.services.task.lifecycle.listeners.TaskLifeCycleEventListener> getListeners()

setListeners

public void setListeners(List<org.jbpm.services.task.lifecycle.listeners.TaskLifeCycleEventListener> listeners)

Kie :: Spring 6.2.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.