Interface ShadowSimpleAttribute<T>

All Superinterfaces:
DebugDumpable, Freezable, Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>, Itemable, ParentVisitable, PathVisitable, PrismProperty<T>, Revivable, Serializable, ShadowAttribute<PrismPropertyValue<T>,T>, Visitable
All Known Implementing Classes:
ShadowSimpleAttributeImpl

public interface ShadowSimpleAttribute<T> extends ShadowAttribute<PrismPropertyValue<T>,T>, PrismProperty<T>
TODO update this doc Resource Object Attribute is a Property of Resource Object. All that applies to property applies also to attribute, e.g. only a whole attributes can be changed, they may be simple or complex types, they should be representable in XML, etc. In addition, attribute definition may have some annotations that suggest its purpose and use on the Resource. Resource Object Attribute understands resource-specific annotations such as native attribute name. Resource Object Attribute is mutable.
Author:
Radovan Semancik
  • Method Details

    • of

      static <T> ShadowSimpleAttribute<T> of(@NotNull @NotNull Item<?,?> item)
      Converts the PrismProperty into ShadowSimpleAttribute, if needed.
    • getDefinition

      Description copied from interface: Item
      Returns applicable definition.

      May return null if no definition is applicable or the definition is not known.

      Specified by:
      getDefinition in interface Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
      Specified by:
      getDefinition in interface Itemable
      Specified by:
      getDefinition in interface ShadowAttribute<PrismPropertyValue<T>,T>
      Returns:
      applicable definition
    • getDefinitionRequired

      @NotNull default @NotNull ShadowSimpleAttributeDefinition<T> getDefinitionRequired()
    • getNativeAttributeName

      default String getNativeAttributeName()
      Returns native attribute name. Native name of the attribute is a name as it is used on the resource or as seen by the connector. It is used for diagnostics purposes and may be used by the connector itself. As the attribute names in XSD have to comply with XML element name limitations, this may be the only way how to determine original attribute name. Returns null if native attribute name is not set or unknown. The name should be the same as the one used by the resource, if the resource supports naming of attributes. E.g. in case of LDAP this annotation should contain "cn", "givenName", etc. If the resource is not that flexible, the native attribute names may be hardcoded (e.g. "username", "homeDirectory") or may not be present at all.
      Returns:
      native attribute name
    • applyDefinitionFrom

      @NotNull default @NotNull ShadowSimpleAttribute<T> applyDefinitionFrom(@NotNull @NotNull ResourceObjectDefinition objectDefinition) throws SchemaException
      Returns self to be usable in chained calls.
      Throws:
      SchemaException
    • clone

      Description copied from interface: Item
      Literal clone.
      Specified by:
      clone in interface Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
      Specified by:
      clone in interface PrismProperty<T>
      Specified by:
      clone in interface ShadowAttribute<PrismPropertyValue<T>,T>
    • getOrigValues

      @NotNull @NotNull Collection<?> getOrigValues()
      Returns the original real values. Assumes the definition is present.
    • getNormValues

      @NotNull @NotNull Collection<?> getNormValues() throws SchemaException
      Returns the normalized real values. Assumes the definition is present.
      Throws:
      SchemaException
    • isPolyString

      default boolean isPolyString()
      Returns true if the attribute is a PolyString-typed one - either native, or "simulated" (with a normalizer). Assumes the definition is present.
    • addNormalizedValues

      void addNormalizedValues(@NotNull @NotNull Collection<?> realValues, @NotNull @NotNull ShadowSimpleAttributeDefinition<T> newDefinition) throws SchemaException
      There must be no duplicates or nulls among the real values. RawType values are tried to be converted.
      Throws:
      SchemaException
    • getStandardPath

      @NotNull default @NotNull ItemPath getStandardPath()
    • plainEqFilter

      @NotNull default @NotNull ObjectFilter plainEqFilter()
      Creates "eq" filter for the current value of this attribute. It must have a definition and exactly one value. Matching rule is not specified. We assume this filter will be evaluated on the resource.
    • normalizationAwareEqFilter

      @NotNull default @NotNull ObjectFilter normalizationAwareEqFilter() throws SchemaException
      Creates normalization-aware "eq" filter (i.e., suitable for the execution against the repository) for the current value of this attribute. It must have a definition and exactly one value.
      Throws:
      SchemaException
    • normalizationAwareVersion

      @NotNull default <N> @NotNull PrismProperty<N> normalizationAwareVersion() throws SchemaException
      Creates normalization-aware version of this attribute: one that is suitable to be used in the repository.
      Throws:
      SchemaException
    • createReplaceDelta

      @NotNull default @NotNull PropertyDelta<T> createReplaceDelta()
      Creates a delta that would enforce (via REPLACE operation) the values of this attribute.
    • checkDefinitionConsistence

      default void checkDefinitionConsistence(@NotNull @NotNull ResourceObjectDefinition objectDefinition)
      TODO decide on this.
    • hasNoValues

      default boolean hasNoValues()
      Specified by:
      hasNoValues in interface Item<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
      Specified by:
      hasNoValues in interface ShadowAttribute<PrismPropertyValue<T>,T>