Interface AbstractShadow
- All Superinterfaces:
Cloneable
,DebugDumpable
,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 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<ShadowReferenceAttribute>
Similar togetAssociationsContainer()
but never returns `null`.default @NotNull ShadowAssociationsCollection
default @Nullable ShadowAssociationsContainer
default @NotNull Collection<? extends ShadowAssociationValue>
getAssociationValues
(QName assocName) default <T> @Nullable ShadowSimpleAttribute<T>
getAttribute
(QName attrName) default <T> @NotNull List<T>
getAttributeRealValues
(QName attrName) default <T> @NotNull ShadowSimpleAttribute<T>
getAttributeRequired
(QName attrName) default @NotNull Collection<ShadowSimpleAttribute<?>>
default @NotNull ShadowAttributesContainer
default @NotNull ResourceAttributeContainerDefinition
Should correspond togetObjectDefinition()
.default <T> T
getAttributeValue
(QName attrName) default <X> @NotNull Collection<PrismPropertyValue<X>>
getAttributeValues
(@NotNull QName name) @NotNull ShadowType
getBean()
Returns theShadowType
bean backing this object.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 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 @NotNull ObjectReferenceType
default @Nullable String
default @NotNull String
default boolean
default boolean
default boolean
isDead()
default boolean
default boolean
static AbstractShadow
of
(@NotNull PrismObject<ShadowType> prismObject) static AbstractShadow
of
(@NotNull ShadowType bean) 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
-
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
-
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) -
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
-
getAttributeValue
-
getAttribute
-
getAttributeRequired
-
getAssociationsContainer
-
getOrCreateAssociationsContainer
-
getAssociations
Similar togetAssociationsContainer()
but never returns `null`.- See Also:
-
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
-