Interface LocalItemDefinitionStore

All Known Subinterfaces:
AttributeDefinitionStore, ComplexTypeDefinition, ComplexTypeDefinitionDelegator, CompositeObjectDefinition, CompositeObjectDefinitionDelegator, ContainerDefinitionDelegator<C>, ObjectDefinitionDelegator<O>, PrismContainerDefinition<C>, PrismContainerWrapper<C>, PrismObjectDefinition<O>, PrismObjectWrapper<O>, ResourceAttributeContainerDefinition, ResourceAttributeContainerDefinitionDelegator, ResourceObjectClassDefinition, ResourceObjectClassDefinitionDelegator, ResourceObjectDefinition, ResourceObjectDefinitionDelegator, ResourceObjectTypeDefinition, ResourceObjectTypeDefinitionDelegator, ShadowAssociationsComplexTypeDefinition, ShadowAssociationsContainerDefinition, ShadowAttributesComplexTypeDefinition, ShadowItemsComplexTypeDefinition, ShadowReferenceAttributeDefinition, ShadowWrapper
All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl, AssignmentHolderWrapper, CaseWorkItemTypeWrapper, CompositeObjectDefinitionImpl, com.evolveum.midpoint.prism.impl.PrismContainerDefinitionImpl, PrismContainerWrapperImpl, PrismObjectWrapperImpl, PrismSchemaWrapper, ProfilingClassLoggerContainerWrapperImpl, ResourceAttributeContainerDefinitionImpl, ResourceAttributeMappingWrapper, ResourceObjectClassDefinitionImpl, ResourceObjectTypeDefinitionImpl, ResourceWrapper, ShadowAssociationsContainerDefinitionImpl, ShadowAssociationWrapperImpl, ShadowReferenceAttributeDefinitionImpl, ShadowWrapperImpl, ValueMetadataWrapperImpl

public interface LocalItemDefinitionStore
Used to retrieve item definition from 'local definition store' - i.e. store that contains definition(s) related to one parent item. Such stores are prism containers and complex types (and their subtypes like attribute containers or object class definitions). Methods `findLocalItemDefinition(...)` never try to resolve item names globally in the schema registry. On the other hand, path-based methods do that if they come across `xsd:any`-type container during the resolution. Note: Although these methods can return null, they are not marked as `@Nullable`. It is because we want avoid false warnings about possible NPEs when used e.g. to find definitions that certainly exist (like `c:user` etc). TODO What to do with "ID extends ItemDefinition"? It looks pretty bad.
  • Method Details

    • getDefinitions

      @NotNull @NotNull Collection<? extends ItemDefinition<?>> getDefinitions()
      Returns all item definitions in this store.
    • findLocalItemDefinition

      default <ID extends ItemDefinition<?>> ID findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<ID> clazz, boolean caseInsensitive)
      Returns the local item definition corresponding to given item name (optionally case-insensitive) and definition class. Does not try to resolve items globally (in the case of "any" content). BEWARE: In the case of ambiguities, returns any suitable definition. (This may change.)
    • findLocalItemDefinition

      default <ID extends ItemDefinition<?>> ID findLocalItemDefinition(@NotNull @NotNull QName name)
      Returns the local ItemDefinition corresponding to given item name (in case-sensitive manner). Does not try to resolve items globally (in the case of "any" content). Note: some implementors provide optimized implementations of this method.
    • findItemDefinition

      default <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path)
      Returns ItemDefinition corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.
    • findPropertyDefinition

      default <T> PrismPropertyDefinition<T> findPropertyDefinition(@NotNull @NotNull ItemPath path)
      Returns PrismPropertyDefinition corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.
    • findReferenceDefinition

      default PrismReferenceDefinition findReferenceDefinition(@NotNull @NotNull ItemPath path)
      Returns PrismReferenceDefinition corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.
    • findContainerDefinition

      default <C extends Containerable> PrismContainerDefinition<C> findContainerDefinition(@NotNull @NotNull ItemPath path)
      Returns PrismContainerDefinition corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.
    • findItemDefinition

      <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz)
      Returns a definition of given type corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.
    • containsItemDefinition

      default boolean containsItemDefinition(@NotNull @NotNull QName itemName)
      Returns true if the store contains a definition of an item with given name. TODO what about global names? Current implementation resolves them, but is this expected by clients?