Package org.forgerock.opendj.config
Class ManagedObjectDefinitionI18nResource
java.lang.Object
org.forgerock.opendj.config.ManagedObjectDefinitionI18nResource
A class for retrieving internationalized resource properties associated with
a managed object definition.
I18N resource properties are not available for the TopCfgDefn
.
-
Method Summary
Modifier and TypeMethodDescriptionGets the internationalized resource instance which can be used to retrieve the localized descriptions for the managed objects and their associated properties and relations.getInstanceForProfile
(String profile) Gets the internationalized resource instance for the named profile.getMessage
(AbstractManagedObjectDefinition<?, ?> d, String key) Get the internationalized message associated with the specified key in the default locale.getMessage
(AbstractManagedObjectDefinition<?, ?> d, String key, String... args) Get the parameterized internationalized message associated with the specified key in the default locale.getMessage
(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale) Get the internationalized message associated with the specified key and locale.getMessage
(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale, String... args) Get the parameterized internationalized message associated with the specified key and locale.
-
Method Details
-
getInstance
Gets the internationalized resource instance which can be used to retrieve the localized descriptions for the managed objects and their associated properties and relations.- Returns:
- Returns the I18N resource instance.
-
getInstanceForProfile
Gets the internationalized resource instance for the named profile.- Parameters:
profile
- The name of the profile.- Returns:
- Returns the I18N resource instance for the named profile.
-
getMessage
Get the internationalized message associated with the specified key in the default locale.- Parameters:
d
- The managed object definition.key
- The resource key.- Returns:
- Returns the internationalized message associated with the specified key in the default locale.
- Throws:
MissingResourceException
- If the key was not found.UnsupportedOperationException
- If the provided managed object definition was theTopCfgDefn
.
-
getMessage
public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale) Get the internationalized message associated with the specified key and locale.- Parameters:
d
- The managed object definition.key
- The resource key.locale
- The locale.- Returns:
- Returns the internationalized message associated with the specified key and locale.
- Throws:
MissingResourceException
- If the key was not found.UnsupportedOperationException
- If the provided managed object definition was theTopCfgDefn
.
-
getMessage
public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, Locale locale, String... args) Get the parameterized internationalized message associated with the specified key and locale.- Parameters:
d
- The managed object definition.key
- The resource key.locale
- The locale.args
- Arguments that should be inserted into the retrieved message.- Returns:
- Returns the internationalized message associated with the specified key and locale.
- Throws:
MissingResourceException
- If the key was not found.UnsupportedOperationException
- If the provided managed object definition was theTopCfgDefn
.
-
getMessage
public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key, String... args) Get the parameterized internationalized message associated with the specified key in the default locale.- Parameters:
d
- The managed object definition.key
- The resource key.args
- Arguments that should be inserted into the retrieved message.- Returns:
- Returns the internationalized message associated with the specified key in the default locale.
- Throws:
MissingResourceException
- If the key was not found.UnsupportedOperationException
- If the provided managed object definition was theTopCfgDefn
.
-