public class ResourceManager
extends java.lang.Object
getRuntimeInstance()readProperty(String, String)addResourceConfiguration(String, String, String).| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceManager.MyParser |
| Constructor and Description |
|---|
ResourceManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResourceConfiguration(java.lang.String resourceName,
java.lang.String packageName,
java.lang.String defaultValue)
Runtime configuration interface to add resources dynamically via API.
|
static java.lang.String |
findLiteral(java.lang.String resourceName,
java.lang.String literalId)
Find text for a resource / literal-id within the current runtime
instance.
|
static java.lang.String |
findLiteral(java.lang.String resourceName,
java.lang.String literalId,
java.util.Locale locale)
Find text for a resource / literal-id within the current runtime
instance.
|
static java.lang.String |
findText(java.lang.String text)
If the text is an id ("#{rr.xxx.yyy}", or "#{rr.xxx['yyy']}") ==> return text, that is defined behind the literal.
|
static ResourceManager |
getInstanceViaFileSystem(java.lang.String resourcesConfigDirectory)
Passes back an instance for a given file name.
|
java.lang.String |
getResourceReaderExpression(java.lang.String resource) |
java.util.Map<java.lang.String,java.lang.String> |
getResources() |
static ResourceManager |
getRuntimeInstance()
Passes back the default runtime instance that is used within the current
web application.
|
static void |
init(ServletContext context)
Initialization of the runtime instance.
|
java.lang.String |
readProperty(java.lang.String resourceName,
java.lang.String property)
Read text for property within the resource bundle.
|
java.lang.String |
readProperty(java.lang.String resourceName,
java.lang.String property,
java.util.Locale locale)
Read text for property within the resource bundle.
|
public static void init(ServletContext context)
public static ResourceManager getRuntimeInstance()
public static ResourceManager getInstanceViaFileSystem(java.lang.String resourcesConfigDirectory)
public java.lang.String readProperty(java.lang.String resourceName,
java.lang.String property,
java.util.Locale locale)
public java.lang.String readProperty(java.lang.String resourceName,
java.lang.String property)
public java.util.Map<java.lang.String,java.lang.String> getResources()
public static java.lang.String findLiteral(java.lang.String resourceName,
java.lang.String literalId)
public static java.lang.String findLiteral(java.lang.String resourceName,
java.lang.String literalId,
java.util.Locale locale)
public static java.lang.String findText(java.lang.String text)
public void addResourceConfiguration(java.lang.String resourceName,
java.lang.String packageName,
java.lang.String defaultValue)
resourceName - Name of the resource file(s).packageName - Package in which to look for the resource files.defaultValue - (maybe passed as null)
Default value if a literal is not part of the resource files.public java.lang.String getResourceReaderExpression(java.lang.String resource)
Copyright © CaptainCasa Gmbh. All Rights Reserved.