Interface AttributeDefinitionStore
-
- All Superinterfaces:
LocalItemDefinitionStore
- All Known Subinterfaces:
CompositeObjectDefinition
,CompositeObjectDefinitionDelegator
,MutableResourceObjectClassDefinition
,ResourceObjectClassDefinition
,ResourceObjectClassDefinitionDelegator
,ResourceObjectDefinition
,ResourceObjectDefinitionDelegator
,ResourceObjectTypeDefinition
,ResourceObjectTypeDefinitionDelegator
- All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl
,CompositeObjectDefinitionImpl
,ResourceObjectClassDefinitionImpl
,ResourceObjectTypeDefinitionImpl
,TransformableComplexTypeDefinition.TrCompositeObjectDefinition
,TransformableComplexTypeDefinition.TrResourceObjectClassDefinition
,TransformableComplexTypeDefinition.TrResourceObjectDefinition
,TransformableComplexTypeDefinition.TrResourceObjectTypeDefinition
public interface AttributeDefinitionStore extends LocalItemDefinitionStore
Provides information about resource object attributes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
containsAttributeDefinition(@NotNull QName attributeName)
Returns true if there is an attribute with the given name defined.default ResourceAttributeDefinition<?>
findAttributeDefinition(String name)
Finds attribute definition using local name only.default @Nullable ResourceAttributeDefinition<?>
findAttributeDefinition(QName name)
Finds a definition of an attribute with a given name.default @Nullable ResourceAttributeDefinition<?>
findAttributeDefinition(QName name, boolean caseInsensitive)
Finds a attribute definition by looking at the property name.default @NotNull ResourceAttributeDefinition<?>
findAttributeDefinitionRequired(@NotNull QName name)
Finds a definition of an attribute with a given name.default @NotNull ResourceAttributeDefinition<?>
findAttributeDefinitionRequired(@NotNull QName name, @NotNull Supplier<String> contextSupplier)
Finds a definition of an attribute with a given name.default @NotNull ResourceAttributeDefinition<?>
findAttributeDefinitionStrictlyRequired(@NotNull QName name)
Finds a definition of an attribute with a given name.default @NotNull ResourceAttributeDefinition<?>
findAttributeDefinitionStrictlyRequired(@NotNull QName name, @NotNull Supplier<String> contextSupplier)
Finds a definition of an attribute with a given name.@NotNull List<? extends ResourceAttributeDefinition<?>>
getAttributeDefinitions()
Returns all attribute definitions as an unmodifiable collection.default <AD extends ResourceAttributeDefinition<?>>
@NotNull Collection<AD>getAttributeDefinitions(Class<AD> type)
Returns all attribute definitions of given type as an unmodifiable collection.default Collection<? extends QName>
getNamesOfAttributesWithInboundExpressions()
default Collection<? extends QName>
getNamesOfAttributesWithOutboundExpressions()
default boolean
hasIndexOnlyAttributes()
Returns true if the object class has any index-only attributes.default <T> @NotNull ResourceAttribute<T>
propertyToAttribute(PrismProperty<T> property)
Converts aPrismProperty
into correspondingResourceAttribute
.-
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition, getDefinitions
-
-
-
-
Method Detail
-
getAttributeDefinitions
@NotNull @NotNull List<? extends ResourceAttributeDefinition<?>> getAttributeDefinitions()
Returns all attribute definitions as an unmodifiable collection. Should be the same content as returned by `getDefinitions`. The returned value is aList
because of the contract ofComplexTypeDefinition.getDefinitions()
.
-
getAttributeDefinitions
@NotNull default <AD extends ResourceAttributeDefinition<?>> @NotNull Collection<AD> getAttributeDefinitions(Class<AD> type)
Returns all attribute definitions of given type as an unmodifiable collection.
-
findAttributeDefinition
@Nullable default @Nullable ResourceAttributeDefinition<?> findAttributeDefinition(QName name)
Finds a definition of an attribute with a given name. Returns null if nothing is found.
-
findAttributeDefinitionRequired
@NotNull default @NotNull ResourceAttributeDefinition<?> findAttributeDefinitionRequired(@NotNull @NotNull QName name) throws SchemaException
Finds a definition of an attribute with a given name. ThrowsSchemaException
if it's not there.- Throws:
SchemaException
-
findAttributeDefinitionStrictlyRequired
@NotNull default @NotNull ResourceAttributeDefinition<?> findAttributeDefinitionStrictlyRequired(@NotNull @NotNull QName name)
Finds a definition of an attribute with a given name. ThrowsIllegalStateException
if it's not there.
-
findAttributeDefinitionRequired
@NotNull default @NotNull ResourceAttributeDefinition<?> findAttributeDefinitionRequired(@NotNull @NotNull QName name, @NotNull @NotNull Supplier<String> contextSupplier) throws SchemaException
Finds a definition of an attribute with a given name. ThrowsSchemaException
if it's not there.- Throws:
SchemaException
-
findAttributeDefinitionStrictlyRequired
@NotNull default @NotNull ResourceAttributeDefinition<?> findAttributeDefinitionStrictlyRequired(@NotNull @NotNull QName name, @NotNull @NotNull Supplier<String> contextSupplier)
Finds a definition of an attribute with a given name. ThrowsIllegalStateException
if it's not there.
-
findAttributeDefinition
@Nullable default @Nullable ResourceAttributeDefinition<?> findAttributeDefinition(QName name, boolean caseInsensitive)
Finds a attribute definition by looking at the property name. Returns null if nothing is found.- Parameters:
name
- property definition namecaseInsensitive
- if true, ignoring the case- Returns:
- found property definition or null
-
findAttributeDefinition
default ResourceAttributeDefinition<?> findAttributeDefinition(String name)
Finds attribute definition using local name only. BEWARE: Ignores attributes in namespaces other than "ri:" (e.g. icfs:uid and icfs:name).
-
hasIndexOnlyAttributes
default boolean hasIndexOnlyAttributes()
Returns true if the object class has any index-only attributes.
-
containsAttributeDefinition
default boolean containsAttributeDefinition(@NotNull @NotNull QName attributeName)
Returns true if there is an attribute with the given name defined.
-
getNamesOfAttributesWithOutboundExpressions
default Collection<? extends QName> getNamesOfAttributesWithOutboundExpressions()
-
getNamesOfAttributesWithInboundExpressions
default Collection<? extends QName> getNamesOfAttributesWithInboundExpressions()
-
propertyToAttribute
@NotNull default <T> @NotNull ResourceAttribute<T> propertyToAttribute(PrismProperty<T> property) throws SchemaException
Converts aPrismProperty
into correspondingResourceAttribute
. Used in the process of "definition application" in `applyDefinitions` and similar methods.- Throws:
SchemaException
-
-