Class ManagedObjectDefinitionI18NResource


  • public final class ManagedObjectDefinitionI18NResource
    extends Object
    A class for retrieving internationalized resource properties associated with a managed object definition.

    I18N resource properties are not available for the TopCfgDefn.

    • 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​(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 org.forgerock.i18n.LocalizableMessage getMessage​(AbstractManagedObjectDefinition<?,​?> d,
                                                                String key)
        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 the TopCfgDefn.
      • getMessage

        public org.forgerock.i18n.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 the TopCfgDefn.
      • getMessage

        public org.forgerock.i18n.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 the TopCfgDefn.
      • getMessage

        public org.forgerock.i18n.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 the TopCfgDefn.