|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.poscoict.glueframework.context.GlueStaticContext
public final class GlueStaticContext
각종 고정정보에 접근하는 Class. 이 Class는 IoC용 XML은 applicationContext.xml 에 근거에 Bean 인스턴스가 생성되며 사용된다. 이 Class는 그외 Property 정보에 대한 API를 제공한다. 그외 IoC용 XML의 Bean 인스턴스는 GlueBeanFactory를 이용하는 별개의 모듈을 필요하다.
Field Summary | |
---|---|
static String |
config
|
Constructor Summary | |
---|---|
GlueStaticContext()
|
Method Summary | |
---|---|
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 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 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 |
getTimeZoneFormat(Date date,
int offset)
|
static String |
getTimeZoneFormat(Date date,
int offset,
String textformate)
|
static String |
getTimeZoneFormat(Date date,
String timezoneid)
|
static String |
getTimeZoneFormat(Date date,
String timezoneid,
String textformate)
|
static boolean |
isAudit()
Audit 설정 유무 확인. glue.properties 파일에 "audit.insert.key" 와 "audit.update.key" 의 존재 유무 |
static void |
reloadGlueProperties()
glue.properties 를 다시 loading 하는 method. |
static void |
reloadLicense()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String config
Constructor Detail |
---|
public GlueStaticContext()
Method Detail |
---|
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 key
public static String getGlueProperty(String key)
key
- glue.properties의 key 값
public static String getCustomProperty(String key)
key
- 프로퍼티 키
public static String getTimeZoneFormat(Date date, int offset)
public static String getTimeZoneFormat(Date date, int offset, String textformate)
public static String getTimeZoneFormat(Date date, String timezoneid)
public static String getTimeZoneFormat(Date date, String timezoneid, String textformate)
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |