com.posco.reuse.activity
Class GlueMessageCreate

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.posco.reuse.activity.GlueMessageCreate

public class GlueMessageCreate
extends GlueActivity<GlueContext>

GlueMessageCreate는 reuse Activity로써 parser된 Message결과를 이용하여 새로운 Message TC 혹은 File을 만드는 역활을 한다. 새로운 GlueMessage객체를 생성하기 위하여 GlueCreateMessage Activity의 Attribute를 이용하여 해당 객체를 생성한다. 생성된 GlueMessage객체를 이용하여 새로운 생성하고자 하는 Message는 LayoutManager에 정의되어 있는 Layout을 근거로 message를 String을 생성하거나 File을 생성한다.

  Activity Property
  
  - layout : (필수) applicationContext.xml의 GlueLayoutManager bean id.
  
  - result-key : (필수) Context에 Map형태로 결과를 담을 Key. 
       TC일 경우, Data구조는 Map < String, List < String > > .
           즉, Map에는 ArrayList가 담겨 있고 그 Key값은 TCID이다. 
          하나의 결과 또는 같은 종류의 여러개의 결과가 ArrayList로 저장됨.
       File일 경우, Data구조 String.
                 생성된 파일의 경로.
                 
  - msg-id : (필수) 생성하고자 하는 TC ID.
              ex). MSGFW002, MSGFW003 등 
              
  - msg-type : (필수) TC 혹은 File을 설정하고자 할때  
              ex). TC일 경우 'tc', File일 경우 'file'
              
  - attr-cnt : (필수) 새로 만들어질 TC의 Layout에 attribute의 갯수
  
  - attr-1 ~ n : (필수) 새로 만들어질 TC의 Layout에 attribute의 값 (type|condition@
              ex). C|MSGFW002, M|DEPTNO, R|sdd_result@EMPNO 등
                
  - file-name : (선택) msg type이 파일일 경우의 파일 이름
  
  - msgmulti-type : (선택) 한개의 전문의 대해서 다수의 전문을 사용할 경우
               ex). 한개일 경우 'single' 다수일 경우 'multi' (default : 'single')
               
  - charset : (선택) CreateMessage의 ParseType이 byte 일 경우 사용됨. 고정값. 
  
  - charset-name : (선택) CreateMessage의 ParseType이 byte 일 경우 사용됨. 동적값.
 
 예제
  사용 예# 1 TC 경우
  
  <activity name="GlueMessageCreate" class="com.posco.reuse.activity.GlueMessageCreate">
     <transition name="success" value="end"/>
     <property name="attr-cnt" value="8"/>
     <property name="attr-1" value="C|MSGFW002"/>
     <property name="attr-2" value="M|DEPTNO"/>
     <property name="attr-3" value="R|sdd_result@ENAME"/>
     <property name="attr-4" value="M|DLOC"/>
     <property name="attr-5" value="A|sdd_result"/>
     <property name="attr-6" value="R|sdd_result@EMPNO"/>
     <property name="attr-7" value="R|sdd_result@ENAME"/>
     <property name="attr-8" value="M|CRUD"/>
     <property name="layout" value="layoutManager"/>
     <property name="msg-id" value="MSGFW002"/>
     <property name="msg-type" value="tc"/>
     <property name="msgmulti-type" value="multi"/>
     <property name="result-key" value="posco_createMessage"/>
  </activity>
  
  사용 예# 1 File 경우
  
  <activity name="GlueMessageCreate" class="com.posco.reuse.activity.GlueMessageCreate">
     <transition name="success" value="end"/>
     <property name="attr-cnt" value="8"/>
     <property name="attr-1" value="C|MSGFW002"/>
     <property name="attr-2" value="M|DEPTNO"/>
     <property name="attr-3" value="R|sdd_result@ENAME"/>
     <property name="attr-4" value="M|DLOC"/>
     <property name="attr-5" value="A|sdd_result"/>
     <property name="attr-6" value="R|sdd_result@EMPNO"/>
     <property name="attr-7" value="R|sdd_result@ENAME"/>
     <property name="attr-8" value="M|CRUD"/>
     <property name="layout" value="layoutManager"/>
     <property name="msg-id" value="MSGFW002"/>
     <property name="file-name" value="posco_createMessage.dat"/>
     <property name="msg-type" value="file"/> 
     <property name="msgmulti-type" value="multi"/>
     <property name="result-key" value="posco_createMessage"/>
  </activity>
  
  
  참고 : applicationContext.xml
  
      <bean id="layoutInXml" class="com.poscoict.glueframework.message.layout.GlueXmlMessageLayout">
          <property name="cacheManager" ref="cacheManager"/>
      </bean>
      <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
          <property name="dao" ref="layout-dao"/>
          <property name="cacheManager" ref="cacheManager"/>
      </bean>
      <bean id="cacheManager" class="..."/>
      <bean id="layout-dao" class="..."/> 
      
     : glue.properties(파일의 path 설정)
     
        reuse.msg.file.path=C:/data/test/
 


Field Summary
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueMessageCreate()
           
 
Method Summary
 String runActivity(GlueContext ctx)
           
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueMessageCreate

public GlueMessageCreate()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
Specified by:
runActivity in class GlueActivity<GlueContext>


Copyright © 2013–2016 POSCO ICT. All rights reserved.