|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.swtservice.UIContentCache
public final class UIContentCache
The class is used to cache the whole UIContent table.
Note: The cache is built based on the prerequisite that there is no "_" character inside the value for version,category,id fields in the UIContent table.
Method Summary | |
---|---|
static void |
createUIContentCache(java.sql.Connection connection)
Builds the cache for storing the data in the UIContent table. |
static void |
creatUIContentCacheByMap(java.util.Map<java.lang.String,java.lang.String> content)
Builds the cache for storing the data based upon provided content. |
static java.lang.String |
getString(java.lang.String textID,
java.lang.String languageCode)
Gets the value for the key specified by the textID and the languageCode. |
static java.lang.String |
getString(java.lang.String version,
java.lang.String languageCode,
java.lang.String category,
java.lang.String id)
Gets the value for the key specified by the lower-cased version, lower-cased languageCode, mixed-case category, and mixed-case id. |
static void |
invalidate()
Invalidates the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void createUIContentCache(java.sql.Connection connection)
connection
- The Connection
.public static void creatUIContentCacheByMap(java.util.Map<java.lang.String,java.lang.String> content)
content
- the map of content to use in the cachepublic static java.lang.String getString(java.lang.String textID, java.lang.String languageCode)
If the method can't find an item for the specified languageCode, it will try to return the value for the English version.
textID
- The Combination of version, category and
id. The possible formats for the textID are:
version_category_id, or version_id, in which case the category
equals "-". Note that version must already be
lower-cased, but category and id may be mixed
case.languageCode
- The lower-cased language code (for example, "eng").
public static java.lang.String getString(java.lang.String version, java.lang.String languageCode, java.lang.String category, java.lang.String id)
Gets the value for the key specified by the lower-cased version, lower-cased languageCode, mixed-case category, and mixed-case id.
If the method can't find an item for the specified languageCode, it will try to return the value for the English version.
version
- The lower-cased trimmed version of the resource (for example,
"ap60a").languageCode
- The lower-cased trimmed language code (for example, "eng").category
- The mixed-cased trimmed category that the resource belongs to
(for example, "ap1200"), or "-" (which indicates the default
category) if the resource is a version-wide resource.id
- The mixed-case trimmed id of the resource (for example,
"titlForm").
public static void invalidate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |