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