
public final class GlueStaticContext extends Object
| Constructor and Description | 
|---|
GlueStaticContext()  | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
checkLicense()
라이선스 유효여부를 확인한다. 
 | 
static void | 
destroyApplictionContext()
applicationContext.xml에 정의 되어 있는 Bean Class를 소멸시킨다. 
 | 
static GlueBeanFactory | 
getBeanFactory()
applicationContext.xml에 정의 되어 있는 Bean Class를 호출 하기 위한 GlueBeanFactory를 Return 한다. 
 | 
static String | 
getCustomProperty(String key)
Custom Properties 파일에서 key에 해당하는 프로퍼티를 얻는다. 
 | 
static String | 
getCustomProperty(String key,
                 String defaultValue)
Custom Properties 파일에서 key에 해당하는 프로퍼티를 얻는다. 
 | 
static Locale | 
getDefaultLocale(String localeInfo)
입력값에 근거한 Locale 
 | 
static Locale | 
getDefaultUILocale()
glue.properties의 property "default.ui.locale" 에 근거한 Locale 
 | 
static String | 
getGlueProperty(String key)
glue.properties에서 Key에 해당하는 Property 값을 Return 한다. 
 | 
static String | 
getGlueProperty(String key,
               String defaultValue)
glue.properties에서 Key에 해당하는 Property 값을 Return 한다. 
 | 
static com.poscoict.license.LicenseAPI.LicenseMode | 
getLicenseMode()
라이선스 모드를 반환한다. 
 | 
static String | 
getResourceMessage(String key)
Locale정보에 근거한 다국어 지원 Method. 
 | 
static String | 
getResourceMessage(String key,
                  Locale locale)
Locale정보에 근거한 다국어 지원 Method. 
 | 
static String | 
getResourceMessage(String key,
                  Object[] arguments)
Locale정보에 근거한 다국어 지원 Method. 
 | 
static String | 
getResourceMessage(String key,
                  Object[] arguments,
                  Locale locale)
Locale정보에 근거한 다국어 지원 Method. 
 | 
static String | 
getResourceMessage(String beanName,
                  String key,
                  Object[] arguments,
                  Locale locale)
Locale정보에 근거한 다국어 지원 Method. 
 | 
static String | 
getSystemProperty(String key)
SystemProperty는 java를 실행시 -D Option으로 정의한 Property를 의미 한다. 
 | 
static String | 
getSystemProperty(String key,
                 String defaultValue)
SystemProperty는 java를 실행시 -D Option으로 정의한 Property를 의미 한다. 
 | 
static String | 
getTimeZoneFormat(Date date,
                 int offset)
해당 TimeZone 기준 날짜.시간 표현 Method. 
 | 
static String | 
getTimeZoneFormat(Date date,
                 int offset,
                 String textformate)
해당 TimeZone 기준 날짜.시간 표현 Method. 
 | 
static String | 
getTimeZoneFormat(Date date,
                 String timezoneid)
해당 TimeZone 기준 날짜.시간 표현 Method. 
 | 
static String | 
getTimeZoneFormat(Date date,
                 String timezoneid,
                 String textformate)
해당 TimeZone 기준 날짜.시간 표현 Method. 
 | 
static boolean | 
isAudit()
Audit 설정 유무 확인. glue.properties 파일에 "audit.insert.key" 와 "audit.update.key" 의 존재 유무 
 | 
static void | 
reloadGlueProperties()
glue.properties 를 다시 loading 하는 method. 
 | 
static void | 
reloadLicense()  | 
public static final String config
public static void reloadLicense()
public static void reloadGlueProperties()
public static GlueBeanFactory getBeanFactory()
GlueBeanFactory beanFactory = GlueStaticContext.getBeanFactory(); GlueGenericDao dao = (GlueGenericDao)beanFactory.getBeanObject("bizdao"); 위 내용은 applicatonContext.xml에 다음과 같이 정의 되어 있는 경우 com.poscoict.glueframework.dao.jdbc.GlueJdbcDao를 Return 하게 된다. 
public static void destroyApplictionContext()
public static String getSystemProperty(String key)
key - System Property keypublic static String getSystemProperty(String key, String defaultValue)
key - System Property keydefaultValue - System Property가 없을 경우의 defalut 값public static String getGlueProperty(String key)
key - glue.properties의 key 값public static String getGlueProperty(String key, String defaultValue)
key - glue.properties의 key 값defaultValue - glue.properties 파일이 없거나, 주어진 key가 존재하지 않을 경우의 default 값public static String getCustomProperty(String key)
key - 프로퍼티 키public static String getCustomProperty(String key, String defaultValue)
key - 프로퍼티 키defaultValue - 프로퍼티 값이 없을 경우의 default 값public static String getTimeZoneFormat(Date date, int offset)
date - Text 형태로 변환 할 Dateoffset - Text 형태로 변환 시 적용 할 TimeZone 시간대 offset값public static String getTimeZoneFormat(Date date, int offset, String textformate)
 1. 사용법(Java Code)
 Date date = new Date();
 String textformat = "yyyy-MM-dd HH:mm:ss (z Z)";
 System.out.println("+05:00::::"+GlueStaticContext.getTimeZoneFormat(date, 5*60, textformat));
 System.out.println("-06:00::::"+GlueStaticContext.getTimeZoneFormat(date, -6*60, textformat));
 date - Text 형태로 변환 할 Dateoffset - Text 형태로 변환 시 적용 할 TimeZone 시간대 offset값textformate - Text 형태로 변환 시 적용 될 Text Format (Default 값 : yyyy-MM-dd HH:mm:ss (z Z))public static String getTimeZoneFormat(Date date, String timezoneid)
date - Text 형태로 변환 할 Datetimezoneid - Text 형태로 변환 시 적용 할 TimeZone IDpublic static String getTimeZoneFormat(Date date, String timezoneid, String textformate)
 1. 사용법(Java Code)
 Date date = new Date();
 String textformat = "yyyy-MM-dd HH:mm:ss (z Z)";
 System.out.println("Default::::" + GlueStaticContext.getTimeZoneFormat(date, TimeZone.getDefault().getID(), textformat));
 System.out.println("Asia/Seoul::::" + GlueStaticContext.getTimeZoneFormat(date, "Asia/Seoul", textformat));
 System.out.println("Canada/Eastern::::"+GlueStaticContext.getTimeZoneFormat(date, "Canada/Eastern", textformat));
 System.out.println("Asia/Shanghai::::" + GlueStaticContext.getTimeZoneFormat(date, "Asia/Shanghai", textformat));
 
 date - Text 형태로 변환 할 Datetimezoneid - Text 형태로 변환 시 적용 할 TimeZone IDtextformate - Text 형태로 변환 시 적용 될 Text Format (Default 값 : yyyy-MM-dd HH:mm:ss (z Z))public static String getResourceMessage(String key)
1. applicationContext.xml 의 messageSource bean 정의2. MyResource_{locale}.properties 파일 생성 - MyResource_ko_KR.properties 의 내용 msg001=안녕하세요 msg002={0}님, 안녕하세요. {1}번째 접속입니다. - MyResource_en_US.properties 의 내용 msg001=Hello msg002=Hi, {0}!. {1} times. - ... 3. 사용법(Java Code) String str = GlueStaticContext.getResourceMessage("msg001"); 
MyResource 
key - public static String getResourceMessage(String key, Object[] arguments)
1. applicationContext.xml 의 messageSource bean 정의2. MyResource_{locale}.properties 파일 생성 - MyResource_ko_KR.properties 의 내용 msg001=안녕하세요 msg002={0}님, 안녕하세요. {1}번째 접속입니다. - MyResource_en_US.properties 의 내용 msg001=Hello msg002=Hi, {0}!. {1} times. - ... 3. 사용법(Java Code) Object obj[] = new Object[]{new String("admin"),new Integer(3)}; String str = GlueStaticContext.getResourceMessage("msg002", arg); 
MyResource 
key - arguments - public static String getResourceMessage(String key, Locale locale)
1. applicationContext.xml 의 messageSource bean 정의2. MyResource_{locale}.properties 파일 생성 - MyResource_ko_KR.properties 의 내용 msg001=안녕하세요 msg002={0}님, 안녕하세요. {1}번째 접속입니다. - MyResource_en_US.properties 의 내용 msg001=Hello msg002=Hi, {0}!. {1} times. - ... 3. 사용법(Java Code) String str = GlueStaticContext.getResourceMessage("msg001", Locale.getDefault()); 
MyResource 
key - locale - public static String getResourceMessage(String key, Object[] arguments, Locale locale)
1. applicationContext.xml 의 messageSource bean 정의2. MyResource_{locale}.properties 파일 생성 - MyResource_ko_KR.properties 의 내용 msg001=안녕하세요 msg002={0}님, 안녕하세요. {1}번째 접속입니다. - MyResource_en_US.properties 의 내용 msg001=Hello msg002=Hi, {0}!. {1} times. - ... 3. 사용법(Java Code) Object obj[] = new Object[]{new String("admin"),new Integer(3)}; String str = GlueStaticContext.getResourceMessage("msg002", arg, Locale.getDefault()); 
MyResource 
key - arguments - locale - public static String getResourceMessage(String beanName, String key, Object[] arguments, Locale locale)
1. applicationContext.xml 의 messageSource bean 정의2. MyResource_{locale}.properties 파일 생성 - MyResource_ko_KR.properties 의 내용 msg001=안녕하세요 msg002={0}님, 안녕하세요. {1}번째 접속입니다. - MyResource_en_US.properties 의 내용 msg001=Hello msg002=Hi, {0}!. {1} times. - ... 3. 사용법(Java Code) Object obj[] = new Object[]{new String("admin"),new Integer(3)}; String str = GlueStaticContext.getResourceMessage("msgSrc", "msg002", arg, Locale.getDefault()); 
MyResource 
beanName - - bean id가 "messageSource" 이 아닌 경우의 bean id.key - arguments - locale - public static Locale getDefaultUILocale()
public static Locale getDefaultLocale(String localeInfo)
localeInfo - "ko_KR" 형태의 문자열.public static boolean isAudit()
public static com.poscoict.license.LicenseAPI.LicenseMode getLicenseMode()
public static boolean checkLicense()
Copyright © 2013–2021 POSCO ICT. All rights reserved.