|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.LanguageResource
public final class LanguageResource
A utility class that provides the service of getting a single language resource string
First, use LanguageResource.getInstance().
initialize(SDataProvider sdataProvider)
to initialize the instance
of this class. (This initialization is usually done by the
SDataServlet
class on its initialization, so Accpac and SWT Services
resource kinds don't need to do this initialization.)
Then, use LanguageResource.getInstance().
getMessage(String version, String language, String id)
or
LanguageResource.getInstance().
getMessage(String version, String language, String category, String id)
to get the resource string in the specified language. Note that this utility
class will take care of trimming the arguments and lower-casing the version
and language arguments.
Method Summary | |
---|---|
static LanguageResource |
getInstance()
|
java.lang.String |
getMessage(java.lang.String version,
java.lang.String language,
java.lang.String id)
Get the message for the given version, language and id. |
java.lang.String |
getMessage(java.lang.String version,
java.lang.String language,
java.lang.String category,
java.lang.String id)
Get the message for the given version, language, category and id. |
void |
initialize(SDataProvider sdataProvider)
Handle any initialization required by this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LanguageResource getInstance()
public void initialize(SDataProvider sdataProvider)
sdataProvider
- The SDataProvider
that provides the data for the
language resource string lookup. Currently this should be the
SWT Services provider.public java.lang.String getMessage(java.lang.String version, java.lang.String language, java.lang.String id)
getMessage
in interface ILanguageResource
version
- the version of the resource, e.g. "ap60a"language
- the language code of the resource, e.g. "eng"id
- the id of the resource, e.g. "titlForm"
public java.lang.String getMessage(java.lang.String version, java.lang.String language, java.lang.String category, java.lang.String id)
getMessage
in interface ILanguageResource
version
- the version of the resource, e.g. "ap60a"language
- the language code of the resource, e.g. "eng"category
- the category that the resource belongs to, e.g. "ap1200"id
- the id of the resource, e.g. "titlForm"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |