public abstract class GlueActivity<C extends GlueContext> extends Object
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)¿¡¼ È£Ãâ ÇÏ¿© »ç¿ëÇÒ ¼ö ÀÖ´Ù.
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
dynamicProperties
µ¿ÀûÀ¸·Î °ü¸®µÇ´Â property
|
protected org.slf4j.Logger |
logger
logger
|
Constructor and Description |
---|
GlueActivity() |
Modifier and Type | Method and Description |
---|---|
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.
|
public abstract String runActivity(C ctx)
ctx
- GlueContext¿¹)==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
public GlueGenericDao getDao(String daoKey)
daoKey
- applicationContext.xmlÀÇ bean IDpublic 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 ÀÇ keypublic 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 void setTransition(Map<String,String> transition)
transition
- Copyright © 2013–2020 POSCO ICT. All rights reserved.