com.poscoict.glueframework.message.layout
Class GlueMessageUtil

java.lang.Object
  extended by com.poscoict.glueframework.message.layout.GlueMessageUtil

public abstract class GlueMessageUtil
extends Object

Message »ý¼º, ÆÄ½Ì ¹× Message °¡°øÀ» À§ÇØ »ç¿ëµÇ´Â Utility Class


Field Summary
static String EMPTY_STRING
           
static int FORMAT_YYYY
          Date TypeÀ» ³â(yyyy) FormatÀ¸·Î ÁöÁ¤
static int FORMAT_YYYYMM
          Date TypeÀ» ³â¿ù(yyyyMM) FormatÀ¸·Î ÁöÁ¤
static int FORMAT_YYYYMMDD
          Date TypeÀ» ³â¿ùÀÏ(yyyyMMdd) FormatÀ¸·Î ÁöÁ¤
static int FORMAT_YYYYMMDDHH
          Date TypeÀ» ³â¿ùÀϽÃ(yyyyMMddHH) FormatÀ¸·Î ÁöÁ¤
static int FORMAT_YYYYMMDDHHMM
          Date TypeÀ» ³â¿ùÀϽúÐ(yyyyMMddHHmm) FormatÀ¸·Î ÁöÁ¤
static int FORMAT_YYYYMMDDHHMMSS
           
 
Constructor Summary
GlueMessageUtil()
           
 
Method Summary
static String convertDateToString(Timestamp date, int defindedSize)
          Date°ªÀ» StringÀ¸·Î º¯È¯
static Date convertStringToDate(String datestr)
          String°ªÀ» Date·Î º¯È¯
static String getByteMsgString(GlueMessageAttributeDefinition attrDef, GlueMessage message, int index)
          String°ªÀ» Message StringÀ¸·Î »ý¼º
static String getByteMsgString(GlueMessageAttributeDefinition attrDef, GlueMessage message, int index, Charset charset)
          String°ªÀ» Message StringÀ¸·Î »ý¼º
static int getIntFromString(String str)
          String°ªÀ» Integer·Î º¯È¯ÇÏ¿© ¹ÝȯÇÑ´Ù.
static String getMsgDate(GlueMessageAttributeDefinition attrDef, GlueMessage message, int index)
          Date°ªÀ» Message StringÀ¸·Î »ý¼º
static String getMsgNumber(GlueMessageAttributeDefinition attrDef, GlueMessage message, int index)
          Number°ªÀ» Message StringÀ¸·Î »ý¼º
static String getMsgString(GlueMessageAttributeDefinition attrDef, GlueMessage message, int index)
          String°ªÀ» Message StringÀ¸·Î »ý¼º
static String getStringFromNumber(BigDecimal number, int definedSize, int precision)
          Number¸¦ StringÀ¸·Î º¯È¯
static String getToString(String str, String character, int length)
          ÇØ´ç °ªÀ¸·Î ±æÀÌ ¸¸Å­ String¿¡ Ãß°¡
static String rightTrim(String content)
          String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ RightTrim
static String substringByte(byte[] strByte, int startIndex, int endIndex)
          String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ byte ´ÜÀ§ÀÇ substringÀ» ¼öÇàÇÑ´Ù.
static String substringByte(String str, int startIndex, int endIndex)
          String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ byte ´ÜÀ§ÀÇ substringÀ» ¼öÇàÇÑ´Ù.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

public static final String EMPTY_STRING
See Also:
Constant Field Values

FORMAT_YYYYMMDDHHMMSS

public static final int FORMAT_YYYYMMDDHHMMSS
See Also:
Constant Field Values

FORMAT_YYYYMMDDHHMM

public static final int FORMAT_YYYYMMDDHHMM
Date TypeÀ» ³â¿ùÀϽúÐ(yyyyMMddHHmm) FormatÀ¸·Î ÁöÁ¤

See Also:
Constant Field Values

FORMAT_YYYYMMDDHH

public static final int FORMAT_YYYYMMDDHH
Date TypeÀ» ³â¿ùÀϽÃ(yyyyMMddHH) FormatÀ¸·Î ÁöÁ¤

See Also:
Constant Field Values

FORMAT_YYYYMMDD

public static final int FORMAT_YYYYMMDD
Date TypeÀ» ³â¿ùÀÏ(yyyyMMdd) FormatÀ¸·Î ÁöÁ¤

See Also:
Constant Field Values

FORMAT_YYYYMM

public static final int FORMAT_YYYYMM
Date TypeÀ» ³â¿ù(yyyyMM) FormatÀ¸·Î ÁöÁ¤

See Also:
Constant Field Values

FORMAT_YYYY

public static final int FORMAT_YYYY
Date TypeÀ» ³â(yyyy) FormatÀ¸·Î ÁöÁ¤

See Also:
Constant Field Values
Constructor Detail

GlueMessageUtil

public GlueMessageUtil()
Method Detail

getIntFromString

public static int getIntFromString(String str)
String°ªÀ» Integer·Î º¯È¯ÇÏ¿© ¹ÝȯÇÑ´Ù.

Parameters:
str - ¼ýÀÚ¹®ÀÚ¿­
Returns:
Integer.parseInt(str) À̰ųª 0

rightTrim

public static String rightTrim(String content)
String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ RightTrim

Parameters:
content - : Right TrimÇÒ ´ë»ó String
Returns:
String¿¡ ´ëÇÑ Right Trim °ª. ¿À¸¥ÂÊ °ø¹éÀ» Á¦°ÅÇÑ ¹®ÀÚ¿­

substringByte

public static String substringByte(byte[] strByte,
                                   int startIndex,
                                   int endIndex)
String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ byte ´ÜÀ§ÀÇ substringÀ» ¼öÇàÇÑ´Ù.

Parameters:
strByte - : substring ÇÒ ´ë»ó StringÀÇ ByteLength
startIndex - : substringÀ» ½ÃÀÛÇÒ À§Ä¡ (byte´ÜÀ§)
endIndex - : substringÀÇ ³¡ À§Ä¡ (byte´ÜÀ§)
Returns:
String¿¡ ´ëÇÑ substring°ª, Index°ªÀÌ ´ÙÀ½À» ¸¸Á·ÇÏÁö ¸øÇÏ´Â °æ¿ì "" 0 <= startIndex <= endIndex <= str.length()

substringByte

public static String substringByte(String str,
                                   int startIndex,
                                   int endIndex)
String ÇüÅÂÀÇ °ªÀ» ¹Þ¾Æ¼­ byte ´ÜÀ§ÀÇ substringÀ» ¼öÇàÇÑ´Ù.

Parameters:
str - : substring ÇÒ ´ë»ó StringÀÇ ByteLength
startIndex - : substringÀ» ½ÃÀÛÇÒ À§Ä¡ (byte´ÜÀ§)
endIndex - : substringÀÇ ³¡ À§Ä¡ (byte´ÜÀ§)
Returns:
String¿¡ ´ëÇÑ substring°ª, Index°ªÀÌ ´ÙÀ½À» ¸¸Á·ÇÏÁö ¸øÇÏ´Â °æ¿ì "" 0 <= startIndex <= endIndex <= str.length()

getStringFromNumber

public static String getStringFromNumber(BigDecimal number,
                                         int definedSize,
                                         int precision)
Number¸¦ StringÀ¸·Î º¯È¯

Parameters:
number - BigDecimal
definedSize - int
precision - int
Returns:
String

convertStringToDate

public static Date convertStringToDate(String datestr)
                                throws GlueException
String°ªÀ» Date·Î º¯È¯

Parameters:
datestr -
Returns:
Date
Throws:
GlueException

getToString

public static String getToString(String str,
                                 String character,
                                 int length)
ÇØ´ç °ªÀ¸·Î ±æÀÌ ¸¸Å­ String¿¡ Ãß°¡

Parameters:
str - String
character - String
length - int
Returns:
String

getMsgString

public static String getMsgString(GlueMessageAttributeDefinition attrDef,
                                  GlueMessage message,
                                  int index)
String°ªÀ» Message StringÀ¸·Î »ý¼º

Parameters:
attrDef - Ç׸ñ Definition
message - Message°´Ã¼
index - ±×·ìÇ׸ñÀÏ°æ¿ìÀÇ index
Returns:
¹®ÀÚ¿­

getByteMsgString

public static String getByteMsgString(GlueMessageAttributeDefinition attrDef,
                                      GlueMessage message,
                                      int index)
String°ªÀ» Message StringÀ¸·Î »ý¼º

Parameters:
attrDef - Object
message - GlueMessage
Returns:
String

getByteMsgString

public static String getByteMsgString(GlueMessageAttributeDefinition attrDef,
                                      GlueMessage message,
                                      int index,
                                      Charset charset)
String°ªÀ» Message StringÀ¸·Î »ý¼º

Parameters:
attrDef - Object
message - GlueMessage
index -
charset -
Returns:

getMsgNumber

public static String getMsgNumber(GlueMessageAttributeDefinition attrDef,
                                  GlueMessage message,
                                  int index)
Number°ªÀ» Message StringÀ¸·Î »ý¼º

Parameters:
attrDef - Object
message - GlueMessage
Returns:
String

getMsgDate

public static String getMsgDate(GlueMessageAttributeDefinition attrDef,
                                GlueMessage message,
                                int index)
Date°ªÀ» Message StringÀ¸·Î »ý¼º

Parameters:
attrDef - Object
message - GlueMessage
Returns:
String

convertDateToString

public static String convertDateToString(Timestamp date,
                                         int defindedSize)
Date°ªÀ» StringÀ¸·Î º¯È¯

Parameters:
date -
defindedSize -
Returns:
String


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