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
Modifier and TypeInterfaceDescriptionstatic class
The default implementation. -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptiondefault AbstractShadow
addSimpleAttribute
(QName attributeName, Object realValue) default void
applyDefinition
(@NotNull ResourceObjectDefinition newDefinition) default void
applyDelta
(@NotNull ItemDelta<?, ?> itemDelta) default void
default void
These checks are to be executed even in production (at least when creating the object).default void
TODO merge withcheckConsistence()
clone()
default PolyString
default boolean
default <X> @Nullable ShadowSimpleAttribute<X>
findAttribute
(@NotNull QName name) default @NotNull Collection<ShadowSimpleAttribute<?>>
default @NotNull Collection<ShadowAssociation>
default @NotNull ShadowAssociationsCollection
default @Nullable ShadowAssociationsContainer
default @NotNull Collection<? extends ShadowAssociationValue>
getAssociationValues
(QName assocName) default <T> T
getAttributeRealValue
(QName attrName) default <T> @NotNull List<T>
getAttributeRealValues
(QName attrName) default @NotNull Collection<ShadowAttribute<?,
?, ?, ?>> default @NotNull ShadowAttributesContainer
default @NotNull ShadowAttributesContainerDefinition
Should correspond togetObjectDefinition()
.default <X> @NotNull Collection<PrismPropertyValue<X>>
getAttributeValues
(@NotNull QName name) @NotNull ShadowType
getBean()
Returns theShadowType
bean backing this object.default @Nullable ShadowContentDescriptionType
default @NotNull ShadowContentDescriptionType
default @NotNull ObjectOperationPolicyType
default Object
default @Nullable ResourceObjectIdentification<?>
default @NotNull ResourceObjectIdentification<?>
default @Nullable ResourceObjectIdentifiers
default @NotNull ResourceObjectIdentifiers
default @Nullable ShadowKindType
getKind()
default PolyStringType
getName()
default @NotNull QName
default @NotNull QName
default @NotNull ResourceObjectDefinition
Returns the definition corresponding to this shadow.default @Nullable String
getOid()
default @NotNull String
default @NotNull ShadowAssociationsContainer
default <T> @Nullable ShadowSimpleAttribute<T>
default <T> @NotNull ShadowSimpleAttribute<T>
default @Nullable Object
default @NotNull PrismObject<ShadowType>
default @Nullable ObjectReferenceType
getRef()
Currently, returns "plain" reference (only type + OID).default @Nullable ShadowReferenceAttribute
getReferenceAttribute
(QName attrName) default @NotNull Collection<ShadowReferenceAttribute>
Returns a detached, immutable list.default @NotNull ShadowReferenceAttributesCollection
default @Nullable ShadowReferenceAttributeValue
getReferenceAttributeSingleValue
(QName attrName) default @NotNull Collection<ShadowReferenceAttributeValue>
getReferenceAttributeValues
(QName attrName) default @NotNull ObjectReferenceType
default @Nullable String
default @NotNull String
default <T> @Nullable ShadowSimpleAttribute<T>
getSimpleAttribute
(QName attrName) default <T> @NotNull ShadowSimpleAttribute<T>
getSimpleAttributeRequired
(QName attrName) default @NotNull Collection<ShadowSimpleAttribute<?>>
default ResourceObjectTypeIdentification
default boolean
hasAuxiliaryObjectClass
(@NotNull QName name) default boolean
default boolean
default boolean
isDead()
default boolean
isError()
True if the shadow could not be correctly fetched from the resource.default boolean
default boolean
default boolean
static AbstractShadow
of
(@NotNull PrismObject<ShadowType> prismObject) static AbstractShadow
of
(@NotNull ShadowType bean) default void
default void
setObjectType
(@Nullable ResourceObjectTypeIdentification typeIdentification) default void
Show the content of the object intended for diagnostics.default void
updateWith
(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) Updates the in-memory representation.@NotNull AbstractShadow
withNewContent
(@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, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
Method Details
-
of
-
of
-
getBean
Returns theShadowType
bean 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:ShortDumpable
Show 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:
shortDump
in 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_ERROR
here. TODO is it good that this method is overridden in the subclass?
-