|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.rc.ResourceCollectionUtil
public final class ResourceCollectionUtil
Util class for the resource framework.
| Field Summary | |
|---|---|
static java.lang.String |
RESOURCE_KEY_DESCRIPTION
Description resource key |
static java.lang.String |
RESOURCE_KEY_DISPLAYNAME
Description resource key |
| Method Summary | |
|---|---|
static java.lang.String |
formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1)
Retrieves a message from the given resource and formats it using the given arguments (convenience method). |
static java.lang.String |
formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object[] args)
Retrieves a message from the given resource and formats it using the given arguments. |
static java.lang.String |
formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
Retrieves a message from the given resource and formats it using the given arguments (convenience method). |
static java.lang.String |
formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Retrieves a message from the given resource and formats it using the given arguments (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1)
Retrieves a message from the specified resource and formats it using the given arguments using the given locale (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object[] args)
Retrieves a message from the specified resource and formats it using the given arguments using the given locale. |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
Retrieves a message from the specified resource and formats it using the given arguments using the given locale (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Retrieves a message from the specified resource and formats it using the given arguments using the given locale (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1)
Retrieves a message from the specified resource and formats it using the given arguments using the default locale (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object[] args)
Retrieves a message from the specified resource and formats it using the given arguments using the default locale. |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
Retrieves a message from the specified resource and formats it using the given arguments using the default locale (convenience method). |
static java.lang.String |
formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Retrieves a message from the specified resource and formats it using the given arguments using the default locale (convenience method). |
static char |
getOptionalChar(ResourceCollection res,
java.lang.String key,
char dflt)
Gets the character value or a default if not found. |
static int |
getOptionalInt(ResourceCollection res,
java.lang.String key,
int dflt)
Gets the integer value or a default if not found. |
static void |
loadDescriptionObjectFromResource(DescriptionObject o,
ResourceCollection res,
java.lang.String prefix)
Loads the description from the given resource. |
static void |
loadDisplayObjectFromResource(DisplayObject o,
ResourceCollection res,
java.lang.String prefix)
Loads the description from the given resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESOURCE_KEY_DESCRIPTION
public static final java.lang.String RESOURCE_KEY_DISPLAYNAME
| Method Detail |
|---|
public static java.lang.String formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object[] args)
res - Resource that contains the messagekey - Resource name of the messageargs - Formatting arguments (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object[] args)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagekey - Resource name of the messageargs - Formatting arguments (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object[] args)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagelocale - Locale to use; If the locale is null, the default locale will be usedkey - Resource name of the messageargs - Formatting arguments (see MsgFormat)
public static java.lang.String formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1)
res - Resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
res - Resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(ResourceCollection res,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
res - Resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)arg3 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagekey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)arg3 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagelocale - Locale to use; If the locale is null, the default locale will be usedkey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagelocale - Locale to use; If the locale is null, the default locale will be usedkey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)
public static java.lang.String formatMsg(java.lang.String containerName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
containerName - Name of the resource container that contains the messageresourceName - Name of the resource that contains the messagelocale - Locale to use; If the locale is null, the default locale will be usedkey - Resource name of the messagearg1 - Formatting argument (see MsgFormat)arg2 - Formatting argument (see MsgFormat)arg3 - Formatting argument (see MsgFormat)
public static int getOptionalInt(ResourceCollection res,
java.lang.String key,
int dflt)
res - Resource to get the resource itemkey - The resource keydflt - Default value is resource does not exist
public static char getOptionalChar(ResourceCollection res,
java.lang.String key,
char dflt)
res - Resource to get the resource itemkey - The resource keydflt - Default value is resource does not exist
public static void loadDescriptionObjectFromResource(DescriptionObject o,
ResourceCollection res,
java.lang.String prefix)
o - Object that will receive the display name and description from the resourceres - Resourceprefix - Resource prefix or null
public static void loadDisplayObjectFromResource(DisplayObject o,
ResourceCollection res,
java.lang.String prefix)
o - Object that will receive the display name and description from the resourceres - Resourceprefix - Resource prefix or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||