com.poscoict.glueframework.dao.vo
Class GlueAuditAttributes

java.lang.Object
  extended by com.poscoict.glueframework.dao.vo.GlueAuditAttributes

public class GlueAuditAttributes
extends Object

Audit Ç׸ñÀÇ °ªÀ» Áö´Ñ Value Object.

 Audit Á¤º¸
   1. glue.properties¿¡ audit Á¤ÀÇ
        audit.insert.key=program,user,ServiceName,cur_time,program,user,ServiceName,cur_time
        audit.update.key=program,user,ServiceName,cur_time
 
 Audit Ç׸ñ »ç¿ë½Ã checklist
   1. glue.properties¿¡ ´ÙÀ½ Ç׸ñ Ãß°¡ 
     audit.insert.key=program,user,ServiceName,cur_time,program,user,ServiceName,cur_time
     audit.update.key=program,user,ServiceName,cur_time
   2. ¼­ºñ½º°¡ ¼öÇàµÇ±â Àü Audit Ç׸ñ °ª ¼³Á¤
      AuditÁ¤º¸´Â application log¸¦ ÅëÇØ È®Àΰ¡´É. 
   3. SQL¹® ÀÛ¼º½Ã audit column¸í À§Ä¡ ¹× ¼ø¼­ ÁÖÀÇ 
      insert into {table} ( {audit column}, column .. ) values ( ? .. ? )
      update {table} set {audit column=?}, column=?, ..  ) where column=?
      glue.properties¿¡ ±â¼úÇÑ Ç׸ñµéÀº Context¿¡¼­ °ªÀ» °¡Á®¿Ã Key°ª µéÀ̸ç Audit Ç׸ñÀÇ Binding ¼ø¼­¿Í ÀÏÄ¡ ÇÏ¿©¾ß ÇÑ´Ù
      ¶ÇÇÑ ±× °ªÀº GlueContext¿¡ µé¾î ÀÖ¾î¾ß ÇÑ´Ù. 
      binding ÇüÅ°¡ '?' °¡ ¾Æ´Ñ ':name' ÀÏ °æ¿ì À§Ä¡ ¹× ¼ø¼­¿¡ ´ëÇÑ Á¦¾àÀº ¾ø´Ù.
   4. ³¯Â¥ ¿¹¾à¾î¸¦ »ç¿ë½Ã ´ÙÀ½°ú °°Àº °ªÀ» ¼³Á¤ÇÔ.
      cur_time#current_timestamp#  --> new java.sql.Timestamp( System.currentTimeMillis() )
      cur_time#current_date#       --> new java.util.Date()
 
 Custom Activity¿¡¼­ Audit ¼³Á¤ ¶Ç´Â º¯°æ
     String insertAuditParamKey = GlueStaticContext.getGlueProperty(GlueBizControlConstants.GLUE_AUDIT_INSERT_PARAM);
     String updateAuditParamKey = GlueStaticContext.getGlueProperty(GlueBizControlConstants.GLUE_AUDIT_UPDATE_PARAM);
     String[] insertAuditKeys = insertAuditParamKey.split(",");
     String[] updateAuditKeys = updateAuditParamKey.split(",");
     ctx.put("program","P0101");
     ctx.put("user","1111");
     ctx.put("cur_time",(new Date()).toString()); // cur_time#current_timestamp# ÇüÅÂÀÏ °æ¿ì »ý·«°¡´É
     GlueAuditAttributes audit = new GlueAuditAttributes(ctx);
     ctx.setAuditAttribute(audit);
 
 


Constructor Summary
GlueAuditAttributes()
          »ý¼ºÀÚ(constructor).
GlueAuditAttributes(GlueContext ctx)
          »ý¼ºÀÚ(constructor). key¿¡ ÇØ´çÇÏ´Â °ªÀ» Context·Î ºÎÅÍ ÀϾî¿Í Audit Ç׸ñÀ» ±¸¼ºÇÑ´Ù.
GlueAuditAttributes(List<Object> insertValues, List<Object> updateValues)
           
GlueAuditAttributes(Map<String,Object> map)
           
 
Method Summary
 Map<String,Object> getAuditValue()
           
 List<Object> getInsertAuditValue()
           
 List<Object> getUpdateAuditValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueAuditAttributes

public GlueAuditAttributes()
»ý¼ºÀÚ(constructor).


GlueAuditAttributes

public GlueAuditAttributes(GlueContext ctx)
»ý¼ºÀÚ(constructor). key¿¡ ÇØ´çÇÏ´Â °ªÀ» Context·Î ºÎÅÍ ÀϾî¿Í Audit Ç׸ñÀ» ±¸¼ºÇÑ´Ù.
ÁÖÀÇ: Key´Â Binding µÉ Audit Ç׸ñÀÇ ¼ø¼­¿Í ÀÏÄ¡ ÇÏ¿©¾ß ÇÑ´Ù.

Parameters:
insertKey - array
updateKey - array
ctx -

GlueAuditAttributes

public GlueAuditAttributes(Map<String,Object> map)

GlueAuditAttributes

public GlueAuditAttributes(List<Object> insertValues,
                           List<Object> updateValues)
Method Detail

getInsertAuditValue

public List<Object> getInsertAuditValue()

getUpdateAuditValue

public List<Object> getUpdateAuditValue()

getAuditValue

public Map<String,Object> getAuditValue()


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