com.poscoict.glueframework.message.layout
Class GlueXmlMessageLayout

java.lang.Object
  extended by com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
      extended by com.poscoict.glueframework.message.layout.GlueXmlMessageLayout
All Implemented Interfaces:
GlueMessageLayout, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public class GlueXmlMessageLayout
extends GlueAbstractFixedLengthMessageLayout
implements org.springframework.beans.factory.InitializingBean

Message를 XML에 정의된 Layout에 따라 Create, Parsing시 사용할수 있도록 구현된 Implement Class.

 bean property 설정
 
 - cacheManager : (선택) default 는 'cacheManager' 임.
   applicationContext.xml 의 Cache Manager의 bean id가 'cacheManager가 아닐 경우 사용한다.
 
  - msgParsingType : (선택) default는 'byte'
    적용 우선순위
    1. msgParsingType bean property의 값
    2. glue.properties 의 msg.parsing.type 에 해당하는 값
    3. default 값
 
 - charset : (선택) default는 java.nio.charset.Charset.defaultCharset() 값임.
 
 
 
 applicationContext.xml
 <bean id="layoutInXml" class="com.poscoict.glueframework.message.layout.GlueXmlMessageLayout"/>
 
 service 파일 : [MSGFW001]-service.xml
 <activity name="MessageParse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
     <transition name="success" value="BizLogic" />
     <property name="layout" value="layoutInXml" />
 </activity>
 
 layout 파일 : [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="" />
         <attribute type="E" seq="2" id="CRUD" name="CRUD" datatype ="STRING" length="1" precision="" />
         <attribute type="E" seq="3" id="DEPTNO" name="부서번호" datatype ="NUMBER" length="2" precision="0" />
         <attribute type="E" seq="4" id="DNAME" name="부서명" datatype ="STRING" length="14" precision="" />
         <attribute type="E" seq="5" id="LOC" name="부서위치" datatype ="STRING" length="13" precision="" />
     </msg>
 </msgs>
 


Field Summary
static String MSG_FILE_NAME
           
 
Fields inherited from class com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
logger, MSG_TYPE_BYTE, MSG_TYPE_STRING
 
Constructor Summary
GlueXmlMessageLayout()
           
 
Method Summary
 void afterPropertiesSet()
           
 GlueMessage createMessageObject(String tc)
           
 List<GlueMessageAttributeDefinition> getAttributesDefinition(String tcid)
           
 
Methods inherited from class com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
destroy, getAttributes, getCacheManager, getCharset, getMsgParsingType, makeMessageParsing, makeMessageString, setCacheManager, setCharset, setMsgParsingType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_FILE_NAME

public static final String MSG_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

GlueXmlMessageLayout

public GlueXmlMessageLayout()
Method Detail

getAttributesDefinition

public List<GlueMessageAttributeDefinition> getAttributesDefinition(String tcid)
                                                             throws GlueMessageDefinitionException
Specified by:
getAttributesDefinition in class GlueAbstractFixedLengthMessageLayout
Returns:
GlueMessageAttributeDefinition List
Throws:
GlueMessageDefinitionException

createMessageObject

public GlueMessage createMessageObject(String tc)
Specified by:
createMessageObject in class GlueAbstractFixedLengthMessageLayout
Returns:
GlueMessage

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013–2014 POSCO ICT SW제품기술팀. All rights reserved.