Interface AttributeDefinitionStore

All Superinterfaces:
LocalItemDefinitionStore
All Known Subinterfaces:
CompositeObjectDefinition, CompositeObjectDefinitionDelegator, ResourceObjectClassDefinition, ResourceObjectClassDefinitionDelegator, ResourceObjectDefinition, ResourceObjectDefinitionDelegator, ResourceObjectTypeDefinition, ResourceObjectTypeDefinitionDelegator, ShadowAttributesComplexTypeDefinition
All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl, CompositeObjectDefinitionImpl, ResourceObjectClassDefinitionImpl, ResourceObjectTypeDefinitionImpl

public interface AttributeDefinitionStore extends LocalItemDefinitionStore
Provides information about resource object attributes: both simple and reference ones.
  • Method Details

    • getAttributeDefinitions

      @NotNull @NotNull List<? extends ShadowAttributeDefinition<?,?>> getAttributeDefinitions()
      Returns all attribute definitions as an unmodifiable collection. Should be the same content as returned by `getDefinitions`. The returned value is a List because of the contract of ComplexTypeDefinition.getDefinitions().
    • getSimpleAttributeDefinitions

      @NotNull default @NotNull List<? extends ShadowSimpleAttributeDefinition<?>> getSimpleAttributeDefinitions()
    • getReferenceAttributeDefinitions

      @NotNull default @NotNull List<? extends ShadowReferenceAttributeDefinition> getReferenceAttributeDefinitions()
      Returns definitions of all associations as an unmodifiable collection. Note: these items are _not_ included in getDefinitions. (BTW, ResourceAssociationDefinition is not a subtype of ItemDefinition, not even of Definition.)
    • getAttributeDefinitions

      @NotNull default <AD extends ShadowAttributeDefinition<?, ?>> @NotNull List<? extends AD> getAttributeDefinitions(Class<AD> type)
      Returns all attribute definitions of given type as an unmodifiable collection.
    • findSimpleAttributeDefinition

      @Nullable default <T> @Nullable ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinition(QName name)
      Finds a definition of a simple attribute with a given name. Returns null if nothing is found.
    • findAttributeDefinition

      @Nullable default <SA extends ShadowAttribute<?, ?>, R> @Nullable ShadowAttributeDefinition<SA,R> findAttributeDefinition(QName name)
      Finds a definition of a simple attribute with a given name. Returns null if nothing is found.
    • findShadowAttributeDefinitionRequired

      default ShadowAttributeDefinition<?,?> findShadowAttributeDefinitionRequired(@NotNull @NotNull ItemName itemName, boolean ignoreCase, Object errorCtx) throws SchemaException
      TODO ... ignoreCase will be part of the schema, soon ...
      Throws:
      SchemaException
    • findSimpleAttributeDefinitionRequired

      @NotNull default <T> @NotNull ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinitionRequired(@NotNull @NotNull QName name) throws SchemaException
      Finds a definition of an attribute with a given name. Throws SchemaException if it's not there.
      Throws:
      SchemaException
    • findSimpleAttributeDefinitionStrictlyRequired

      @NotNull default @NotNull ShadowSimpleAttributeDefinition<?> findSimpleAttributeDefinitionStrictlyRequired(@NotNull @NotNull QName name)
      Finds a definition of an attribute with a given name. Throws IllegalStateException if it's not there.
    • findSimpleAttributeDefinitionRequired

      @NotNull default <T> @NotNull ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinitionRequired(@NotNull @NotNull QName name, @NotNull @NotNull Supplier<String> contextSupplier) throws SchemaException
      Finds a definition of an attribute with a given name. Throws SchemaException if it's not there.
      Throws:
      SchemaException
    • findSimpleAttributeDefinitionStrictlyRequired

      @NotNull default @NotNull ShadowSimpleAttributeDefinition<?> findSimpleAttributeDefinitionStrictlyRequired(@NotNull @NotNull QName name, @NotNull @NotNull Supplier<String> contextSupplier)
      Finds a definition of an attribute with a given name. Throws IllegalStateException if it's not there.
    • findSimpleAttributeDefinition

      @Nullable default <T> @Nullable ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinition(QName name, boolean caseInsensitive)
      Finds a simple attribute definition by looking at the property name. Returns null if nothing is found.
      Parameters:
      name - property definition name
      caseInsensitive - if true, ignoring the case
      Returns:
      found property definition or null
    • findAttributeDefinition

      @Nullable default <SA extends ShadowAttribute<?, ?>, R> @Nullable ShadowAttributeDefinition<SA,R> findAttributeDefinition(QName name, boolean caseInsensitive)
      Finds an attribute definition by looking at the property name. Returns null if nothing is found.
      Parameters:
      name - property definition name
      caseInsensitive - if true, ignoring the case
      Returns:
      found property definition or null
    • findSimpleAttributeDefinition

      default <T> ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinition(String name)
      Finds attribute definition using local name only. BEWARE: Ignores attributes in namespaces other than "ri:" (e.g. icfs:uid and icfs:name).
    • findSimpleAttributeDefinitionRequired

      @NotNull default <T> @NotNull ShadowSimpleAttributeDefinition<T> findSimpleAttributeDefinitionRequired(String name) throws SchemaException
      A convenience variant of findSimpleAttributeDefinition(String).
      Throws:
      SchemaException
    • 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.
    • instantiateAttribute

      @NotNull default <T> @NotNull ShadowSimpleAttribute<T> instantiateAttribute(@NotNull @NotNull QName attrName, @NotNull @NotNull T... realValues) throws SchemaException
      Real values should have no duplicates.
      Throws:
      SchemaException
    • getAllSimpleAttributesNames

      @NotNull default @NotNull Collection<ItemName> getAllSimpleAttributesNames()
    • findReferenceAttributeDefinition

      default ShadowReferenceAttributeDefinition findReferenceAttributeDefinition(QName name)