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–2017 POSCO ICT. All rights reserved.