com.poscoict.glueframework.biz.activity
Class GlueMessageParse

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.poscoict.glueframework.biz.activity.GlueMessageParse

public class GlueMessageParse
extends GlueActivity<GlueContext>

MessageParse Activity. GlueMessageParse Activity´Â TC(String) ¶Ç´Â File¿¡ ´ã±ä TC(String) ¸¦ LayoutÀ¸·Î ParseÇÏ¿© GlueMessage Instance¸¦ »ý¼ºÇÏ´Â ±â´ÉÀ» ¼öÇàÇÑ´Ù.

 »ç¿ë ¿¹
 - case 1  : ÃÖ¼Ò»ç¿ë
 <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="SetMessageKey" />
     <property name="layout" value="layout" />
 </activity>
 
 
 
 - case 2  : message-id °¡ ¼ö½ÅData["ReceiveTC"] ¿¡¼­ ÃßÃâÇÏ´Â °Í°ú ´Ù¸¦ °æ¿ì
 <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="SetMessageKey" />
     <property name="layout" value="layout" />
     <property name="message-id" value="MSGFW001" />
 </activity>
 
 
 
 - case 3  : message-id °¡ ÁÖ¾îÁöÁö ¾Ê¾Æ ¼ö½ÅData["ReceiveTC"] ¿¡¼­ ÃßÃâÇؾßÇÏ´Â °æ¿ì.
 <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="SetMessageKey" />
     <property name="layout" value="layout" />
     <property name="id-length" value="8" />
 </activity>
 
 
 
 - case 4  : charset-name »ç¿ë½Ã.. ctx.get(this.getProperty("charset-name")) ÀÇ °ªÀÌ »ç¿ëµÊ. 
 <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="SetMessageKey" />
     <property name="layout" value="layout" />
     <property name="charset-name" value="ctx-key" />
 </activity>
 
 
 
 - case 5  : charset »ç¿ë½Ã activity property value°¡ »ç¿ëµÊ. 
 <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="SetMessageKey" />
     <property name="layout" value="layout" />
     <property name="charset" value="UTF-8" />
 </activity>
 
 
 
 
 
 Property ¼³Á¤
 - layout : (Çʼö) applicationContext.xmlÀÇ layout manager bean id.
      <bean id="layout" class="com.poscoict.glueframework.message.layout.GlueXmlMessageLayout"/>
      ¶Ç´Â
      <bean id="layout" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
          <property name="dao" ref="masterdao"/>
          <property name="queryId" value="get_msg_layout_query"/>
      </bean>
 
 - message-id : (¼±ÅÃ) msg key. layout/{message-id}-msg.xml Âü°í ±Ù°Å. 
      [ default ]
      String s = (String)ctx.get("ReceiveTC"); 
      String msg_id = s.substring(0, id_length);
  
 - id-length : (¼±ÅÃ) "ReceiveTC"¿¡ ÇØ´çÇÏ´Â StringÀÇ substring ±âÁØ. message-id°¡ Á¤ÀǵǾî ÀÖ´Â °æ¿ì, id-length´Â »ç¿ëµÇÁö ¾ÊÀ½. 
          [ default ] : 8
          MSGFW001-msg.xml  
          <?xml version="1.0" encoding="EUC-KR"?>
          <msgs>
            <msg id="MSGFW001" name="DEPT">
              <attribute type="E" seq="1" id="TRANSACTION_CODE" name="TransactionCode" datatype="STRING" length="8" precision="" />
              ....
            </msg>
          </msgs>
 
 - charset : (¼±ÅÃ) ParseTypeÀÌ byte ÀÏ °æ¿ì »ç¿ëµÊ. °íÁ¤°ª. 
 
 - charset-name : (¼±ÅÃ) ParseTypeÀÌ byte ÀÏ °æ¿ì »ç¿ëµÊ. µ¿Àû°ª.
  
 
 
 ±âŸ
 Context¿¡ "ReceiveTC" ¸¦ key·Î TC°¡ ÀúÀå µÇ¾î Àְųª FileTC Á¤º¸°¡ Context¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
 interface-type=tc ÀÏ°æ¿ì [MSGFW001R10aaa           seoul        ]
 interface-type=file ÀÏ°æ¿ì [/APP/CHAIN/MSGFW002_20130201.dat]
 
 Parse Type ÁöÁ¤ ¹æ¹ý:
  º°µµ·Î ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é Byte TypeÀ¸·Î parse ÇÑ´Ù. 
 1. Glue Property ¼³Á¤
   a. Java Option¿¡ ´ÙÀ½°ú °°ÀÌ glue.properties ÆÄÀÏ¿¡ ´ëÇÑ Path¸¦ ÁöÁ¤ÇÑ´Ù. 
      -DCONFIG_PATH=%path%
   b. glue.properties ÆÄÀÏ¿¡ ´ÙÀ½ Ç׸ñ Ãß°¡
      msg.parsing.type=byte(string)
 2. byte parsing½Ã StringÀ» byte[] ·Î Encoding ¿ì¼±¼øÀ§´Â ´ÙÀ½°ú °°´Ù. 
     charset-name property > charset property > jvm default
 


Field Summary
static int DEFAULT_MSG_ID_LENGTH
           
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueMessageParse()
           
 
Method Summary
 String runActivity(GlueContext ctx)
          Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MSG_ID_LENGTH

public static final int DEFAULT_MSG_ID_LENGTH
See Also:
GlueHttpReceiverAdapter, Constant Field Values
Constructor Detail

GlueMessageParse

public GlueMessageParse()
Method Detail

runActivity

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

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


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