Class AttributePath

java.lang.Object
com.evolveum.midpoint.schema.processor.AttributePath
All Implemented Interfaces:
ItemPath, ShortDumpable, Serializable

@Experimental public class AttributePath extends Object implements ItemPath
Path pointing to a specific ShadowAttribute. It is always in the form of `attributes/`.
See Also:
  • Method Details

    • of

      @NotNull public static @NotNull AttributePath of(ItemPath path)
    • optionalOf

      @NotNull public static @NotNull Optional<AttributePath> optionalOf(ItemPath path)
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: ItemPath
      Returns true if the path is empty i.e. has no components.
      Specified by:
      isEmpty in interface ItemPath
    • size

      public int size()
      Description copied from interface: ItemPath
      Returns path size i.e. the number of components.
      Specified by:
      size in interface ItemPath
    • getSegments

      @NotNull public @NotNull List<?> getSegments()
      Description copied from interface: ItemPath
      Returns the path segments. Avoid using this method and access segments directly. Instead try to find suitable method in ItemPath interface. NEVER change path content using this method. TODO consider returning unmodifiable collection here (beware of performance implications)
      Specified by:
      getSegments in interface ItemPath
    • getSegment

      @Nullable public @Nullable Object getSegment(int i)
      Description copied from interface: ItemPath
      Returns the given path segment.
      Specified by:
      getSegment in interface ItemPath
    • first

      @Nullable public @Nullable Object first()
      Description copied from interface: ItemPath
      Returns the first segment or null if the path is empty.
      Specified by:
      first in interface ItemPath
    • rest

      @NotNull public @NotNull ItemPath rest(int n)
      Description copied from interface: ItemPath
      Returns the rest of the path (the tail), starting at position "n".
      Specified by:
      rest in interface ItemPath
    • firstAsPath

      public ItemPath firstAsPath()
      Description copied from interface: ItemPath
      Returns the first segment as an ItemPath. TODO consider the necessity of such method
      Specified by:
      firstAsPath in interface ItemPath
    • last

      @NotNull public @NotNull Object last()
      Description copied from interface: ItemPath
      Returns the last segment (or null if the path is empty).
      Specified by:
      last in interface ItemPath
    • allExceptLast

      @NotNull public @NotNull ItemPath allExceptLast()
      Description copied from interface: ItemPath
      Returns all segments except the last one.
      Specified by:
      allExceptLast in interface ItemPath
    • subPath

      public ItemPath subPath(int from, int to)
      Description copied from interface: ItemPath
      Returns a sub-path from (including) to (excluding) given indices.
      Specified by:
      subPath in interface ItemPath
    • lastName

      public ItemName lastName()
      Description copied from interface: ItemPath
      Returns the last name segment value; or null if there's no name segment.
      Specified by:
      lastName in interface ItemPath
    • namedSegmentsOnly

      @NotNull public @NotNull ItemPath namedSegmentsOnly()
      Description copied from interface: ItemPath
      Returns the path containing only the regular named segments.
      Specified by:
      namedSegmentsOnly in interface ItemPath
    • removeIds

      @NotNull public @NotNull ItemPath removeIds()
      Description copied from interface: ItemPath
      Returns the path with no Id segments.
      Specified by:
      removeIds in interface ItemPath
    • getAttributeName

      @NotNull public @NotNull ItemName getAttributeName()