|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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)
ÇØ´ç 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()
|
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)
date
- Text ÇüÅ·Πº¯È¯ ÇÒ Datetimezoneid
- 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 ID
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |