public class LocalizedStringTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
LocalizedStringTable.Entry
Simple data class that represents an entry in the '/strings' database
table.
|
Constructor and Description |
---|
LocalizedStringTable()
Create an instance of the LocalizedStringTable class
|
Modifier and Type | Method and Description |
---|---|
LocalizedStringTable.Entry[] |
getEntriesFor(PortalContext ctx,
java.lang.String domain,
java.lang.String locale,
java.lang.Integer version,
java.lang.Integer id)
Do a database search for Stringtable Entries matching the specified
criteria.
|
static LocalizedStringTable |
getInstance()
Get a shared instance of the LocalizedStringTable.
|
LocalizedStringTable.Entry[] |
lookupEntriesFor(PortalContext ctx,
java.lang.String domain,
java.lang.String locale)
Gen an array of StringTabe Entries for a specified Domain and Locale
This method looks in the cache before going to the database, and
caches the results.
|
LocalizedStringTable.Entry |
lookupEntry(PortalContext ctx,
java.lang.String domain,
java.lang.String locale,
int id,
int version)
Gen an individual StringTabe Entry for a specified Domain and Locale
This method uses the chache.
|
LocalizedStringTable.Entry |
lookupLatestEntryByID(PortalContext ctx,
java.lang.String domain,
java.lang.String locale,
int id)
Gen an individual StringTabe Entry for a specified Domain and Locale
This method uses the chache.
|
LocalizedStringTable.Entry |
lookupLatestEntryByMessage(PortalContext ctx,
java.lang.String domain,
java.lang.String locale,
java.lang.String message)
Gen an individual StringTabe Entry for a specified Domain and Locale
This method uses the chache.
|
public LocalizedStringTable()
public static LocalizedStringTable getInstance()
public LocalizedStringTable.Entry lookupEntry(PortalContext ctx, java.lang.String domain, java.lang.String locale, int id, int version)
ctx
- A PortalContext. This is needed to get data from the
database, if the cache doesn't have it.domain
- The Domain of strings to look in. Examples are:
'Errors' or 'ReasonCodes'locale
- The Locale to get message for. This should follow the
Un*x / Java standardversion
- the version of the entry to get.id
- The actual message ID to get string info forpublic LocalizedStringTable.Entry lookupLatestEntryByID(PortalContext ctx, java.lang.String domain, java.lang.String locale, int id)
ctx
- A PortalContext. This is needed to get data from the
database, if the cache doesn't have it.domain
- The Domain of strings to look in. Examples are:
'Errors' or 'ReasonCodes'locale
- The Locale to get message for. This should follow the
Un*x / Java standardid
- The actual message ID to get string info forpublic LocalizedStringTable.Entry lookupLatestEntryByMessage(PortalContext ctx, java.lang.String domain, java.lang.String locale, java.lang.String message)
ctx
- A PortalContext. This is needed to get data from the
database, if the cache doesn't have it.domain
- The Domain of strings to look in. Examples are:
'Errors' or 'ReasonCodes'locale
- The Locale to get message for. This should follow the
Un*x / Java standardmessage
- The message string to find.public LocalizedStringTable.Entry[] lookupEntriesFor(PortalContext ctx, java.lang.String domain, java.lang.String locale)
ctx
- A PortalContext. This is needed to get data from the
database, if the cache doesn't have it.domain
- The Domain of strings to look in. Examples are:
'Errors' or 'ReasonCodes'locale
- The Locale to get message for. This should follow the
Un*x / Java standardpublic LocalizedStringTable.Entry[] getEntriesFor(PortalContext ctx, java.lang.String domain, java.lang.String locale, java.lang.Integer version, java.lang.Integer id)
ctx
- A PortalContext. This is needed to get data from the
database, if the cache doesn't have it.domain
- The Domain of strings to look in. Examples are:
'Errors' or 'ReasonCodes'. Can contain SQL wildcardlocale
- The Locale to get message for. This should follow the
Un*x / Java standard Can contain SQL wildcardversion
- The message version to look for.id
- A specific ID to look for.