Class ShadowReferenceAttributeValue
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.PrismValueImpl
com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
com.evolveum.midpoint.schema.processor.ShadowReferenceAttributeValue
- All Implemented Interfaces:
Freezable,ItemDefinitionTransformer.TransformableValue,MidpointOriginMetadata,PathVisitable,PrismReferenceValue,PrismValue,PrismVisitable,Revivable,SchemaLookup.Aware,Visitable,DebugDumpable,ShortDumpable,Serializable
public class ShadowReferenceAttributeValue
extends com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
Represents a value of a
ShadowReferenceAttribute.
For example, a single group membership for a given account: `joe` is a member of `admins`.
NOTE: As an experiment, we try to keep instances as consistent as possible.
Any places where this is checked, will throw IllegalStateException instead of SchemaException.
We will simply not allow creating a non-compliant reference attribute value. At least we'll try to do this.
The exception are situations where the object exists between instantiation and providing the data.- See Also:
-
Field Summary
Fields inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
defaultEquivalenceStrategyFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescription@NotNull ObjectReferenceTypeclone()Literal clone.cloneComplex(@NotNull CloneStrategy strategy) Complex clone with different cloning strategies.empty()static @NotNull ShadowReferenceAttributeValuefromReferencable(@NotNull Referencable referencable) static @NotNull ShadowReferenceAttributeValuefromRefValue(@NotNull PrismReferenceValue refVal) Converts (potentially raw)PrismReferenceValueto wrappedShadowReferenceAttributeValue.static @NotNull ShadowReferenceAttributeValuefromShadow(@NotNull AbstractShadow shadow) Creates a new value from the full or ID-only shadow.static @NotNull ShadowReferenceAttributeValuefromShadowOid(@NotNull String oid) @Nullable ResourceObjectDefinition@NotNull ShadowAttributesContainer@NotNull ShadowReferenceAttributeDefinition@NotNull ResourceObjectIdentification<?>@NotNull String@NotNull AbstractShadow@NotNull ShadowTypeTarget object or its reference.@Nullable AbstractShadow@NotNull AbstractShadow@NotNull PrismPropertyValue<?>getSingleIdentifierValueRequired(@NotNull QName attrName, Object errorCtx) @NotNull ResourceObjectDefinitionbooleanstatic @NotNull EqualsChecker<ShadowReferenceAttributeValue>Returns an equals checker that compares two reference attribute values, i.e., two shadows that they point to.voidsetShadow(@NotNull AbstractShadow shadow) voidShow the content of the object intended for diagnostics.toString()Methods inherited from class com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
accept, applyDefinition, applyDefinition, asReferencable, asReferencables, asReferenceValues, checkConsistenceInternal, containsOid, copyValues, createImmutableClone, debugDump, debugDump, debugDump, equals, equals, find, findPartial, findReferencedItem, getAllValues, getDefinition, getDescription, getFilter, getObject, getOid, getRealClass, getRealValue, getReferentialIntegrity, getRelation, getResolutionTime, getSchemaContext, getTargetName, getTargetType, getTargetTypeCompileTimeClass, hashCode, isEmpty, isRaw, recompute, relation, revive, setDescription, setFilter, setObject, setOid, setReferentialIntegrity, setRelation, setResolutionTime, setTargetName, setTargetName, setTargetType, setTargetType, toCanonical, transformDefinitionMethods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
accept, appendOriginDump, clearParent, copyValues, diff, diffMatchingRepresentation, diffMatchingRepresentation, equals, equals, getAllItems, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPathComponent, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataIfExists, hashCode, hashCode, hasValueMetadata, isTransient, normalize, performFreeze, recompute, representsSameValue, schemaLookup, setOriginObject, setOriginType, setParent, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadataMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadata
getOriginObject, getOriginType, setOriginObject, setOriginTypeMethods inherited from interface com.evolveum.midpoint.prism.PrismReferenceValue
acceptVisitor, determineTargetTypeName, getEffectiveResolutionTime, getObjectableMethods inherited from interface com.evolveum.midpoint.prism.PrismValue
accept, applyDefinition, applyDefinitionLegacy, applyDefinitionLegacy, clearParent, cloneIfImmutable, deleteValueMetadata, diff, equals, getAllItems, getNearestValueOfType, getParent, getParentContainerValue, getPath, getRealValueIfExists, getRealValueOrRawType, getRootObjectable, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, getValueMetadataIfExists, hashCode, hasRealClass, hasValueMetadata, isObjectable, isOfType, isTransient, normalize, recompute, representsSameValue, schemaLookup, setParent, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadataMethods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
Method Details
-
fromRefValue
@NotNull public static @NotNull ShadowReferenceAttributeValue fromRefValue(@NotNull @NotNull PrismReferenceValue refVal) throws SchemaException Converts (potentially raw)PrismReferenceValueto wrappedShadowReferenceAttributeValue. We should not use the original value any more, e.g. because of values being copied.- Throws:
SchemaException
-
fromReferencable
@NotNull public static @NotNull ShadowReferenceAttributeValue fromReferencable(@NotNull @NotNull Referencable referencable) throws SchemaException - Throws:
SchemaException
-
fromShadow
@NotNull public static @NotNull ShadowReferenceAttributeValue fromShadow(@NotNull @NotNull AbstractShadow shadow) throws SchemaException Creates a new value from the full or ID-only shadow. No cloning here.- Throws:
SchemaException
-
fromShadowOid
@NotNull public static @NotNull ShadowReferenceAttributeValue fromShadowOid(@NotNull @NotNull String oid) throws SchemaException - Throws:
SchemaException
-
semanticEqualsChecker
@NotNull public static @NotNull EqualsChecker<ShadowReferenceAttributeValue> semanticEqualsChecker()Returns an equals checker that compares two reference attribute values, i.e., two shadows that they point to. - We use OIDs for comparison, if available. - If not, we compare shadows by their content - in a relaxed way, seeShadowUtil.equalsByContent(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType, com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType). -
empty
-
clone
Description copied from interface:PrismValueLiteral clone.- Specified by:
clonein interfacePrismReferenceValue- Specified by:
clonein interfacePrismValue- Overrides:
clonein classcom.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
-
cloneComplex
Description copied from interface:PrismValueComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfacePrismReferenceValue- Specified by:
cloneComplexin interfacePrismValue- Overrides:
cloneComplexin classcom.evolveum.midpoint.prism.impl.PrismReferenceValueImpl- See Also:
-
getAttributesContainerRequired
-
getShadowBean
Target object or its reference. TODO better name. -
getShadow
-
getTargetObjectClassName
-
getDefinitionRequired
-
getIdentification
-
asObjectReferenceType
-
getShadowIfPresent
-
getShadowRequired
-
getAssociatedObjectDefinitionIfPresent
-
getTargetObjectDefinition
-
getAttributesContainerIfPresent
-
setShadow
-
matches
-
getSingleIdentifierValueRequired
@NotNull public @NotNull PrismPropertyValue<?> getSingleIdentifierValueRequired(@NotNull @NotNull QName attrName, Object errorCtx) throws SchemaException - Throws:
SchemaException
-
getOidRequired
-
toString
- Overrides:
toStringin classcom.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
-
shortDump
Description 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 interfaceShortDumpable- Overrides:
shortDumpin classcom.evolveum.midpoint.prism.impl.PrismReferenceValueImpl- Parameters:
sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
toHumanReadableString
- Specified by:
toHumanReadableStringin interfacePrismValue- Overrides:
toHumanReadableStringin classcom.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
-