Class Messages
- java.lang.Object
-
- org.opencms.i18n.A_CmsMessageBundle
-
- org.opencms.jsp.Messages
-
- All Implemented Interfaces:
I_CmsMessageBundle
public final class Messages extends A_CmsMessageBundle
Convenience class to access the localized messages of this OpenCms package.Additionally two utility methods for localization in the context of
TagSupport
implementations of theorg.opencms.jsp
package are provided .The
javax.servlet.jsp.tagext.TagSupport
API constraint only allows to throw certainException
types which forbids to useCmsException
which will be localized with the current user's locale at the time the request is evaluated.At the same time
TagSupport
implementations may use their memberpageContext
to get theCmsObject
and therefore the user request's locale.These methods provided here factor out the localization of exception messages and return Strings for the
org.opencms.jsp
pacakge.- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ERR_BAD_REQUEST_RESPONSE_0
Message constant for key in the resource bundle.static java.lang.String
ERR_COLLECTOR_NOT_FOUND_1
Message constant for key in the resource bundle.static java.lang.String
ERR_CONTAINER_PAGE_ELEMENT_RENDER_ERROR_2
Message constant for key in the resource bundle.static java.lang.String
ERR_CONTAINER_PAGE_NO_TYPE_3
Message constant for key in the resource bundle.static java.lang.String
ERR_CONTAINER_PAGE_NOT_FOUND_3
Message constant for key in the resource bundle.static java.lang.String
ERR_DIRECT_EDIT_PROVIDER_1
Message constant for key in the resource bundle.static java.lang.String
ERR_IMAGE_TAG_VFS_ACCESS_1
Message constant for key in the resource bundle.static java.lang.String
ERR_INVALID_CONTAINER_PARENT_2
Message constant for key in the resource bundle.static java.lang.String
ERR_MISSING_CMS_CONTROLLER_1
Message constant for key in the resource bundle.static java.lang.String
ERR_NO_CUSTOM_BEAN_1
Message constant for key in the resource bundle.static java.lang.String
ERR_PARENTLESS_TAG_1
Message constant for key in the resource bundle.static java.lang.String
ERR_PROCESS_TAG_1
Message constant for key in the resource bundle.static java.lang.String
ERR_READING_REQUIRED_RESOURCE_1
Message constant for key in the resource bundle.static java.lang.String
ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1
Message constant for key in the resource bundle.static java.lang.String
ERR_RUNTIME_1
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_CONTENTCHECK_WRONG_PARENT_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_CONTENTLOAD_INDEX_SIZE_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_CONTENTLOAD_MISSING_COLLECTOR_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_CONTENTLOAD_MISSING_PARAM_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_INVALID_LOCALE_1
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_RESOURCELOAD_INDEX_SIZE_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_RESOURCELOAD_MISSING_COLLECTOR_0
Message constant for key in the resource bundle.static java.lang.String
ERR_TAG_RESOURCELOAD_MISSING_PARAM_0
Message constant for key in the resource bundle.static java.lang.String
ERR_XML_DOCUMENT_UNMARSHAL_1
Message constant for key in the resource bundle.static java.lang.String
ERR_XSD_NO_TEMPLATE_FORMATTER_3
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_ACTIONELEM_NOT_INIT_0
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_FILE_PROP_MISSING_2
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_GEN_LINK_1
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_IMG_SCALE_2
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_INFO_PROP_READ_1
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_INVALID_INFO_PROP_0
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_INVALID_INFO_PROP_1
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_INVALID_USER_PROP_1
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_TAG_ATTRIBUTE_INVALID_3
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_TAG_ATTRIBUTE_MISSING_2
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_USER_PROP_READ_1
Message constant for key in the resource bundle.static java.lang.String
GUI_ERR_WORKPL_LABEL_READ_1
Message constant for key in the resource bundle.static java.lang.String
GUI_LABEL_STACKTRACE_0
Message constant for key in the resource bundle.static java.lang.String
GUI_TAG_USER_ADDITIONALINFO_0
Message constant for key in the resource bundle.static java.lang.String
GUI_TOOLBAR_ENABLE_EDIT_MODE_0
Message constant for key in the resource bundle.static java.lang.String
LOG_CONTAINER_NOT_FOUND_3
Message constant for key in the resource bundle.static java.lang.String
LOG_DEBUG_INTERRUPTED_EXCEPTION_1
Message constant for key in the resource bundle.static java.lang.String
LOG_ERR_CONTENT_SHOW_1
Message constant for key in the resource bundle.static java.lang.String
LOG_ERR_JSP_BEAN_0
Message constant for key in the resource bundle.static java.lang.String
LOG_ERR_JSP_WRITE_0
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_3
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_DB_REASON_3
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_DISABLED_3
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_NO_USER_3
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_TEMP_DISABLED_5
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_FAILED_WITH_MESSAGE_4
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGIN_SUCCESSFUL_3
Message constant for key in the resource bundle.static java.lang.String
LOG_LOGOUT_SUCCESFUL_3
Message constant for key in the resource bundle.static java.lang.String
LOG_MAXELEMENTS_NOT_SET_2
Message constant for key in the resource bundle.static java.lang.String
LOG_TAG_SEARCH_SEARCH_FAILED_0
Message constant for key in the resource bundle.static java.lang.String
LOG_WRONG_CONTAINER_MAXELEMENTS_3
Message constant for key in the resource bundle.static java.lang.String
LOG_WRONG_CONTAINER_TYPE_4
Message constant for key in the resource bundle.static java.lang.String
LOG_WRONG_DEVICE_TYPE_2
Message constant for key in the resource bundle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static I_CmsMessageBundle
get()
Returns an instance of this localized message accessor.java.lang.String
getBundleName()
Returns the bundle name for this OpenCms package.static java.lang.String
getLocalizedMessage(CmsMessageContainer container, javax.servlet.jsp.PageContext context)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.static java.lang.String
getLocalizedMessage(CmsMessageContainer container, javax.servlet.ServletRequest request)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.static java.lang.String
getLocalizedMessage(CmsMessageContainer container, CmsObject cms)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.-
Methods inherited from class org.opencms.i18n.A_CmsMessageBundle
container, container, container, container, container, getBundle, getBundle, getOpenCmsMessageBundles, toString
-
-
-
-
Field Detail
-
ERR_BAD_REQUEST_RESPONSE_0
public static final java.lang.String ERR_BAD_REQUEST_RESPONSE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_COLLECTOR_NOT_FOUND_1
public static final java.lang.String ERR_COLLECTOR_NOT_FOUND_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_CONTAINER_PAGE_ELEMENT_RENDER_ERROR_2
public static final java.lang.String ERR_CONTAINER_PAGE_ELEMENT_RENDER_ERROR_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_CONTAINER_PAGE_NO_TYPE_3
public static final java.lang.String ERR_CONTAINER_PAGE_NO_TYPE_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_CONTAINER_PAGE_NOT_FOUND_3
public static final java.lang.String ERR_CONTAINER_PAGE_NOT_FOUND_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_DIRECT_EDIT_PROVIDER_1
public static final java.lang.String ERR_DIRECT_EDIT_PROVIDER_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_IMAGE_TAG_VFS_ACCESS_1
public static final java.lang.String ERR_IMAGE_TAG_VFS_ACCESS_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_INVALID_CONTAINER_PARENT_2
public static final java.lang.String ERR_INVALID_CONTAINER_PARENT_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_MISSING_CMS_CONTROLLER_1
public static final java.lang.String ERR_MISSING_CMS_CONTROLLER_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_NO_CUSTOM_BEAN_1
public static final java.lang.String ERR_NO_CUSTOM_BEAN_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_PARENTLESS_TAG_1
public static final java.lang.String ERR_PARENTLESS_TAG_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_PROCESS_TAG_1
public static final java.lang.String ERR_PROCESS_TAG_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_READING_REQUIRED_RESOURCE_1
public static final java.lang.String ERR_READING_REQUIRED_RESOURCE_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1
public static final java.lang.String ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_RUNTIME_1
public static final java.lang.String ERR_RUNTIME_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_CONTENTCHECK_WRONG_PARENT_0
public static final java.lang.String ERR_TAG_CONTENTCHECK_WRONG_PARENT_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_CONTENTLOAD_INDEX_SIZE_0
public static final java.lang.String ERR_TAG_CONTENTLOAD_INDEX_SIZE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_CONTENTLOAD_MISSING_COLLECTOR_0
public static final java.lang.String ERR_TAG_CONTENTLOAD_MISSING_COLLECTOR_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_CONTENTLOAD_MISSING_PARAM_0
public static final java.lang.String ERR_TAG_CONTENTLOAD_MISSING_PARAM_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_INVALID_LOCALE_1
public static final java.lang.String ERR_TAG_INVALID_LOCALE_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_RESOURCELOAD_INDEX_SIZE_0
public static final java.lang.String ERR_TAG_RESOURCELOAD_INDEX_SIZE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_RESOURCELOAD_MISSING_COLLECTOR_0
public static final java.lang.String ERR_TAG_RESOURCELOAD_MISSING_COLLECTOR_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_TAG_RESOURCELOAD_MISSING_PARAM_0
public static final java.lang.String ERR_TAG_RESOURCELOAD_MISSING_PARAM_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_XML_DOCUMENT_UNMARSHAL_1
public static final java.lang.String ERR_XML_DOCUMENT_UNMARSHAL_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
ERR_XSD_NO_TEMPLATE_FORMATTER_3
public static final java.lang.String ERR_XSD_NO_TEMPLATE_FORMATTER_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_ACTIONELEM_NOT_INIT_0
public static final java.lang.String GUI_ERR_ACTIONELEM_NOT_INIT_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_FILE_PROP_MISSING_2
public static final java.lang.String GUI_ERR_FILE_PROP_MISSING_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_GEN_LINK_1
public static final java.lang.String GUI_ERR_GEN_LINK_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_IMG_SCALE_2
public static final java.lang.String GUI_ERR_IMG_SCALE_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_INFO_PROP_READ_1
public static final java.lang.String GUI_ERR_INFO_PROP_READ_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_INVALID_INFO_PROP_0
public static final java.lang.String GUI_ERR_INVALID_INFO_PROP_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_INVALID_INFO_PROP_1
public static final java.lang.String GUI_ERR_INVALID_INFO_PROP_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_INVALID_USER_PROP_1
public static final java.lang.String GUI_ERR_INVALID_USER_PROP_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_TAG_ATTRIBUTE_INVALID_3
public static final java.lang.String GUI_ERR_TAG_ATTRIBUTE_INVALID_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_TAG_ATTRIBUTE_MISSING_2
public static final java.lang.String GUI_ERR_TAG_ATTRIBUTE_MISSING_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_USER_PROP_READ_1
public static final java.lang.String GUI_ERR_USER_PROP_READ_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_ERR_WORKPL_LABEL_READ_1
public static final java.lang.String GUI_ERR_WORKPL_LABEL_READ_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_LABEL_STACKTRACE_0
public static final java.lang.String GUI_LABEL_STACKTRACE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_TAG_USER_ADDITIONALINFO_0
public static final java.lang.String GUI_TAG_USER_ADDITIONALINFO_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
GUI_TOOLBAR_ENABLE_EDIT_MODE_0
public static final java.lang.String GUI_TOOLBAR_ENABLE_EDIT_MODE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_CONTAINER_NOT_FOUND_3
public static final java.lang.String LOG_CONTAINER_NOT_FOUND_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_DEBUG_INTERRUPTED_EXCEPTION_1
public static final java.lang.String LOG_DEBUG_INTERRUPTED_EXCEPTION_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_ERR_CONTENT_SHOW_1
public static final java.lang.String LOG_ERR_CONTENT_SHOW_1
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_ERR_JSP_BEAN_0
public static final java.lang.String LOG_ERR_JSP_BEAN_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_ERR_JSP_WRITE_0
public static final java.lang.String LOG_ERR_JSP_WRITE_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_3
public static final java.lang.String LOG_LOGIN_FAILED_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_DB_REASON_3
public static final java.lang.String LOG_LOGIN_FAILED_DB_REASON_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_DISABLED_3
public static final java.lang.String LOG_LOGIN_FAILED_DISABLED_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_NO_USER_3
public static final java.lang.String LOG_LOGIN_FAILED_NO_USER_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_TEMP_DISABLED_5
public static final java.lang.String LOG_LOGIN_FAILED_TEMP_DISABLED_5
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_FAILED_WITH_MESSAGE_4
public static final java.lang.String LOG_LOGIN_FAILED_WITH_MESSAGE_4
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGIN_SUCCESSFUL_3
public static final java.lang.String LOG_LOGIN_SUCCESSFUL_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_LOGOUT_SUCCESFUL_3
public static final java.lang.String LOG_LOGOUT_SUCCESFUL_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_MAXELEMENTS_NOT_SET_2
public static final java.lang.String LOG_MAXELEMENTS_NOT_SET_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_TAG_SEARCH_SEARCH_FAILED_0
public static final java.lang.String LOG_TAG_SEARCH_SEARCH_FAILED_0
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_WRONG_CONTAINER_MAXELEMENTS_3
public static final java.lang.String LOG_WRONG_CONTAINER_MAXELEMENTS_3
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_WRONG_CONTAINER_TYPE_4
public static final java.lang.String LOG_WRONG_CONTAINER_TYPE_4
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
LOG_WRONG_DEVICE_TYPE_2
public static final java.lang.String LOG_WRONG_DEVICE_TYPE_2
Message constant for key in the resource bundle.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static I_CmsMessageBundle get()
Returns an instance of this localized message accessor.- Returns:
- an instance of this localized message accessor
-
getLocalizedMessage
public static java.lang.String getLocalizedMessage(CmsMessageContainer container, CmsObject cms)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.This method is needed for localization of non-
CmsException
instances that have to be thrown here due to API constraints (javax.servlet.jsp).- Parameters:
container
- A CmsMessageContainer containing the message to localize.cms
- theCmsObject
belonging to the current user (e.g. obtained withCmsFlexController.getCmsObject(ServletRequest)
).- Returns:
- the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.
-
getLocalizedMessage
public static java.lang.String getLocalizedMessage(CmsMessageContainer container, javax.servlet.jsp.PageContext context)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.This method is needed for localization of non-
CmsException
instances that have to be thrown here due to API constraints (javax.servlet.jsp).- Parameters:
container
- A CmsMessageContainer containing the message to localize.context
- The page context that is known to any callingTagSupport
instance (memberpageContext
).- Returns:
- the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.
-
getLocalizedMessage
public static java.lang.String getLocalizedMessage(CmsMessageContainer container, javax.servlet.ServletRequest request)
Returns the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.This method allows a static method (
CmsJspTagInfo.infoTagAction(String, javax.servlet.http.HttpServletRequest)
) that has nopageContext
in scope to lookup the locale at request time.- Parameters:
container
- A CmsMessageContainer containing the message to localize.request
- The current request.- Returns:
- the String for the given CmsMessageContainer localized to the current user's locale if available or to the default locale else.
- See Also:
getLocalizedMessage(CmsMessageContainer, PageContext)
-
getBundleName
public java.lang.String getBundleName()
Returns the bundle name for this OpenCms package.- Returns:
- the bundle name for this OpenCms package
-
-