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
Modifier and TypeClassDescriptionstatic class
Secondary-only identifiers.static class
Identifiers 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 ResourceObjectIdentifiers
clone()
debugDump
(int indent) boolean
@NotNull List<ResourceObjectIdentifier<?>>
The primary identifier (if present) goes first.abstract ResourceObjectIdentifier.Primary<?>
@NotNull Set<ResourceObjectIdentifier.Secondary<?>>
Not empty forResourceObjectIdentifiers.SecondaryOnly
instances.int
hashCode()
static @NotNull ResourceObjectIdentifiers
of
(@NotNull ResourceObjectDefinition objDef, @NotNull ShadowType repoShadow) Creates identifiers from a shadow.static @NotNull ResourceObjectIdentifiers
of
(@NotNull ResourceObjectDefinition objDef, @NotNull Collection<? extends ShadowSimpleAttribute<?>> attributes) Creates identifiers from a collection of identifying attributes.static @NotNull ResourceObjectIdentifiers
of
(@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 ResourceObjectIdentifiers
of
(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.WithPrimary
withPrimary
(ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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.SecondaryOnly
instances. -
equals
-
hashCode
public int hashCode() -
clone
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
getAllIdentifiers
The primary identifier (if present) goes first. -
toString
-