| | |
| | | * @param <D> |
| | | * The type of relation definition constructed by this builder. |
| | | */ |
| | | protected abstract static class AbstractBuilder<C extends ConfigurationClient, S extends Configuration, D extends RelationDefinition<C, S>> { |
| | | protected abstract static class AbstractBuilder<C extends ConfigurationClient, S extends Configuration, |
| | | D extends RelationDefinition<C, S>> { |
| | | |
| | | // Common fields. |
| | | private final Common<C, S> common; |
| | |
| | | * The child managed object definition. |
| | | */ |
| | | protected AbstractBuilder(AbstractManagedObjectDefinition<?, ?> pd, String name, |
| | | AbstractManagedObjectDefinition<C, S> cd) { |
| | | AbstractManagedObjectDefinition<C, S> cd) { |
| | | this.common = new Common<C, S>(pd, name, cd); |
| | | } |
| | | |
| | |
| | | private final AbstractManagedObjectDefinition<?, ?> pd; |
| | | |
| | | // Private constructor. |
| | | private Common(AbstractManagedObjectDefinition<?, ?> pd, String name, AbstractManagedObjectDefinition<C, S> cd) { |
| | | private Common(AbstractManagedObjectDefinition<?, ?> pd, String name, |
| | | AbstractManagedObjectDefinition<C, S> cd) { |
| | | this.name = name; |
| | | this.pd = pd; |
| | | this.cd = cd; |
| | |
| | | public final LocalizableMessage getDescription(Locale locale) { |
| | | try { |
| | | String property = "relation." + common.name + ".description"; |
| | | return ManagedObjectDefinitionI18NResource.getInstance() |
| | | .getMessage(getParentDefinition(), property, locale); |
| | | return ManagedObjectDefinitionI18NResource.getInstance().getMessage(getParentDefinition(), property, |
| | | locale); |
| | | } catch (MissingResourceException e) { |
| | | return null; |
| | | } |