Package org.opencms.i18n
Class CmsVfsResourceBundle
java.lang.Object
java.util.ResourceBundle
org.opencms.i18n.CmsVfsResourceBundle
- All Implemented Interfaces:
I_CmsResourceBundle
Resource bundle which loads its data from a VFS resource.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Implementors of this interface are responsible for actually loading the data from the VFS.Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control
-
Field Summary
Modifier and TypeFieldDescriptionprotected static CmsObject
The CMS context to use.protected CmsVfsResourceBundle.I_Loader
The bundle loader instance to use.protected CmsVfsBundleParameters
The VFS bundle parameters.static final String
Name constant for the 'properties' vfs bundle type.static final String
Name constant for the 'xml content' vfs bundle type.Fields inherited from class java.util.ResourceBundle
parent
-
Constructor Summary
ConstructorDescriptionCreates a new VFS bundle instance. -
Method Summary
Modifier and TypeMethodDescriptiongetClone()
Creates a clone of the resource bundle.protected String
Returns the path of the file to read the message data from.getKeys()
Gets the bundle parameters.protected Object
handleGetObject
(String key) static void
setCmsObject
(CmsObject cms) Sets the CMS context used by this class.void
Sets the locale used for this resource bundle.void
Sets the parent bundle.Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getObject, getString, getStringArray, keySet
-
Field Details
-
TYPE_PROPERTIES
Name constant for the 'properties' vfs bundle type.- See Also:
-
TYPE_XML
Name constant for the 'xml content' vfs bundle type.- See Also:
-
m_cms
The CMS context to use. -
m_loader
The bundle loader instance to use. -
m_parameters
The VFS bundle parameters.
-
-
Constructor Details
-
CmsVfsResourceBundle
Creates a new VFS bundle instance.- Parameters:
params
- the VFS bundle parameters
-
-
Method Details
-
setCmsObject
Sets the CMS context used by this class.This can be never called more than once, and is usually called on startup.
- Parameters:
cms
- the CMS context to set
-
getClone
Description copied from interface:I_CmsResourceBundle
Creates a clone of the resource bundle.(This may not actually clone the resource bundle if it is immutable).
- Specified by:
getClone
in interfaceI_CmsResourceBundle
- Returns:
- a clone of the resource bundle
- See Also:
-
getKeys
- Specified by:
getKeys
in classResourceBundle
- See Also:
-
getLocale
- Overrides:
getLocale
in classResourceBundle
- See Also:
-
getParameters
Gets the bundle parameters.- Returns:
- the bundle parameters
-
setLocale
Description copied from interface:I_CmsResourceBundle
Sets the locale used for this resource bundle.- Specified by:
setLocale
in interfaceI_CmsResourceBundle
- Parameters:
locale
- the locale to set- See Also:
-
setParent
Description copied from interface:I_CmsResourceBundle
Sets the parent bundle.- Specified by:
setParent
in interfaceI_CmsResourceBundle
- Overrides:
setParent
in classResourceBundle
- Parameters:
p
- the parent bundle to set- See Also:
-
getFilePath
Returns the path of the file to read the message data from.- Returns:
- the root path of the file containing the message data
-
handleGetObject
- Specified by:
handleGetObject
in classResourceBundle
- See Also:
-
handleKeySet
- Overrides:
handleKeySet
in classResourceBundle
- See Also:
-