|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.adapter.AdapterUtil
Helper class to create informations about the session, request object or the system environment.
Constructor Summary | |
private |
AdapterUtil()
Constructor |
Method Summary | |
static java.util.Locale |
localeFromName(HttpContext context,
java.lang.String localeName)
Gets the Locale Object from a Locale Name |
static java.util.Locale |
localeFromSession(HttpContext context)
Gets the Locale Object for the running session |
static java.lang.String |
localize(HttpContext context,
java.lang.String keyOrString)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(HttpContext context,
java.lang.String keyOrString,
java.util.Locale locale)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(HttpContext context,
java.lang.String keyOrString,
java.lang.Object[] arguments)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(HttpContext context,
java.lang.String keyOrString,
java.lang.Object[] arguments,
java.util.Locale locale)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(HttpContext context,
java.lang.String keyOrString,
java.lang.Object[] arguments,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localizeKey(HttpContext context,
java.lang.String resourceKey,
java.lang.Object[] arguments,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.Object |
lookup(javax.servlet.jsp.PageContext pageContext,
java.lang.String name,
java.lang.String property,
HttpScope scope)
Locate and return the specified property of the specified bean, from an optionally specified scope, in the specified page context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private AdapterUtil()
Method Detail |
public static java.lang.Object lookup(javax.servlet.jsp.PageContext pageContext, java.lang.String name, java.lang.String property, HttpScope scope) throws java.lang.Exception
saveException()
.
pageContext
- Page context to be searchedname
- Name of the bean to be retrievedproperty
- Name of the property to be retrieved, or null
to retrieve the bean itselfscope
- Scope to be searched (page, request, session, application) or
null
to use findAttribute()
instead
java.lang.Exception
- if the bean could not be found or if accessing the beans
property causes an IllegalAccessException,
IllegalArgumentException, InvocationTargetException, or
NoSuchMethodExceptionpublic static java.lang.String localize(HttpContext context, java.lang.String keyOrString)
context
- JSP Page ContextkeyOrString
- String Literal or Resource Key
public static java.lang.String localize(HttpContext context, java.lang.String keyOrString, java.util.Locale locale)
context
- JSP Page ContextkeyOrString
- String Literal or Resource Keylocale
- Locale or null
public static java.lang.String localize(HttpContext context, java.lang.String keyOrString, java.lang.Object[] arguments)
context
- JSP Page ContextkeyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments or null
public static java.lang.String localize(HttpContext context, java.lang.String keyOrString, java.lang.Object[] arguments, java.util.Locale locale)
context
- JSP Page ContextkeyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments or null
locale
- Locale or null
public static java.lang.String localize(HttpContext context, java.lang.String keyOrString, java.lang.Object[] arguments, java.util.Locale locale, boolean returnNull)
context
- JSP Page ContextkeyOrString
- The String literal or resource key.arguments
- MessageFormat arguments or null
locale
- Locale or null
returnNull
- controls whether to return null or a not present indicator
public static java.lang.String localizeKey(HttpContext context, java.lang.String resourceKey, java.lang.Object[] arguments, java.util.Locale locale, boolean returnNull)
context
- JSP Page ContextresourceKey
- The resource key.arguments
- MessageFormat arguments or null
locale
- Locale or null
returnNull
- controls whether to return null or a not present indicator
public static java.util.Locale localeFromName(HttpContext context, java.lang.String localeName)
context
- JSP Page ContextlocaleName
- The Name
null
public static java.util.Locale localeFromSession(HttpContext context)
context
- JSP Page Context
null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |