org.opends.server.admin
Class ManagedObjectDefinitionI18NResource

java.lang.Object
  extended by org.opends.server.admin.ManagedObjectDefinitionI18NResource

public final class ManagedObjectDefinitionI18NResource
extends java.lang.Object

A class for retrieving internationalized resource properties associated with a managed object definition.

I18N resource properties are not available for the TopCfgDefn.


Method Summary
static ManagedObjectDefinitionI18NResource 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.
static ManagedObjectDefinitionI18NResource getInstanceForProfile(java.lang.String profile)
          Gets the internationalized resource instance for the named profile.
 Message getMessage(AbstractManagedObjectDefinition<?,?> d, java.lang.String key)
          Get the internationalized message associated with the specified key in the default locale.
 Message getMessage(AbstractManagedObjectDefinition<?,?> d, java.lang.String key, java.util.Locale locale)
          Get the internationalized message associated with the specified key and locale.
 Message getMessage(AbstractManagedObjectDefinition<?,?> d, java.lang.String key, java.util.Locale locale, java.lang.String... args)
          Get the parameterized internationalized message associated with the specified key and locale.
 Message getMessage(AbstractManagedObjectDefinition<?,?> d, java.lang.String key, java.lang.String... args)
          Get the parameterized internationalized message associated with the specified key in the default locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ManagedObjectDefinitionI18NResource 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

public static ManagedObjectDefinitionI18NResource getInstanceForProfile(java.lang.String profile)
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

public Message getMessage(AbstractManagedObjectDefinition<?,?> d,
                          java.lang.String key)
                   throws java.util.MissingResourceException,
                          java.lang.UnsupportedOperationException
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:
java.util.MissingResourceException - If the key was not found.
java.lang.UnsupportedOperationException - If the provided managed object definition was the TopCfgDefn.

getMessage

public Message getMessage(AbstractManagedObjectDefinition<?,?> d,
                          java.lang.String key,
                          java.util.Locale locale)
                   throws java.util.MissingResourceException,
                          java.lang.UnsupportedOperationException
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:
java.util.MissingResourceException - If the key was not found.
java.lang.UnsupportedOperationException - If the provided managed object definition was the TopCfgDefn.

getMessage

public Message getMessage(AbstractManagedObjectDefinition<?,?> d,
                          java.lang.String key,
                          java.util.Locale locale,
                          java.lang.String... args)
                   throws java.util.MissingResourceException,
                          java.lang.UnsupportedOperationException
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:
java.util.MissingResourceException - If the key was not found.
java.lang.UnsupportedOperationException - If the provided managed object definition was the TopCfgDefn.

getMessage

public Message getMessage(AbstractManagedObjectDefinition<?,?> d,
                          java.lang.String key,
                          java.lang.String... args)
                   throws java.util.MissingResourceException,
                          java.lang.UnsupportedOperationException
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:
java.util.MissingResourceException - If the key was not found.
java.lang.UnsupportedOperationException - If the provided managed object definition was the TopCfgDefn.