com.poscoict.glueframework.biz.activity
Class GlueActivity<C extends GlueContext>

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<C>
Direct Known Subclasses:
GlueContextClear, GlueDefaultRouter, GlueExcelInfo, GlueFileDelete, GlueFileDown, GlueFileList, GlueFileSave, GlueHibernateDelete, GlueHibernateEntityCreator, GlueHibernateEntityModifier, GlueHibernateEntityRemover, GlueHibernateSearch, GlueHibernateUpdate, GlueJdbcDelete, GlueJdbcInsert, GlueJdbcModify, GlueJdbcNativeRun, GlueJdbcSearch, GlueJobCall, GlueMessageCreate, GlueMessageParse, GlueMessageSender, GlueMessageSender, GlueMongoDelete, GlueMongoFind, GlueMongoSave, GlueMybatisDelete, GlueMybatisInsert, GlueMybatisModify, GlueMybatisSearch, GlueRedisDelete, GlueRedisGet, GlueRedisSet, GlueResultKeyList, GlueSubService, GlueTextMessageSend, GlueWebPageTag, GlueXPlatDelete, GlueXPlatInsert, GlueXPlatModify, GlueXPlatSave, GlueXPlatSearch

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 Á¤ÀÇ ÀÌ´Ù.
  <activity name="InitProcess" class="com.biz.BizLogicActivity">
      <transition name="success" value="EventRouter"/>
      <property name="condition" value="attr1"/>
      <property name="deptno" value="10"/>
  </activity>
  
 À§ {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(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(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

logger

protected org.slf4j.Logger logger
logger


dynamicProperties

protected Map<String,String> dynamicProperties
µ¿ÀûÀ¸·Î °ü¸®µÇ´Â property

Constructor Detail

GlueActivity

public GlueActivity()
Method Detail

runActivity

public abstract String runActivity(C ctx)
Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù. °á°ú °ªÀº GlueContext¿¡ ´ã¾Æ¼­ ´ÙÀ½ Activity ¶Ç´Â F/W¿¡ Àü´ÞÇÏ°Ô µÈ´Ù. ÇÊ¿äÇÑ ¸ðµç Data´Â GlueContext¿¡¼­ È£ÃâÇÏ¿© »ç¿ëÇÏ°Ô µÈ´Ù.

Parameters:
ctx - GlueContext
Returns:
String Á¤»óÀûÀ̸é "success"¸¦ Return ÇÏ°í ºñÁ¤»ó 󸮸¦ ¿øÇϸé "failure"¸¦ Return ÇÑ´Ù.
 ¿¹) 
 <transition name="success" value="BizLogic"/>
 <transition name="failure" value="ErrorHandle"/>
 ==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
 

getDao

public GlueGenericDao getDao(String daoKey)
applicationContext.xml¿¡ Á¤ÀÇµÈ dao°¡Á®¿À±â.

Parameters:
daoKey - applicationContext.xmlÀÇ bean ID
Returns:
GlueGenericDao DAO Class

commitTransaction

public void commitTransaction(String transactionMgrKey)
Æ®·£Àè¼ÇÀ» Ä¿¹ÔÇÑ´Ù.

Parameters:
transactionMgrKey - ApplicationContext¿¡ Á¤ÀÇµÈ Æ®·£Àè¼Ç ¸Å´ÏÀú ºóÀÇ Å° °ª

rollbackTransaction

public void rollbackTransaction(String transactionMgrKey)
Æ®·£Àè¼ÇÀ» ·Ñ¹éÇÑ´Ù.

Parameters:
transactionMgrKey - ApplicationContext¿¡ Á¤ÀÇµÈ Æ®·£Àè¼Ç ¸Å´ÏÀú ºóÀÇ Å° °ª

getProperty

public String getProperty(String key)
getter mehod. Property °ªÀ» Return.

Parameters:
key - String Property Key°ª
Returns:
String Proverty Value

getPropertyNames

public Set<String> getPropertyNames()
Á¤Àû propertyÀÇ key set. µ¿Àû property´Â dynamicProperties ¸¦ »ç¿ëÇÒ °Í.
 [sample java code]
 public class CustomActivity extends GlueActivity{
<P>
<DD><DL>

<DT><B>Returns:</B><DD></DL>
</DD>
</DL>
<HR>

<A NAME="setProperty(java.util.Map)"><!-- --></A><H3>
setProperty</H3>
<PRE>
public void <B>setProperty</B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;properties)</PRE>
<DL>
<DD>setter method. internal use. »õ·Î¿î <property>¸¦ ¼³Á¤ ÇÑ´Ù. ÁÖÀÇ ÇÒ Á¡Àº XMLÀÇ ´ÙÀ½°ú °°Àº propety´Â ¸ðµÎ Á¦°Å µÇ°í »õ·Î¿î Property°¡ Àû¿ë µÇ¾î Áø´Ù. ¶ÇÇÑ setProperty()
 È£ÃâÈÄ ´ÙÀ½ RequestºÎÅÍ °°Àº Service¸¦ »ç¿ëÇÏ´Â Request¿¡ Àû¿ëµÇ¾îÁö±â ¶§¹®¿¡ ÁÖÀÇ ÇÏ¿©¾ß ÇÔ.
 
 <pre>
 <xmp><property name="condition" value="attr1"/>
 <property name="deptno" value="10"/>
 

Parameters:
properties - Map the new Property

getName

public String getName()
getter method.

Returns:
activity's name

setName

public void setName(String name)
setter method.

Parameters:
name - activity's name

getTransition

public Map<String,String> getTransition()
getter method.

Returns:
transition

setTransition

public void setTransition(Map<String,String> transition)
setter method. internal use.

Parameters:
transition -

getEventList

public List<String> getEventList()
getter method.

Returns:
event list

setEventList

public void setEventList(List<String> eventList)
setter method. internal use.

Parameters:
eventList -


Copyright © 2013–2014 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.