public interface AdminMessageMgrIf
Modifier and Type | Method and Description |
---|---|
void |
deleteMsg(java.lang.String key,
int type,
java.lang.String locale)
Delete a Message
|
boolean |
doesMsgExist(java.lang.String key,
int type,
java.lang.String locale)
Does the message exist?
|
java.lang.String |
exportMsgs(int type,
java.lang.String locale)
Export Messages
|
java.lang.String |
getHelpMsg(java.lang.String msgKey,
java.lang.String locale)
Return the help message for the specified language and the specified key.
|
java.lang.String |
getHelpMsgFromDatabase(java.lang.String msgKey,
java.lang.String locale)
Get the help screen message for the specified help message key from the database in the
specified language.
|
java.lang.String |
getMsg(java.lang.String msgKey)
Gets a message with the specified key from the catalog of the default language.
|
java.lang.String |
getMsg(java.lang.String msgKey,
java.lang.String locale)
Gets a message with the specified key from the catalog for the specified locale.
|
AdminMessageSet |
getMsgs(java.lang.String locale)
Return a set of admin application messages specified language.
|
AdminMessageSet |
getMsgsFromDatabase(java.lang.String locale)
Gets an AdminMessageSet for the specified locale from the database.
|
java.lang.String |
getMsgValue(java.lang.String key,
int type,
java.lang.String locale)
Get a Message Value
|
void |
importMsgs(int type,
java.lang.String locale,
java.lang.String msgString,
boolean replace)
Import Messages
|
void |
insertMsg(java.lang.String key,
int type,
java.lang.String locale,
java.lang.String value)
Insert a Message
|
java.util.Properties |
loadMessageProperties(java.lang.String messageFilePath)
Load the contents of the file whose name is specified into a Properties object.
|
void |
refreshConfigs()
Retrieve some commonly-used properties and set the velocity log file location
|
AdminKkMsgSearchResult |
searchMsg(AdminKkMsgSearch search,
int groupSize,
int offset)
Retrieve all the messages that match the specified search criteria
|
void |
updateMsg(java.lang.String key,
int type,
java.lang.String locale,
java.lang.String value)
Update a Message
|
AdminMessageSet getMsgs(java.lang.String locale) throws KKAdminException
For file-based messages (where the configuration parameter USE_DB_FOR_MESSAGES = false) the messages are retrieved from a message properties file on the classpath that best-matches the specified language parameter. The name of the file starts with 'AdminMessages' and may have a language code or locale specification appended to it, and '.properties' added to the end. An example of such a file would be AdminMessages_de.properties. It first tries to find a file that matches the language_code exactly (this could be a full locale description such as 'de_DE' or 'pt_BR') and if no such file is found it tries to find one that matches just the first two characters (in this case 'de' and 'pt' respectively). When the specified language code is 'en' a file without any language or locale specification is used instead.
For database-based messages the language code specified must be the locale specified in the database. By default these will be the full locale names (eg. en_GB, de_DE, pt_BR etc). file for the locale or language code.
locale
- See above... Either specify the full language locale or the 2-character language
code. If null, the language code of the default language will be used.KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminMessageSet getMsgsFromDatabase(java.lang.String locale) throws KKAdminException
locale
- the 5-letter locale code eg. en_GB, es_ES, de_DE etcKKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String getHelpMsg(java.lang.String msgKey, java.lang.String locale) throws KKAdminException
For file-based messages (where the configuration parameter USE_DB_FOR_MESSAGES = false) the message is retrieved from a message properties file on the classpath that best-matches the specified language parameter. The name of the file starts with 'AdminHelpMessages' and may have a language code or locale specification appended to it, and '.properties' added to the end. An example of such a file would be AdminHelpMessages_de.properties. It first tries to find a file that matches the language_code exactly (this could be a full locale description such as 'de_DE' or 'pt_BR') and if no such file is found it tries to find one that matches just the first two characters (in this case 'de' and 'pt' respectively). When the specified language code is 'en' a file without any language or locale specification is used instead.
For database-based messages the language code specified must be the locale specified in the database. By default these will be the full locale names (eg. en_GB, de_DE, pt_BR etc). file for the locale or language code.
msgKey
- the key of the help message in the properties file. If null, a null help message
is returned.locale
- the language code (if null it uses the current default language)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String getHelpMsgFromDatabase(java.lang.String msgKey, java.lang.String locale) throws KKAdminException
msgKey
- the message keylocale
- the 5-letter locale code eg. en_GB, es_ES, de_DE etcKKAdminException
- an unexpected exception in the KonaKart Admin enginejava.util.Properties loadMessageProperties(java.lang.String messageFilePath) throws KKAdminException
messageFilePath
- the message filenameKKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String getMsg(java.lang.String msgKey) throws KKAdminException
This is for Admin Application messages only (type is KKConstants.MSG_TYP_ADMIN_APP)
msgKey
- the message key into the message catalog fileKKAdminException
- an unexpected exception in the KonaKart Admin enginejava.lang.String getMsg(java.lang.String msgKey, java.lang.String locale) throws KKAdminException
This is for Admin Application messages only (type is KKConstants.MSG_TYP_ADMIN_APP)
msgKey
- the message key into the message catalog filelocale
- the 5-letter locale code eg. en_GB, es_ES, de_DE etcKKAdminException
- an unexpected exception in the KonaKart Admin engineboolean doesMsgExist(java.lang.String key, int type, java.lang.String locale) throws KKAdminException
key
- the keytype
- the typelocale
- the localeKKAdminException
- an unexpected exception in the KonaKart Admin engineAdminKkMsgSearchResult searchMsg(AdminKkMsgSearch search, int groupSize, int offset) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
search
- the AdminKkMsgSearch object that defines the search criteriagroupSize
- a maximum of this many messages will be returned by each call (the group size)offset
- the offset in the record set that match the criteria from which records are
returnedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.String getMsgValue(java.lang.String key, int type, java.lang.String locale) throws java.lang.Exception, KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
key
- the message keytype
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.java.lang.Exception
- an unexpected exceptionKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void deleteMsg(java.lang.String key, int type, java.lang.String locale) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
key
- the message keytype
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void insertMsg(java.lang.String key, int type, java.lang.String locale, java.lang.String value) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
key
- the message keytype
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.value
- the value of the message to be insertedKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void updateMsg(java.lang.String key, int type, java.lang.String locale, java.lang.String value) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
key
- the message keytype
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.value
- the new value for the messageKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void importMsgs(int type, java.lang.String locale, java.lang.String msgString, boolean replace) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
type
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.msgString
- A String containing the messages to import in the format of a java properties filereplace
- if true all the current messages for the specified type and locale are removed
before importing the new messages. If false the new messages are appended and if a
message key already exists it is replaced by the new message value being imported.KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.String exportMsgs(int type, java.lang.String locale) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
type
- the message type (Use KKConstants.MSG_TYP_APPLICATION for application messages,
KKConstants.MSG_TYP_ADMIN_APP for Admin App messages,
KKConstants.MSG_TYP_Admin_HELP for Admin App Help messages)locale
- the message locale (eg. "en_GB"). If this is null the default locale for the store
is used.KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void refreshConfigs() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin engineCopyright © 2018 DS Data Systems UK Ltd.