Class ResourceObjectIdentifiers
java.lang.Object
com.evolveum.midpoint.schema.processor.ResourceObjectIdentifiers
- All Implemented Interfaces:
- DebugDumpable,- ShortDumpable,- Serializable,- Cloneable
- Direct Known Subclasses:
- ResourceObjectIdentifiers.SecondaryOnly,- ResourceObjectIdentifiers.WithPrimary
public abstract class ResourceObjectIdentifiers
extends Object
implements Serializable, DebugDumpable, ShortDumpable, 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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classSecondary-only identifiers.static classIdentifiers that contain a primary identifier.
- 
Field SummaryFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Method SummaryModifier 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.voidShow the content of the object intended for diagnostics.toString()static @NotNull ResourceObjectIdentifiers.WithPrimarywithPrimary(ResourceObjectIdentifier.Primary<?> primaryIdentifier, @NotNull Collection<? extends ResourceObjectIdentifier.Secondary<?>> secondaryIdentifiers) Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.util.ShortDumpableshortDump, shortDumpLazily
- 
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
- 
getSecondaryIdentifiersNot empty forResourceObjectIdentifiers.SecondaryOnlyinstances.
- 
equals
- 
hashCodepublic int hashCode()
- 
clone
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
 
- 
getAllIdentifiersThe primary identifier (if present) goes first.
- 
toString
- 
shortDumpDescription copied from interface:ShortDumpableShow the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
- shortDumpin interface- ShortDumpable
- Parameters:
- sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
 
 
-