C
- The type of client managed object configuration that this
definition represents.S
- The type of server managed object configuration that this
definition represents.public abstract class AbstractManagedObjectDefinition<C extends ConfigurationClient,S extends Configuration> extends Object
Applications can query a managed object definition in order to determine the overall configuration model of an application.
Modifier | Constructor and Description |
---|---|
protected |
AbstractManagedObjectDefinition(String name,
AbstractManagedObjectDefinition<? super C,? super S> parent)
Create a new abstract managed object definition.
|
Modifier and Type | Method and Description |
---|---|
AggregationPropertyDefinition<?,?> |
getAggregationPropertyDefinition(String name)
Get the specified aggregation property definition associated with this
type of managed object.The search will include any inherited aggregation
property definitions.
|
Collection<AggregationPropertyDefinition<?,?>> |
getAggregationPropertyDefinitions()
Get the aggregation property definitions defined by this managed object
definition.
|
Collection<AggregationPropertyDefinition<?,?>> |
getAllAggregationPropertyDefinitions()
Get all the aggregation property definitions associated with this type of
managed object.
|
Collection<AbstractManagedObjectDefinition<? extends C,? extends S>> |
getAllChildren()
Get all the child managed object definitions which inherit from this
managed object definition.
|
Collection<Constraint> |
getAllConstraints()
Get all the constraints associated with this type of managed object.
|
Collection<PropertyDefinition<?>> |
getAllPropertyDefinitions()
Get all the property definitions associated with this type of managed
object.
|
Collection<RelationDefinition<?,?>> |
getAllRelationDefinitions()
Get all the relation definitions associated with this type of managed
object.
|
Collection<AggregationPropertyDefinition<?,?>> |
getAllReverseAggregationPropertyDefinitions()
Get all the aggregation property definitions which refer to this managed
object definition.
|
Collection<RelationDefinition<? super C,? super S>> |
getAllReverseRelationDefinitions()
Get all the relation definitions which refer to this managed object
definition.
|
Collection<Tag> |
getAllTags()
Get all the tags associated with this type of managed object.
|
AbstractManagedObjectDefinition<? extends C,? extends S> |
getChild(String name)
Get the named child managed object definition which inherits from this
managed object definition.
|
Collection<AbstractManagedObjectDefinition<? extends C,? extends S>> |
getChildren()
Get the child managed object definitions which inherit directly from this
managed object definition.
|
Collection<Constraint> |
getConstraints()
Get the constraints defined by this managed object definition.
|
LocalizableMessage |
getDescription()
Gets the optional description of this managed object definition in the default locale.
|
LocalizableMessage |
getDescription(Locale locale)
Gets the optional description of this managed object definition in the specified locale.
|
String |
getName()
Get the name of the definition.
|
AbstractManagedObjectDefinition<? super C,? super S> |
getParent()
Get the parent managed object definition, if applicable.
|
PropertyDefinition<?> |
getPropertyDefinition(String name)
Get the specified property definition associated with this type of
managed object.
|
Collection<PropertyDefinition<?>> |
getPropertyDefinitions()
Get the property definitions defined by this managed object definition.
|
RelationDefinition<?,?> |
getRelationDefinition(String name)
Get the specified relation definition associated with this type of
managed object.The search will include any inherited relation
definitions.
|
Collection<RelationDefinition<?,?>> |
getRelationDefinitions()
Get the relation definitions defined by this managed object definition.
|
Collection<AggregationPropertyDefinition<?,?>> |
getReverseAggregationPropertyDefinitions()
Get the aggregation property definitions which refer directly to this
managed object definition.
|
Collection<RelationDefinition<C,S>> |
getReverseRelationDefinitions()
Get the relation definitions which refer directly to this managed object
definition.
|
LocalizableMessage |
getSynopsis()
Gets the synopsis of this managed object definition in the default
locale.
|
LocalizableMessage |
getSynopsis(Locale locale)
Gets the synopsis of this managed object definition in the specified
locale.
|
LocalizableMessage |
getUserFriendlyName()
Gets the user friendly name of this managed object definition in the
default locale.
|
LocalizableMessage |
getUserFriendlyName(Locale locale)
Gets the user friendly name of this managed object definition in the
specified locale.
|
LocalizableMessage |
getUserFriendlyPluralName()
Gets the user friendly plural name of this managed object definition in
the default locale.
|
LocalizableMessage |
getUserFriendlyPluralName(Locale locale)
Gets the user friendly plural name of this managed object definition in
the specified locale.
|
boolean |
hasChildren()
Determine whether there are any child managed object definitions which
inherit from this managed object definition.
|
boolean |
hasOption(ManagedObjectOption option)
Determines whether this managed object definition has the specified option.
|
boolean |
hasTag(Tag t)
Determines whether this managed object definition has the specified tag.
|
protected void |
initialize()
Initializes all of the components associated with this managed object
definition.
|
boolean |
isChildOf(AbstractManagedObjectDefinition<?,?> d)
Determines whether this managed object definition is a sub-type of
the provided managed object definition.
|
boolean |
isParentOf(AbstractManagedObjectDefinition<?,?> d)
Determines whether this managed object definition is a super-type
of the provided managed object definition.
|
boolean |
isTop()
Determines whether this managed object definition is the
TopCfgDefn . |
protected void |
registerConstraint(Constraint constraint)
Register a constraint with this managed object definition.
|
protected void |
registerOption(ManagedObjectOption option)
Register an option with this managed object definition.
|
protected void |
registerPropertyDefinition(PropertyDefinition<?> d)
Register a property definition with this managed object definition,
overriding any existing property definition with the same name.
|
protected void |
registerRelationDefinition(RelationDefinition<?,?> d)
Register a relation definition with this managed object definition,
overriding any existing relation definition with the same name.
|
protected void |
registerTag(Tag tag)
Register a tag with this managed object definition.
|
ManagedObjectDefinition<? extends C,? extends S> |
resolveManagedObjectDefinition(DefinitionResolver r)
Finds a sub-type of this managed object definition which most closely
corresponds to the matching criteria of the provided definition resolver.
|
String |
toString() |
void |
toString(StringBuilder builder)
Append a string representation of the managed object definition to the
provided string builder.
|
protected AbstractManagedObjectDefinition(String name, AbstractManagedObjectDefinition<? super C,? super S> parent)
name
- The name of the definition.parent
- The parent definition, or null
if there is no parent
(only the TopCfgDefn
should have a null
parent,
unless the definition is being used for testing).public final Collection<AbstractManagedObjectDefinition<? extends C,? extends S>> getAllChildren()
public final Collection<Constraint> getAllConstraints()
public final Collection<PropertyDefinition<?>> getAllPropertyDefinitions()
public final Collection<RelationDefinition<?,?>> getAllRelationDefinitions()
public final Collection<RelationDefinition<? super C,? super S>> getAllReverseRelationDefinitions()
public final Collection<AggregationPropertyDefinition<?,?>> getAllAggregationPropertyDefinitions()
public final Collection<AggregationPropertyDefinition<?,?>> getAllReverseAggregationPropertyDefinitions()
public final Collection<Tag> getAllTags()
public final AbstractManagedObjectDefinition<? extends C,? extends S> getChild(String name)
name
- The name of the managed object definition sub-type.IllegalArgumentException
- If the specified managed object definition name was null or
empty or if the requested subordinate managed object
definition was not found.public final Collection<AbstractManagedObjectDefinition<? extends C,? extends S>> getChildren()
public final Collection<Constraint> getConstraints()
public final LocalizableMessage getDescription()
null
if there is no description.UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getDescription(Locale locale)
locale
- The locale.null
if there is no description.UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final String getName()
public final AbstractManagedObjectDefinition<? super C,? super S> getParent()
null
if this definition is the TopCfgDefn
.public final PropertyDefinition<?> getPropertyDefinition(String name) throws IllegalArgumentException
name
- The name of the property definition to be retrieved.IllegalArgumentException
- If the specified property name was null or empty or if the
requested property definition was not found.public final Collection<PropertyDefinition<?>> getPropertyDefinitions()
public final RelationDefinition<?,?> getRelationDefinition(String name)
name
- The name of the relation definition to be retrieved.IllegalArgumentException
- If the specified relation name was null or empty or if the
requested relation definition was not found.public final Collection<RelationDefinition<?,?>> getRelationDefinitions()
public final Collection<RelationDefinition<C,S>> getReverseRelationDefinitions()
public final AggregationPropertyDefinition<?,?> getAggregationPropertyDefinition(String name)
name
- The name of the aggregation property definition to be
retrieved.IllegalArgumentException
- If the specified aggregation property name was null or empty
or if the requested aggregation property definition was not
found.public final Collection<AggregationPropertyDefinition<?,?>> getAggregationPropertyDefinitions()
public final Collection<AggregationPropertyDefinition<?,?>> getReverseAggregationPropertyDefinitions()
public final LocalizableMessage getSynopsis()
UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getSynopsis(Locale locale)
locale
- The locale.UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getUserFriendlyName()
UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getUserFriendlyName(Locale locale)
locale
- The locale.UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getUserFriendlyPluralName()
UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final LocalizableMessage getUserFriendlyPluralName(Locale locale)
locale
- The locale.UnsupportedOperationException
- If this managed object definition is the TopCfgDefn
.public final boolean hasChildren()
true
if this type of managed object has any
child managed object definitions, false
otherwise.public final boolean hasOption(ManagedObjectOption option)
option
- The option to test.true
if the option is set, or false
otherwise.public final boolean hasTag(Tag t)
t
- The tag definition.true
if this managed object definition has the specified tag.public final boolean isChildOf(AbstractManagedObjectDefinition<?,?> d)
getParent()
method.d
- The managed object definition to be checked.true
if this managed object definition is a
sub-type of the provided managed object definition.public final boolean isParentOf(AbstractManagedObjectDefinition<?,?> d)
getAllChildren()
.d
- The managed object definition to be checked.true
if this managed object definition is a
super-type of the provided managed object definition.public final boolean isTop()
TopCfgDefn
.true
if this managed object definition is the TopCfgDefn
.public final ManagedObjectDefinition<? extends C,? extends S> resolveManagedObjectDefinition(DefinitionResolver r) throws DefinitionDecodingException
r
- The definition resolver.DefinitionDecodingException
- If no matching sub-type could be found or if the resolved
definition was abstract.DefinitionResolver
public final void toString(StringBuilder builder)
builder
- The string builder where the string representation should be
appended.protected final void initialize() throws Exception
Exception
- If this managed object definition could not be initialized.protected final void registerConstraint(Constraint constraint)
This method must not be called by applications.
constraint
- The constraint to be registered.protected final void registerPropertyDefinition(PropertyDefinition<?> d)
This method must not be called by applications.
d
- The property definition to be registered.protected final void registerRelationDefinition(RelationDefinition<?,?> d)
This method must not be called by applications.
d
- The relation definition to be registered.protected final void registerOption(ManagedObjectOption option)
This method must not be called by applications.
option
- The option to be registered.protected final void registerTag(Tag tag)
This method must not be called by applications.
tag
- The tag to be registered.Copyright 2010-2022 ForgeRock AS.