|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moremotion.resource.ResourceManager
public class ResourceManager
Responsible for accessing resources available in the current moremotion installation.
Method Summary | |
---|---|
void |
doChange(java.io.File f)
|
void |
doDelete(java.io.File f)
|
static ResourceBundle |
getResourceBundle(java.lang.String bundleName,
java.lang.String language)
Returns a ResourceBundle object by the given resource identifier and language code. |
static ResourceBundle |
getSystemResourceBundle(java.lang.String language)
Returns the ResourceBundle object of MoreMotion. |
static java.lang.String |
replaceResDefinitions(java.lang.String inBuffer,
java.lang.String language)
Resolves the preformatted $res() definitions existing in the given string using the given language. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void doChange(java.io.File f)
doChange
in interface FileChangeNotification
public void doDelete(java.io.File f)
doDelete
in interface FileChangeNotification
public static ResourceBundle getResourceBundle(java.lang.String bundleName, java.lang.String language) throws ResourceException
If a resource file, i.e. "myres" is multi-lingual it should exists in "WEB-INF/MM-INF/resources/myres.res" file in the following format:
<root> <item id="RES1"> <en>English Text</en> <de>Deutscher Text</de> </item> <item id="RES2"> ... </root>It is also possible to provide a separate resource file per language as follows.
English resource file "WEB-INF/MM-INF/resources/en/myres.res" <root> <item id="RES1">English Text</item> <item id="RES2"> ... </root> German resource file "WEB-INF/MM-INF/resources/de/myres.res" <root> <item id="RES1">Deutscher Text</item> <item id="RES2"> ... </root>
bundleName
- The name of the resource bundlelanguage
- Language code as: tr, en, de, fr, etc.
.
ResourceException
- if resource file is not found or is invalid.public static ResourceBundle getSystemResourceBundle(java.lang.String language) throws ResourceException
language
- Language code as: tr, en, de, fr, etc.
.
ResourceException
public static java.lang.String replaceResDefinitions(java.lang.String inBuffer, java.lang.String language) throws ResourceException
inBuffer
- The input string that contains preformatted $res() definitions.language
- The language code to use in resolving the $res() definitions.
ResourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |