public class GlueAuditAttributes extends 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 and Description |
---|
GlueAuditAttributes()
»ý¼ºÀÚ(constructor).
|
GlueAuditAttributes(GlueContext ctx)
»ý¼ºÀÚ(constructor). key¿¡ ÇØ´çÇÏ´Â °ªÀ» Context·Î ºÎÅÍ ÀϾî¿Í Audit Ç׸ñÀ» ±¸¼ºÇÑ´Ù.
|
GlueAuditAttributes(List<Object> insertValues,
List<Object> updateValues) |
GlueAuditAttributes(Map<String,Object> map) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getAuditValue() |
List<Object> |
getInsertAuditValue() |
List<Object> |
getUpdateAuditValue() |
public GlueAuditAttributes()
public GlueAuditAttributes(GlueContext ctx)
ctx
- Copyright © 2013–2019 POSCO ICT. All rights reserved.