|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.poscoict.glueframework.biz.activity.GlueActivity<C>
public abstract class GlueActivity<C extends GlueContext>
GlueActivity
Class는 모든 Chain에서 상속받아야 하는 Super Class이다. Activity Class는 Service의 Member로 Service단위로 생성이 되기 때문에 해당 Class의
Member 변수를 생성하여 사용할 경우에는 Thread마다 고유한 값을 가질 수 없고 재사용 된다. 아래는 {xxx}-service.xml 파일의 Activity 정의 이다.
예제사용 예# 1 {xxx}-service.xml 의 일부 예제에서 'property' 속성을 Member 변수로 가지고 있고 이 값은 Activity Class(BizLogicActivity)에서 호출 하여 사용할 수 있다.
Field Summary | |
---|---|
protected Map<String,String> |
dynamicProperties
동적으로 관리되는 property |
protected org.slf4j.Logger |
logger
logger |
Constructor Summary | |
---|---|
GlueActivity()
|
Method Summary | |
---|---|
void |
commitTransaction(C ctx,
String transactionMgrKey)
트랜잭션을 커밋한다. |
void |
commitTransaction(String transactionMgrKey)
트랜잭션을 커밋한다. |
GlueGenericDao |
getDao(String daoKey)
applicationContext.xml에 정의된 dao가져오기. |
List<String> |
getEventList()
getter method. |
String |
getName()
getter method. |
String |
getProperty(String key)
getter mehod. |
Set<String> |
getPropertyNames()
정적 property의 key set. |
Map<String,String> |
getTransition()
getter method. |
void |
rollbackTransaction(C ctx,
String transactionMgrKey)
트랜잭션을 롤백한다. |
void |
rollbackTransaction(String transactionMgrKey)
트랜잭션을 롤백한다. |
abstract String |
runActivity(C ctx)
Sub Class에서 반드시 구현하여야 하는 Abstract Method 이며 이 Method는 F/W에서 호출한다. |
void |
setEventList(List<String> eventList)
setter method. internal use. |
void |
setName(String name)
setter method. |
void |
setProperty(Map<String,String> properties)
setter method. internal use. |
void |
setTransition(Map<String,String> transition)
setter method. internal use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.slf4j.Logger logger
protected Map<String,String> dynamicProperties
Constructor Detail |
---|
public GlueActivity()
Method Detail |
---|
public abstract String runActivity(C ctx)
ctx
- GlueContext
예)==> return "success"이면 BizLogic Activity 를 실행함.
public GlueGenericDao getDao(String daoKey)
daoKey
- applicationContext.xml의 bean ID
public void commitTransaction(C ctx, String transactionMgrKey)
transactionMgrKey
- ApplicationContext에 정의된 트랜잭션 매니저 빈의 키 값public void commitTransaction(String transactionMgrKey)
transactionMgrKey
- ApplicationContext에 정의된 트랜잭션 매니저 빈의 키 값public void rollbackTransaction(C ctx, String transactionMgrKey)
transactionMgrKey
- ApplicationContext에 정의된 트랜잭션 매니저 빈의 키 값public void rollbackTransaction(String transactionMgrKey)
transactionMgrKey
- ApplicationContext에 정의된 트랜잭션 매니저 빈의 키 값public String getProperty(String key)
key
- : Activity Property 의 key
public Set<String> getPropertyNames()
[sample java code]public class CustomActivity extends GlueActivity{ public String runActivity( GlueContext ctx ) { Set [sample service.xml]propertyNames = this.getPropertyNames(); for ( String name : propertyNames ){ String value = this.getProperty( name ); // service.xml에 정의된 정적 property를 가져올수 있음.. } // 동적 property dynamicProperties.put(name, value); // 동적 propety를 추가할 수 있음. Set dynamicPropertyNames = this.dynamicProperties.keySet(); for ( String name : dynamicPropertyNames ){ String value = dynamicProperties.get( name ); // service.xml에 없는 동적 property를 가져올수 있음.. } return GlueBizControlConstants.SUCCESS; } }
public void setProperty(Map<String,String> properties)
properties
- Map the new Propertypublic String getName()
public void setName(String name)
name
- activity's namepublic Map<String,String> getTransition()
public void setTransition(Map<String,String> transition)
transition
- public List<String> getEventList()
public void setEventList(List<String> eventList)
eventList
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |