Class ResourceObjectIdentifiers
java.lang.Object
com.evolveum.midpoint.schema.processor.ResourceObjectIdentifiers
- All Implemented Interfaces:
DebugDumpable,Serializable,Cloneable
- Direct Known Subclasses:
ResourceObjectIdentifiers.SecondaryOnly,ResourceObjectIdentifiers.WithPrimary
public abstract class ResourceObjectIdentifiers
extends Object
implements Serializable, DebugDumpable, Cloneable
Primary and/or secondary identifiers of a resource object.
At least one identifier must be present.
(In the future we may relax this restriction.)
Basically a categorized set of
ResourceObjectIdentifier instances.
The difference to (older) ResourceObjectIdentification is that this class does not contain the object definition.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSecondary-only identifiers.static classIdentifiers that contain a primary identifier. -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Collection<? extends ShadowSimpleAttribute<?>>asAttributes(@NotNull Collection<? extends ResourceObjectIdentifier<?>> identifiers) abstract ResourceObjectIdentifiersclone()debugDump(int indent) boolean@NotNull List<ResourceObjectIdentifier<?>>The primary identifier (if present) goes first.abstract ResourceObjectIdentifier.Primary<?>@NotNull Set<ResourceObjectIdentifier.Secondary<?>>Not empty forResourceObjectIdentifiers.SecondaryOnlyinstances.inthashCode()static @NotNull ResourceObjectIdentifiersof(@NotNull ResourceObjectDefinition objDef, @NotNull ShadowType repoShadow) Creates identifiers from a shadow.static @NotNull ResourceObjectIdentifiersof(@NotNull ResourceObjectDefinition objDef, @NotNull Collection<? extends ShadowSimpleAttribute<?>> attributes) Creates identifiers from a collection of identifying attributes.static @NotNull ResourceObjectIdentifiersof(@NotNull Collection<? extends ResourceObjectIdentifier.Primary<?>> primaryIdentifiers, @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Precondition: At least one identifier must be present, at most one primary identifier must be present.static @NotNull ResourceObjectIdentifiersof(ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Precondition: At least one identifier must be present.static @NotNull Optional<ResourceObjectIdentifiers>optionalOf(@NotNull ResourceObjectDefinition objDef, @NotNull ShadowType repoShadow) Creates identifiers from a shadow, if possible.static @NotNull Optional<ResourceObjectIdentifiers>optionalOf(@NotNull ShadowType bean) Creates identifiers from a shadow, if possible.toString()static @NotNull ResourceObjectIdentifiers.WithPrimarywithPrimary(ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Method Details
-
of
@NotNull public static @NotNull ResourceObjectIdentifiers of(@Nullable ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Precondition: At least one identifier must be present. -
withPrimary
@NotNull public static @NotNull ResourceObjectIdentifiers.WithPrimary withPrimary(@NotNull ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) -
of
@NotNull public static @NotNull ResourceObjectIdentifiers of(@NotNull @NotNull Collection<? extends ResourceObjectIdentifier.Primary<?>> primaryIdentifiers, @NotNull @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) throws SchemaException Precondition: At least one identifier must be present, at most one primary identifier must be present.- Throws:
SchemaException
-
of
@NotNull public static @NotNull ResourceObjectIdentifiers of(@NotNull @NotNull ResourceObjectDefinition objDef, @NotNull @NotNull ShadowType repoShadow) throws SchemaException Creates identifiers from a shadow. The shadow may or may not have a primary identifier. The only requirements is that it has any identifier, and at most one primary one.- Throws:
SchemaException
-
optionalOf
@NotNull public static @NotNull Optional<ResourceObjectIdentifiers> optionalOf(@NotNull @NotNull ShadowType bean) throws SchemaException Creates identifiers from a shadow, if possible. The shadow must have schema applied.- Throws:
SchemaException
-
optionalOf
@NotNull public static @NotNull Optional<ResourceObjectIdentifiers> optionalOf(@NotNull @NotNull ResourceObjectDefinition objDef, @NotNull @NotNull ShadowType repoShadow) throws SchemaException Creates identifiers from a shadow, if possible.- Throws:
SchemaException
-
of
@NotNull public static @NotNull ResourceObjectIdentifiers of(@NotNull @NotNull ResourceObjectDefinition objDef, @NotNull @NotNull Collection<? extends ShadowSimpleAttribute<?>> attributes) throws SchemaException Creates identifiers from a collection of identifying attributes.- Throws:
SchemaException
-
asAttributes
@NotNull public static @NotNull Collection<? extends ShadowSimpleAttribute<?>> asAttributes(@NotNull @NotNull Collection<? extends ResourceObjectIdentifier<?>> identifiers) -
getPrimaryIdentifier
-
getPrimaryIdentifierRequired
-
getSecondaryIdentifiers
Not empty forResourceObjectIdentifiers.SecondaryOnlyinstances. -
equals
-
hashCode
public int hashCode() -
clone
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
getAllIdentifiers
The primary identifier (if present) goes first. -
toString
-