Package org.apache.manifoldcf.ui.i18n
Class Messages
- java.lang.Object
-
- org.apache.manifoldcf.core.i18n.Messages
-
- org.apache.manifoldcf.ui.i18n.Messages
-
public class Messages extends Messages
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.manifoldcf.core.i18n.Messages
Messages.BundleKey, Messages.MessageKey, Messages.ResourceKey
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_BUNDLE_NAME
-
Fields inherited from class org.apache.manifoldcf.core.i18n.Messages
bundleSet, messageSet, resourceSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Messages()
Constructor - do no instantiate
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getAttributeJavascriptString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute/javascript context.static java.lang.String
getAttributeJavascriptString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getAttributeJavascriptString(java.util.Locale locale, java.lang.String messageKey)
static java.lang.String
getAttributeJavascriptString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getAttributeString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute context.static java.lang.String
getAttributeString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getAttributeString(java.util.Locale locale, java.lang.String messageKey)
static java.lang.String
getAttributeString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getBodyJavascriptString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body/javascript context.static java.lang.String
getBodyJavascriptString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getBodyJavascriptString(java.util.Locale locale, java.lang.String messageKey)
static java.lang.String
getBodyJavascriptString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getBodyString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body context.static java.lang.String
getBodyString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getBodyString(java.util.Locale locale, java.lang.String messageKey)
static java.lang.String
getBodyString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static java.lang.String
getString(java.util.Locale locale, java.lang.String messageKey)
static java.lang.String
getString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
static void
outputResource(IHTTPOutput output, java.lang.Class classInstance, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.String> substitutionParameters, boolean mapToUpperCase)
Write a resource to HTTP output, specifying what to substitute, and more importantly, how.static void
outputResourceWithVelocity(IHTTPOutput output, java.lang.Class clazz, java.lang.String bundleName, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.Object> contextObjects)
static void
outputResourceWithVelocity(IHTTPOutput output, java.lang.Class clazz, java.lang.String bundleName, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.String> substitutionParameters, boolean mapToUpperCase)
Write a resource to HTTP output, specifying what to substitute, and more importantly, how.-
Methods inherited from class org.apache.manifoldcf.core.i18n.Messages
complainMissingBundle, complainMissingMessage, complainMissingResource, createVelocityEngine, getMessage, getMessage, getResourceAsStream, getResourceBundle, getString, getString, getString, logError
-
-
-
-
Field Detail
-
DEFAULT_BUNDLE_NAME
public static final java.lang.String DEFAULT_BUNDLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getString
public static java.lang.String getString(java.util.Locale locale, java.lang.String messageKey)
-
getAttributeString
public static java.lang.String getAttributeString(java.util.Locale locale, java.lang.String messageKey)
-
getBodyString
public static java.lang.String getBodyString(java.util.Locale locale, java.lang.String messageKey)
-
getAttributeJavascriptString
public static java.lang.String getAttributeJavascriptString(java.util.Locale locale, java.lang.String messageKey)
-
getBodyJavascriptString
public static java.lang.String getBodyJavascriptString(java.util.Locale locale, java.lang.String messageKey)
-
getString
public static java.lang.String getString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getAttributeString
public static java.lang.String getAttributeString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getBodyString
public static java.lang.String getBodyString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getAttributeJavascriptString
public static java.lang.String getAttributeJavascriptString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getBodyJavascriptString
public static java.lang.String getBodyJavascriptString(java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getString
public static java.lang.String getString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getAttributeString
public static java.lang.String getAttributeString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getBodyString
public static java.lang.String getBodyString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getAttributeJavascriptString
public static java.lang.String getAttributeJavascriptString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
getBodyJavascriptString
public static java.lang.String getBodyJavascriptString(java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
-
outputResourceWithVelocity
public static void outputResourceWithVelocity(IHTTPOutput output, java.lang.Class clazz, java.lang.String bundleName, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.Object> contextObjects) throws ManifoldCFException
- Throws:
ManifoldCFException
-
outputResourceWithVelocity
public static void outputResourceWithVelocity(IHTTPOutput output, java.lang.Class clazz, java.lang.String bundleName, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.String> substitutionParameters, boolean mapToUpperCase) throws ManifoldCFException
Write a resource to HTTP output, specifying what to substitute, and more importantly, how. $PARAM_NAME will be substituted directly with the value. $PARAM_NAME_A will be substituted with HTML attribute-escaped value. $PARAM_NAME_B will be substituted with HTML body-escaped value. $PARAM_NAME_AJ will be substituted with HTML attribute + Javascript escaped value. $PARAM_NAME_BJ will be substituted with HTML body + Javascript escaped value.- Throws:
ManifoldCFException
-
outputResource
public static void outputResource(IHTTPOutput output, java.lang.Class classInstance, java.lang.String pathName, java.util.Locale locale, java.lang.String resourceKey, java.util.Map<java.lang.String,java.lang.String> substitutionParameters, boolean mapToUpperCase) throws ManifoldCFException
Write a resource to HTTP output, specifying what to substitute, and more importantly, how. ${PARAM_NAME} will be substituted directly with the value. ${PARAM_NAME:A} will be substituted with HTML attribute-escaped value. ${PARAM_NAME:B} will be substituted with HTML body-escaped value. ${PARAM_NAME:AJ} will be substituted with HTML attribute + Javascript escaped value. ${PARAM_NAME:BJ} will be substituted with HTML body + Javascript escaped value.- Throws:
ManifoldCFException
-
getBodyString
public static java.lang.String getBodyString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body context.
-
getAttributeString
public static java.lang.String getAttributeString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute context.
-
getAttributeJavascriptString
public static java.lang.String getAttributeJavascriptString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute/javascript context.
-
getBodyJavascriptString
public static java.lang.String getBodyJavascriptString(java.lang.Class clazz, java.lang.String bundleName, java.util.Locale locale, java.lang.String messageKey, java.lang.Object[] args)
Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body/javascript context.
-
-