Interface AbstractShadow
- All Superinterfaces:
Cloneable,DebugDumpable,Serializable,ShadowLikeValue,ShortDumpable
- All Known Implementing Classes:
AbstractShadow.Impl
Either a resource object, or a repository shadow (after being adopted by provisioning, i.e. with the definitions applied).
Conditions:
. the definition is known (
getObjectDefinition())
. the bean has the definitions applied
. the bean has attributes container (which can be empty)
See checkConsistence().-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe default implementation. -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptiondefault AbstractShadowaddSimpleAttribute(QName attributeName, Object realValue) default voidapplyDefinition(@NotNull ResourceObjectDefinition newDefinition) default voidapplyDelta(@NotNull ItemDelta<?, ?> itemDelta) default voiddefault voidThese checks are to be executed even in production (at least when creating the object).default voidTODO merge withcheckConsistence()clone()default PolyStringdefault booleandefault <X> @Nullable ShadowSimpleAttribute<X>findAttribute(@NotNull QName name) default voidfreeze()Temporary implementation.default @NotNull Collection<ShadowSimpleAttribute<?>>default @NotNull Collection<ShadowAssociation>default @NotNull ShadowAssociationsCollectiondefault @Nullable ShadowAssociationsContainerdefault @NotNull Collection<? extends ShadowAssociationValue>getAssociationValues(QName assocName) default <T> TgetAttributeRealValue(QName attrName) default <T> @NotNull List<T>getAttributeRealValues(QName attrName) default @NotNull Collection<ShadowAttribute<?,?, ?, ?>> default @NotNull ShadowAttributesContainerdefault @NotNull ShadowAttributesContainerDefinitionShould correspond togetObjectDefinition().default <X> @NotNull Collection<PrismPropertyValue<X>>getAttributeValues(@NotNull QName name) @NotNull ShadowTypegetBean()Returns theShadowTypebean backing this object.default @Nullable ShadowContentDescriptionTypedefault @NotNull ShadowContentDescriptionTypedefault @NotNull ObjectOperationPolicyTypedefault Objectdefault @Nullable ResourceObjectIdentification<?>default @NotNull ResourceObjectIdentification<?>default @Nullable ResourceObjectIdentifiersdefault @NotNull ResourceObjectIdentifiersdefault @Nullable ShadowKindTypegetKind()default PolyStringTypegetName()default @NotNull QNamedefault @NotNull QNamedefault @NotNull ResourceObjectDefinitionReturns the definition corresponding to this shadow.default @Nullable StringgetOid()default @NotNull Stringdefault @NotNull ShadowAssociationsContainerdefault <T> @Nullable ShadowSimpleAttribute<T>default <T> @NotNull ShadowSimpleAttribute<T>default @Nullable Objectdefault @NotNull PrismObject<ShadowType>default @Nullable ObjectReferenceTypegetRef()Currently, returns "plain" reference (only type + OID).default @Nullable ShadowReferenceAttributegetReferenceAttribute(QName attrName) default @NotNull Collection<ShadowReferenceAttribute>Returns a detached, immutable list.default @NotNull ShadowReferenceAttributesCollectiondefault @Nullable ShadowReferenceAttributeValuegetReferenceAttributeSingleValue(QName attrName) default @NotNull Collection<ShadowReferenceAttributeValue>getReferenceAttributeValues(QName attrName) default @NotNull ObjectReferenceTypedefault @Nullable Stringdefault @NotNull Stringdefault <T> @Nullable ShadowSimpleAttribute<T>getSimpleAttribute(QName attrName) default <T> @NotNull ShadowSimpleAttribute<T>getSimpleAttributeRequired(QName attrName) default @NotNull Collection<ShadowSimpleAttribute<?>>default ResourceObjectTypeIdentificationdefault booleanhasAuxiliaryObjectClass(@NotNull QName name) default booleandefault booleandefault booleanisDead()default booleanisError()True if the shadow could not be correctly fetched from the resource.default booleandefault booleandefault booleanstatic AbstractShadowof(@NotNull PrismObject<ShadowType> prismObject) static AbstractShadowof(@NotNull ShadowType bean) default voiddefault voidsetObjectType(@Nullable ResourceObjectTypeIdentification typeIdentification) default voidShow the content of the object intended for diagnostics.default voidupdateWith(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) Updates the in-memory representation.@NotNull AbstractShadowwithNewContent(@NotNull ShadowType newBean) Replaces the in-memory representation with the new content but the same definition.Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
Method Details
-
of
-
of
-
getBean
Returns theShadowTypebean backing this object. It should meet the criteria for individual subtypes. -
getOid
-
getOidRequired
-
getRef
Currently, returns "plain" reference (only type + OID). This may change in the future. Returns null if there's no OID. -
getRefWithEmbeddedObject
-
getObjectDefinition
Returns the definition corresponding to this shadow. -
getPrismObject
-
isDead
default boolean isDead() -
doesExist
default boolean doesExist() -
isImmutable
default boolean isImmutable() -
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- Parameters:
sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
getIdentifiers
- Throws:
SchemaException
-
getAllIdentifiers
-
hasPrimaryIdentifier
- Throws:
SchemaException
-
getIdentifiersRequired
- Throws:
SchemaException
-
getIdentificationRequired
@NotNull default @NotNull ResourceObjectIdentification<?> getIdentificationRequired() throws SchemaException- Throws:
SchemaException
-
getPrimaryIdentifierAttribute
-
getPrimaryIdentifierAttributeRequired
-
getPrimaryIdentification
@Nullable default ResourceObjectIdentification.WithPrimary getPrimaryIdentification() throws SchemaException- Throws:
SchemaException
-
getPrimaryIdentifierValueFromAttributes
- Throws:
SchemaException
-
getIdentification
@Nullable default @Nullable ResourceObjectIdentification<?> getIdentification() throws SchemaException- Throws:
SchemaException
-
updateWith
default void updateWith(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> modifications) throws SchemaExceptionUpdates the in-memory representation.- Throws:
SchemaException
-
withNewContent
Replaces the in-memory representation with the new content but the same definition. Returns a new instance. -
getResourceOidRequired
-
getResourceOid
-
getObjectClassName
- Throws:
SchemaException
-
determineShadowName
- Throws:
SchemaException
-
getAttributesContainer
-
getAttributes
-
getSimpleAttributes
-
getAssociations
-
getAttributesContainerDefinition
Should correspond togetObjectDefinition(). -
findAttribute
@Nullable default <X> @Nullable ShadowSimpleAttribute<X> findAttribute(@NotNull @NotNull QName name) -
getAttributeValues
@NotNull default <X> @NotNull Collection<PrismPropertyValue<X>> getAttributeValues(@NotNull @NotNull QName name) -
hasAuxiliaryObjectClass
-
checkConsistence
default void checkConsistence()These checks are to be executed even in production (at least when creating the object). -
checkConsistenceComplex
TODO merge withcheckConsistence() -
checkAttributeDefinitions
default void checkAttributeDefinitions() -
clone
AbstractShadow clone() -
applyDefinition
default void applyDefinition(@NotNull @NotNull ResourceObjectDefinition newDefinition) throws SchemaException - Throws:
SchemaException
-
getName
-
getAttributeRealValues
-
getAttributeRealValue
-
getSimpleAttribute
-
getReferenceAttribute
-
getReferenceAttributeSingleValue
@Nullable default @Nullable ShadowReferenceAttributeValue getReferenceAttributeSingleValue(QName attrName) -
getReferenceAttributeValues
@NotNull default @NotNull Collection<ShadowReferenceAttributeValue> getReferenceAttributeValues(QName attrName) -
getSimpleAttributeRequired
-
getAssociationsContainer
-
getOrCreateAssociationsContainer
-
getReferenceAttributes
Returns a detached, immutable list. -
getReferenceAttributesCollection
-
getKind
-
getObjectClass
-
isClassified
default boolean isClassified() -
isProtectedObject
default boolean isProtectedObject() -
applyDelta
- Throws:
SchemaException
-
getHumanReadableNameLazily
-
getAssociationValues
@NotNull default @NotNull Collection<? extends ShadowAssociationValue> getAssociationValues(QName assocName) -
getAssociationsCollection
-
getTypeIdentification
-
setObjectType
-
getContentDescriptionRequired
-
getContentDescription
-
getEffectiveOperationPolicyRequired
-
addSimpleAttribute
default AbstractShadow addSimpleAttribute(QName attributeName, Object realValue) throws SchemaException - Throws:
SchemaException
-
isIdentificationOnly
default boolean isIdentificationOnly() -
setIdentificationOnly
default void setIdentificationOnly() -
isError
default boolean isError()True if the shadow could not be correctly fetched from the resource. Beware, maintenance mode signalsOperationResultStatusType.PARTIAL_ERRORhere. TODO is it good that this method is overridden in the subclass? -
freeze
default void freeze()Temporary implementation.
-