Class ShadowUtil
java.lang.Object
com.evolveum.midpoint.schema.util.ShadowUtil
Methods that would belong to the
ShadowType
class but cannot go there because of JAXB.- Author:
- Radovan Semancik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAssociation
(ShadowType shadow, ShadowReferenceAttribute association) static void
addAttribute
(ShadowType shadow, ShadowAttribute<?, ?, ?, ?> attribute) static void
addPrimaryIdentifierValue
(ShadowType shadow, Object primaryIdentifierValue) Adds primary identifier value to the shadow.static PrismObjectDefinition<ShadowType>
applyObjectDefinition
(PrismObjectDefinition<ShadowType> shadowDefinition, ResourceObjectDefinition objectClassDefinition) static void
applyResourceSchema
(PrismObject<? extends ShadowType> shadow, ResourceSchema resourceSchema) This is not supposed to be used in production code!static <T> T
castShadowContainer
(@NotNull PrismContainerValue<?> parent, QName containerName, Class<T> expectedClass) static void
checkConsistence
(PrismObject<? extends ShadowType> shadow, String desc) static void
checkConsistency
(PrismContainerDefinition<ShadowAttributesType> attributesDefinition, String desc) static PolyString
determineShadowName
(PrismObject<ShadowType> shadow) static PolyString
determineShadowName
(ShadowType shadow) static PolyStringType
static boolean
equalsByContent
(@NotNull ShadowType s1, @NotNull ShadowType s2) Compares the shadows on a high level, with the aim of determining if two target shadows are the same.static @NotNull ItemCachedStatus
getActivationCachedStatus
(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static @NotNull Collection<? extends ShadowAssociationValue>
getAdoptedAssociationValues
(@NotNull PrismObject<ShadowType> shadow, QName assocName) TODO better name ... the idea is that the shadow has the correct definition, but currently we cannot use AbstractShadow, because there are some differences in definitions ... to be researched.static @NotNull Collection<ShadowSimpleAttribute<?>>
getAllIdentifiers
(PrismObject<? extends ShadowType> shadow) static @NotNull Collection<ShadowSimpleAttribute<?>>
getAllIdentifiers
(ShadowType shadow) static ShadowAssociation
getAssociation
(PrismObject<ShadowType> shadow, QName associationName) static ShadowAssociation
getAssociation
(ShadowType shadow, QName associationName) static @NotNull Collection<ShadowAssociation>
getAssociations
(@NotNull PrismObject<ShadowType> shadow) static @NotNull Collection<ShadowAssociation>
getAssociations
(@NotNull ShadowType shadow) TODOstatic @NotNull ShadowAssociationsCollection
getAssociationsCollection
(@NotNull ShadowType shadowBean) static ShadowAssociationsContainer
getAssociationsContainer
(@NotNull PrismObject<ShadowType> shadow) Similar togetAttributesContainer(ShadowType)
.static @Nullable ShadowAssociationsContainer
getAssociationsContainer
(@NotNull ShadowType shadow) Similar togetAttributesContainer(ShadowType)
.static ShadowAssociationsContainer
getAssociationsContainerRequired
(@NotNull ShadowType shadow) static @NotNull Collection<? extends ShadowAssociationValue>
getAssociationValues
(@NotNull PrismObject<ShadowType> shadow, QName assocName) Returns the values of given association.static @NotNull Collection<ShadowAssociationValueType>
getAssociationValuesRaw
(@NotNull PrismObject<ShadowType> shadow, QName assocName) Returns the values of given association.static ItemName
getAttributeName
(ItemPath attributePath, String message) static @NotNull Collection<ShadowAttribute<?,
?, ?, ?>> getAttributes
(PrismObject<? extends ShadowType> shadow) static @NotNull Collection<ShadowAttribute<?,
?, ?, ?>> getAttributes
(ShadowType shadowType) static @Nullable ShadowAttributesContainer
getAttributesContainer
(PrismObject<? extends ShadowType> shadow) static ShadowAttributesContainer
getAttributesContainer
(ShadowType shadowType) static @NotNull ShadowAttributesContainer
static @NotNull ShadowAttributesContainer
static @NotNull Collection<Item<?,
?>> getAttributesRaw
(@NotNull ShadowType shadow) Here we assume that the definition may not be applied yet.static @NotNull Collection<? extends Item<?,
?>> getAttributesTolerant
(ShadowType shadowType) static <T> T
getAttributeValue
(PrismObject<? extends ShadowType> shadow, QName attrName) static <T> T
getAttributeValue
(ShadowType shadowType, QName attrName) static <T> @NotNull List<T>
getAttributeValues
(PrismObject<? extends ShadowType> shadow, QName attrName) static <T> List<T>
getAttributeValues
(ShadowType shadowType, QName attrName) static <T> Collection<T>
getAttributeValues
(ShadowType shadow, QName attributeQname, Class<T> type) static Collection<QName>
getCachedAttributesNames
(@Nullable PrismObject<ShadowType> shadow, @NotNull CompositeObjectDefinition definition, @NotNull XMLGregorianCalendar now) static ShadowCorrelationStateType
getCorrelationStateRequired
(@NotNull ShadowType shadow) static <T extends AbstractCorrelatorStateType>
TgetCorrelatorStateRequired
(@NotNull ShadowType shadow, Class<T> clazz) static String
getDiagInfo
(PrismObject<ShadowType> shadow) static Object
getDiagInfoLazily
(PrismObject<ShadowType> shadow) static String
getHumanReadableName
(PrismObject<? extends ShadowType> shadow) static String
getHumanReadableName
(ShadowType shadowType) static Object
getHumanReadableNameLazily
(PrismObject<? extends ShadowType> shadow) static String
getIntent
(PrismObject<ShadowType> shadow) static String
getIntent
(ShadowType shadow) Returns intent from the shadow.static ShadowKindType
getKind
(PrismObject<ShadowType> shadow) static ShadowKindType
getKind
(ShadowType shadow) static XMLGregorianCalendar
getLastLoginTimestampValue
(ShadowType shadow) static @Nullable SynchronizationSituationDescriptionType
getLastSyncSituationDescription
(@NotNull ShadowType shadow) static ShadowSimpleAttribute<String>
getNamingAttribute
(PrismObject<? extends ShadowType> shadow) static ShadowSimpleAttribute<String>
getNamingAttribute
(ShadowType shadow) static @NotNull com.google.common.collect.ImmutableList<ItemDelta<?,
?>> getNonResourceModifications
(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static @NotNull ResourceObjectClassDefinition
getObjectClassDefinition
(@NotNull ShadowType shadow) static @NotNull QName
getObjectClassRequired
(@NotNull ShadowType shadow) static ActivationType
getOrCreateActivation
(ShadowType shadowType) static ShadowAssociationsContainer
Assuming the shadow has the correct definition.static ShadowAttributesContainer
getOrCreateAttributesContainer
(PrismObject<? extends ShadowType> shadow, ResourceObjectDefinition definition) static @NotNull ShadowAttributesContainer
static @NotNull ShadowAttributesContainer
Assuming the shadow has the correct definition.static ShadowAttributesContainer
getOrCreateAttributesContainer
(ShadowType shadow, ResourceObjectDefinition definition) static ShadowBehaviorType
getOrCreateShadowBehavior
(ShadowType shadowType) static @NotNull PasswordType
getOrCreateShadowPassword
(ShadowType shadow) static ProtectedStringType
getPasswordValue
(ShadowType shadowType) static @Nullable PrismProperty<ProtectedStringType>
getPasswordValueProperty
(@Nullable ShadowType shadow) static ResourceObjectIdentifier.Primary<?>
getPrimaryIdentifier
(@NotNull ShadowType shadow) The shadow must have definitions applied.static Collection<ShadowSimpleAttribute<?>>
getPrimaryIdentifiers
(PrismObject<? extends ShadowType> shadow) static Collection<ShadowSimpleAttribute<?>>
getPrimaryIdentifiers
(ShadowType shadowType) static @Nullable Object
getPrimaryIdentifierValue
(@NotNull ShadowType shadow, @NotNull ResourceObjectDefinition objectDefinition) static ShadowReferenceAttribute
getReferenceAttribute
(PrismObject<? extends ShadowType> shadow, QName attrName) static @NotNull Collection<ShadowReferenceAttribute>
getReferenceAttributes
(@NotNull PrismObject<ShadowType> shadow) static @NotNull Collection<ShadowReferenceAttribute>
getReferenceAttributes
(@NotNull ShadowType shadow) Returns a detached, immutable list.static @NotNull ShadowReferenceAttributesCollection
getReferenceAttributesCollection
(@NotNull ShadowType shadowBean) getResourceModifications
(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static PolyString
getResourceName
(PrismObject<ShadowType> shadow) static PolyString
getResourceName
(ShadowType shadowType) static @NotNull ResourceObjectDefinition
getResourceObjectDefinition
(@NotNull PrismObject<ShadowType> shadow) static @NotNull ResourceObjectDefinition
getResourceObjectDefinition
(@NotNull ShadowType shadow) The definition is derived either from attributes container or from the prism definition (must not be raw).static String
getResourceOid
(PrismObject<ShadowType> shadow) static String
getResourceOid
(ShadowType shadowType) static @NotNull String
getResourceOidRequired
(@NotNull ShadowType shadow) static Collection<ShadowSimpleAttribute<?>>
getSecondaryIdentifiers
(PrismObject<? extends ShadowType> shadow) static Collection<ShadowSimpleAttribute<?>>
getSecondaryIdentifiers
(ShadowType shadowType) static ItemCachedStatus
getShadowCachedStatus
(@NotNull PrismObject<ShadowType> shadow, @NotNull XMLGregorianCalendar now) Assuming that the shadow was obtained from the repository (cache), and has the correct definition, this method tells the client if the cached data can be considered fresh enough regarding the caching TTL.static @NotNull ItemCachedStatus
getShadowCachedStatus
(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @Nullable ShadowContentDescriptionType contentDescriptionOverride, @NotNull XMLGregorianCalendar now) The shadow can be raw here.static <T> ShadowSimpleAttribute<T>
getSimpleAttribute
(PrismObject<? extends ShadowType> shadow, QName attrName) static <T> ShadowSimpleAttribute<T>
getSimpleAttribute
(ShadowType shadow, QName attrName) static @NotNull Collection<ShadowSimpleAttribute<?>>
getSimpleAttributes
(PrismObject<? extends ShadowType> shadow) static @NotNull Collection<ShadowSimpleAttribute<?>>
getSimpleAttributes
(ShadowType shadowType) static String
getSingleStringAttributeValue
(ShadowType shadow, QName attrName) static <T> @Nullable PrismPropertyValue<T>
getSingleValue
(ShadowType shadow, QName attrName, Object errorCtx) static <T> @NotNull PrismPropertyValue<T>
getSingleValueRequired
(ShadowType shadow, QName attrName, Object errorCtx) getTypeIdentification
(ShadowType shadow) static boolean
hasAttributeModifications
(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static boolean
hasResourceModifications
(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static @NotNull ItemCachedStatus
isAssociationLoaded
(@NotNull ItemName assocName, @Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static @NotNull ItemCachedStatus
isAttributeLoaded
(@NotNull ItemName attrName, @Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @Nullable ShadowAttributeDefinition<?, ?, ?, ?> attrDefOverride, @NotNull XMLGregorianCalendar now) static boolean
isAttributeModification
(QName firstPathName) static @NotNull ItemCachedStatus
isAuxiliaryObjectClassPropertyLoaded
(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static boolean
isClassified
(ShadowKindType kind, String intent) static boolean
isClassified
(ShadowType shadow) static boolean
isConflicting
(ShadowType shadow1, ShadowType shadow2) static boolean
isDead
(@NotNull PrismObject<ShadowType> shadow) static boolean
isDead
(ObjectReferenceType projectionRef) static boolean
isDead
(ShadowType shadow) static boolean
isExists
(PrismObject<ShadowType> shadow) static boolean
isExists
(ShadowType shadow) static boolean
isGone
(@NotNull ShadowType shadow) Returns true if the shadow state indicates that it is 'gone', i.e. no longer on the resource.static boolean
isGoneApproximate
(@NotNull ShadowType shadow) AsisGone(ShadowType)
but with possibly incomplete information.static boolean
isKnown
(ShadowKindType kind) static boolean
static boolean
isNonAttributeResourceModification
(QName firstPathName) static boolean
isNotDead
(PrismObject<ShadowType> shadow) static boolean
isNotDead
(ObjectReferenceType projectionRef) static boolean
isNotDead
(ShadowType shadow) static boolean
isNotKnown
(ShadowKindType kind) static boolean
isNotKnown
(String intent) static @NotNull ItemCachedStatus
isPasswordValueLoaded
(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static boolean
isProtected
(@Nullable ShadowType shadow) static boolean
isProtected
(PrismObject<? extends ShadowType> shadow) static boolean
isRaw
(@NotNull ShadowType shadowBean) static boolean
isResourceModification
(ItemDelta<?, ?> modification) static boolean
matches
(@NotNull ShadowType shadow, @NotNull ShadowDiscriminatorType discriminator) static boolean
matches
(@NotNull ShadowType shadow, @Nullable String resourceOid, @Nullable ShadowKindType kind, @Nullable String intent) Null values mean "any" here.static boolean
matchesAttribute
(ItemPath path, QName attributeName) static boolean
matchesPattern
(ShadowType shadowType, ShadowDiscriminatorType discr) InterpretsShadowDiscriminatorType
as a pattern.static void
removePasswordValueProperty
(@NotNull PasswordType password) static @NotNull ShadowKindType
resolveDefault
(ShadowKindType kind) static @NotNull String
resolveDefault
(String intent) static void
setCorrelatorState
(@NotNull ShadowType shadow, @Nullable AbstractCorrelatorStateType state) static void
setPassword
(ShadowType shadow, ProtectedStringType passwordValue) static void
setPasswordIncomplete
(@NotNull PasswordType password) Does not touch the actual password value.static void
setPasswordIncomplete
(ShadowType shadow) Does not touch the actual password value.static @NotNull ShadowAttributesContainer
setupAttributesContainer
(@NotNull ShadowType shadowBean, @NotNull ResourceObjectDefinition objectDefinition) Creates the resource attributes container with a proper definition.static String
shortDumpShadow
(PrismObject<ShadowType> shadow) static String
shortDumpShadow
(ShadowType shadow) static Object
shortDumpShadowLazily
(PrismObject<ShadowType> shadow) static Object
shortDumpShadowLazily
(ShadowType shadow) static boolean
simpleAttributesEqualRelaxed
(@NotNull Collection<ShadowSimpleAttribute<?>> attributes1, @NotNull Collection<ShadowSimpleAttribute<?>> attributes2) Compares two simple attributes, taking into account the fact that `icfs:uid` and `icfs:name` can be added by the connector.static List<PendingOperationType>
sortPendingOperations
(List<PendingOperationType> pendingOperations) static void
validateAttributeSchema
(ShadowType shadow, ResourceObjectDefinition objectDefinition) static boolean
wasSynchronizedAfterDeath
(ShadowType shadow)
-
Constructor Details
-
ShadowUtil
public ShadowUtil()
-
-
Method Details
-
getPrimaryIdentifiers
-
getPrimaryIdentifiers
public static Collection<ShadowSimpleAttribute<?>> getPrimaryIdentifiers(PrismObject<? extends ShadowType> shadow) -
getSecondaryIdentifiers
-
getSecondaryIdentifiers
public static Collection<ShadowSimpleAttribute<?>> getSecondaryIdentifiers(PrismObject<? extends ShadowType> shadow) -
getAllIdentifiers
@NotNull public static @NotNull Collection<ShadowSimpleAttribute<?>> getAllIdentifiers(PrismObject<? extends ShadowType> shadow) -
getAllIdentifiers
@NotNull public static @NotNull Collection<ShadowSimpleAttribute<?>> getAllIdentifiers(ShadowType shadow) -
getNamingAttribute
-
getNamingAttribute
public static ShadowSimpleAttribute<String> getNamingAttribute(PrismObject<? extends ShadowType> shadow) -
getSimpleAttributes
@NotNull public static @NotNull Collection<ShadowSimpleAttribute<?>> getSimpleAttributes(ShadowType shadowType) -
getAttributes
@NotNull public static @NotNull Collection<ShadowAttribute<?,?, getAttributes?, ?>> (ShadowType shadowType) -
getAttributesTolerant
@NotNull public static @NotNull Collection<? extends Item<?,?>> getAttributesTolerant(ShadowType shadowType) -
getSimpleAttributes
@NotNull public static @NotNull Collection<ShadowSimpleAttribute<?>> getSimpleAttributes(PrismObject<? extends ShadowType> shadow) -
getAttributes
@NotNull public static @NotNull Collection<ShadowAttribute<?,?, getAttributes?, ?>> (PrismObject<? extends ShadowType> shadow) -
getAttributesRaw
@NotNull public static @NotNull Collection<Item<?,?>> getAttributesRaw(@NotNull @NotNull ShadowType shadow) Here we assume that the definition may not be applied yet. -
getSimpleAttribute
-
getSimpleAttribute
public static <T> ShadowSimpleAttribute<T> getSimpleAttribute(PrismObject<? extends ShadowType> shadow, QName attrName) -
getReferenceAttribute
public static ShadowReferenceAttribute getReferenceAttribute(PrismObject<? extends ShadowType> shadow, QName attrName) -
getAttributesContainer
-
getAttributesContainerRequired
@NotNull public static @NotNull ShadowAttributesContainer getAttributesContainerRequired(ShadowType shadow) -
getAttributesContainerRequired
@NotNull public static @NotNull ShadowAttributesContainer getAttributesContainerRequired(PrismObject<ShadowType> shadow) -
getAttributesContainer
@Nullable public static @Nullable ShadowAttributesContainer getAttributesContainer(PrismObject<? extends ShadowType> shadow) -
getAssociationsContainer
@Nullable public static @Nullable ShadowAssociationsContainer getAssociationsContainer(@NotNull @NotNull ShadowType shadow) Similar togetAttributesContainer(ShadowType)
. -
getAssociationsContainerRequired
public static ShadowAssociationsContainer getAssociationsContainerRequired(@NotNull @NotNull ShadowType shadow) -
getOrCreateAssociationsContainer
Assuming the shadow has the correct definition. -
getAssociationsContainer
public static ShadowAssociationsContainer getAssociationsContainer(@NotNull @NotNull PrismObject<ShadowType> shadow) Similar togetAttributesContainer(ShadowType)
. -
castShadowContainer
public static <T> T castShadowContainer(@NotNull @NotNull PrismContainerValue<?> parent, QName containerName, Class<T> expectedClass) -
getOrCreateAttributesContainer
@NotNull public static @NotNull ShadowAttributesContainer getOrCreateAttributesContainer(ShadowType shadow) Assuming the shadow has the correct definition. -
getOrCreateAttributesContainer
@NotNull public static @NotNull ShadowAttributesContainer getOrCreateAttributesContainer(PrismObject<ShadowType> shadow) -
getOrCreateAttributesContainer
public static ShadowAttributesContainer getOrCreateAttributesContainer(ShadowType shadow, ResourceObjectDefinition definition) -
getOrCreateAttributesContainer
public static ShadowAttributesContainer getOrCreateAttributesContainer(PrismObject<? extends ShadowType> shadow, ResourceObjectDefinition definition) -
getObjectClassDefinition
@NotNull public static @NotNull ResourceObjectClassDefinition getObjectClassDefinition(@NotNull @NotNull ShadowType shadow) -
getResourceObjectDefinition
@NotNull public static @NotNull ResourceObjectDefinition getResourceObjectDefinition(@NotNull @NotNull ShadowType shadow) The definition is derived either from attributes container or from the prism definition (must not be raw). -
getResourceObjectDefinition
@NotNull public static @NotNull ResourceObjectDefinition getResourceObjectDefinition(@NotNull @NotNull PrismObject<ShadowType> shadow) -
getResourceOid
-
getResourceOidRequired
-
getResourceOid
-
getResourceName
-
getResourceName
-
getSingleStringAttributeValue
-
getSingleValueRequired
@NotNull public static <T> @NotNull PrismPropertyValue<T> getSingleValueRequired(ShadowType shadow, QName attrName, Object errorCtx) throws SchemaException - Throws:
SchemaException
-
getSingleValue
@Nullable public static <T> @Nullable PrismPropertyValue<T> getSingleValue(ShadowType shadow, QName attrName, Object errorCtx) throws SchemaException - Throws:
SchemaException
-
getAttributeValues
-
getAttributeValues
@NotNull public static <T> @NotNull List<T> getAttributeValues(PrismObject<? extends ShadowType> shadow, QName attrName) -
getAttributeValue
- Throws:
SchemaException
-
getAttributeValue
public static <T> T getAttributeValue(PrismObject<? extends ShadowType> shadow, QName attrName) throws SchemaException - Throws:
SchemaException
-
setPassword
-
setPasswordIncomplete
Does not touch the actual password value. The client must ensure there is none.- Throws:
SchemaException
-
setPasswordIncomplete
public static void setPasswordIncomplete(@NotNull @NotNull PasswordType password) throws SchemaException Does not touch the actual password value. The client must ensure there is none.- Throws:
SchemaException
-
removePasswordValueProperty
-
getOrCreateShadowPassword
-
getOrCreateActivation
-
getOrCreateShadowBehavior
-
applyResourceSchema
@VisibleForTesting public static void applyResourceSchema(PrismObject<? extends ShadowType> shadow, ResourceSchema resourceSchema) throws SchemaException This is not supposed to be used in production code! It is just for the tests.- Throws:
SchemaException
-
applyObjectDefinition
public static PrismObjectDefinition<ShadowType> applyObjectDefinition(PrismObjectDefinition<ShadowType> shadowDefinition, ResourceObjectDefinition objectClassDefinition) throws SchemaException - Throws:
SchemaException
-
getIntent
-
getIntent
Returns intent from the shadow. Backwards compatible with older accountType. May also adjust for default intent if necessary. -
getKind
-
getKind
-
getAttributeValues
public static <T> Collection<T> getAttributeValues(ShadowType shadow, QName attributeQname, Class<T> type) -
getAttributeName
public static ItemName getAttributeName(ItemPath attributePath, String message) throws SchemaException - Throws:
SchemaException
-
checkConsistence
-
checkConsistency
public static void checkConsistency(PrismContainerDefinition<ShadowAttributesType> attributesDefinition, String desc) -
isProtected
-
isProtected
-
isDead
-
isDead
-
isNotDead
-
isNotDead
-
isDead
-
isNotDead
-
wasSynchronizedAfterDeath
-
isExists
-
isExists
-
matches
public static boolean matches(@NotNull @NotNull ShadowType shadow, @Nullable @Nullable String resourceOid, @Nullable @Nullable ShadowKindType kind, @Nullable @Nullable String intent) Null values mean "any" here. -
matches
public static boolean matches(@NotNull @NotNull ShadowType shadow, @NotNull @NotNull ShadowDiscriminatorType discriminator) -
matchesPattern
InterpretsShadowDiscriminatorType
as a pattern. E.g. null discriminator kind is interpreted to match any shadow kind. -
isConflicting
-
getHumanReadableNameLazily
-
getHumanReadableName
-
getHumanReadableName
-
determineShadowName
- Throws:
SchemaException
-
determineShadowName
- Throws:
SchemaException
-
determineShadowNameRequired
public static PolyStringType determineShadowNameRequired(AbstractShadow shadow) throws SchemaException - Throws:
SchemaException
-
matchesAttribute
-
getPrimaryIdentifier
@Nullable public static ResourceObjectIdentifier.Primary<?> getPrimaryIdentifier(@NotNull @NotNull ShadowType shadow) throws SchemaException The shadow must have definitions applied.- Throws:
SchemaException
-
getPrimaryIdentifierValue
@Nullable public static @Nullable Object getPrimaryIdentifierValue(@NotNull @NotNull ShadowType shadow, @NotNull @NotNull ResourceObjectDefinition objectDefinition) throws SchemaException - Throws:
SchemaException
-
validateAttributeSchema
public static void validateAttributeSchema(ShadowType shadow, ResourceObjectDefinition objectDefinition) throws SchemaException - Throws:
SchemaException
-
getPasswordValueProperty
@Nullable public static @Nullable PrismProperty<ProtectedStringType> getPasswordValueProperty(@Nullable @Nullable ShadowType shadow) -
getPasswordValue
-
getLastLoginTimestampValue
-
shortDumpShadowLazily
-
shortDumpShadowLazily
-
shortDumpShadow
-
shortDumpShadow
-
isKnown
-
isNotKnown
-
isKnown
-
isNotKnown
-
isClassified
-
isClassified
-
getTypeIdentification
@Contract("null -> null") public static ResourceObjectTypeIdentification getTypeIdentification(ShadowType shadow) -
isGone
Returns true if the shadow state indicates that it is 'gone', i.e. no longer on the resource. This could be determined from the `dead` property or from the `shadowLifecycleState`. The latter is more precise for shadows that have been fetched with the future point-in-time. PRECONDITION: shadow lifecycle state must be set up. -
isGoneApproximate
AsisGone(ShadowType)
but with possibly incomplete information. -
getCorrelationStateRequired
public static ShadowCorrelationStateType getCorrelationStateRequired(@NotNull @NotNull ShadowType shadow) -
getCorrelatorStateRequired
public static <T extends AbstractCorrelatorStateType> T getCorrelatorStateRequired(@NotNull @NotNull ShadowType shadow, Class<T> clazz) throws SchemaException - Throws:
SchemaException
-
setCorrelatorState
public static void setCorrelatorState(@NotNull @NotNull ShadowType shadow, @Nullable @Nullable AbstractCorrelatorStateType state) -
getObjectClassRequired
@NotNull public static @NotNull QName getObjectClassRequired(@NotNull @NotNull ShadowType shadow) throws SchemaException - Throws:
SchemaException
-
resolveDefault
-
resolveDefault
-
hasResourceModifications
public static boolean hasResourceModifications(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> modifications) -
hasAttributeModifications
public static boolean hasAttributeModifications(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> modifications) -
getResourceModifications
@NotNull public static @NotNull List<ItemDelta<?,?>> getResourceModifications(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> modifications) -
getNonResourceModifications
@NotNull public static @NotNull com.google.common.collect.ImmutableList<ItemDelta<?,?>> getNonResourceModifications(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> modifications) -
isResourceModification
-
isAttributeModification
-
isNonAttributeResourceModification
-
getLastSyncSituationDescription
@Nullable public static @Nullable SynchronizationSituationDescriptionType getLastSyncSituationDescription(@NotNull @NotNull ShadowType shadow) -
sortPendingOperations
public static List<PendingOperationType> sortPendingOperations(List<PendingOperationType> pendingOperations) -
setupAttributesContainer
@VisibleForTesting @NotNull public static @NotNull ShadowAttributesContainer setupAttributesContainer(@NotNull @NotNull ShadowType shadowBean, @NotNull @NotNull ResourceObjectDefinition objectDefinition) throws SchemaException Creates the resource attributes container with a proper definition.- Throws:
SchemaException
-
getAssociationValuesRaw
@NotNull public static @NotNull Collection<ShadowAssociationValueType> getAssociationValuesRaw(@NotNull @NotNull PrismObject<ShadowType> shadow, QName assocName) Returns the values of given association. The values are connected to the shadow. The list itself is not. Does not assume that shadow has a definition. -
getAssociationValues
@NotNull public static @NotNull Collection<? extends ShadowAssociationValue> getAssociationValues(@NotNull @NotNull PrismObject<ShadowType> shadow, QName assocName) Returns the values of given association. The values are connected to the shadow. The list itself is not. -
getAdoptedAssociationValues
@NotNull public static @NotNull Collection<? extends ShadowAssociationValue> getAdoptedAssociationValues(@NotNull @NotNull PrismObject<ShadowType> shadow, QName assocName) TODO better name ... the idea is that the shadow has the correct definition, but currently we cannot use AbstractShadow, because there are some differences in definitions ... to be researched. It seems that the wrong definition came from primary delta fed to the model. Unlike in provisioning, we don't apply definitions to such deltas thoroughly. TEMPORARY -
getReferenceAttributes
@NotNull public static @NotNull Collection<ShadowReferenceAttribute> getReferenceAttributes(@NotNull @NotNull ShadowType shadow) Returns a detached, immutable list. -
getReferenceAttributes
@NotNull public static @NotNull Collection<ShadowReferenceAttribute> getReferenceAttributes(@NotNull @NotNull PrismObject<ShadowType> shadow) -
getAssociations
@NotNull public static @NotNull Collection<ShadowAssociation> getAssociations(@NotNull @NotNull ShadowType shadow) TODO -
getAssociations
@NotNull public static @NotNull Collection<ShadowAssociation> getAssociations(@NotNull @NotNull PrismObject<ShadowType> shadow) -
addPrimaryIdentifierValue
public static void addPrimaryIdentifierValue(ShadowType shadow, Object primaryIdentifierValue) throws SchemaException Adds primary identifier value to the shadow. Assumes there's no primary identifier yet.- Throws:
SchemaException
-
getAssociation
public static ShadowAssociation getAssociation(PrismObject<ShadowType> shadow, QName associationName) -
getAssociation
-
addAttribute
public static void addAttribute(ShadowType shadow, ShadowAttribute<?, ?, throws SchemaException?, ?> attribute) - Throws:
SchemaException
-
addAssociation
public static void addAssociation(ShadowType shadow, ShadowReferenceAttribute association) throws SchemaException - Throws:
SchemaException
-
getAssociationsCollection
@NotNull public static @NotNull ShadowAssociationsCollection getAssociationsCollection(@NotNull @NotNull ShadowType shadowBean) -
getReferenceAttributesCollection
@NotNull public static @NotNull ShadowReferenceAttributesCollection getReferenceAttributesCollection(@NotNull @NotNull ShadowType shadowBean) -
isRaw
-
equalsByContent
@Experimental public static boolean equalsByContent(@NotNull @NotNull ShadowType s1, @NotNull @NotNull ShadowType s2) Compares the shadows on a high level, with the aim of determining if two target shadows are the same. So, when considering using this method in a different content, take care! -
simpleAttributesEqualRelaxed
public static boolean simpleAttributesEqualRelaxed(@NotNull @NotNull Collection<ShadowSimpleAttribute<?>> attributes1, @NotNull @NotNull Collection<ShadowSimpleAttribute<?>> attributes2) Compares two simple attributes, taking into account the fact that `icfs:uid` and `icfs:name` can be added by the connector. -
getActivationCachedStatus
@NotNull public static @NotNull ItemCachedStatus getActivationCachedStatus(@Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @NotNull @NotNull XMLGregorianCalendar now) -
isPasswordValueLoaded
@NotNull public static @NotNull ItemCachedStatus isPasswordValueLoaded(@Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @NotNull @NotNull XMLGregorianCalendar now) -
isAuxiliaryObjectClassPropertyLoaded
@NotNull public static @NotNull ItemCachedStatus isAuxiliaryObjectClassPropertyLoaded(@Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @NotNull @NotNull XMLGregorianCalendar now) -
isAttributeLoaded
@NotNull public static @NotNull ItemCachedStatus isAttributeLoaded(@NotNull @NotNull ItemName attrName, @Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @Nullable @Nullable ShadowAttributeDefinition<?, ?, throws SchemaException?, ?> attrDefOverride, @NotNull @NotNull XMLGregorianCalendar now) - Throws:
SchemaException
-
isAssociationLoaded
@NotNull public static @NotNull ItemCachedStatus isAssociationLoaded(@NotNull @NotNull ItemName assocName, @Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @NotNull @NotNull XMLGregorianCalendar now) throws SchemaException - Throws:
SchemaException
-
getCachedAttributesNames
public static Collection<QName> getCachedAttributesNames(@Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull CompositeObjectDefinition definition, @NotNull @NotNull XMLGregorianCalendar now) -
getShadowCachedStatus
public static ItemCachedStatus getShadowCachedStatus(@NotNull @NotNull PrismObject<ShadowType> shadow, @NotNull @NotNull XMLGregorianCalendar now) Assuming that the shadow was obtained from the repository (cache), and has the correct definition, this method tells the client if the cached data can be considered fresh enough regarding the caching TTL. Requires non-raw shadow. -
getShadowCachedStatus
@NotNull public static @NotNull ItemCachedStatus getShadowCachedStatus(@Nullable @Nullable PrismObject<ShadowType> shadow, @NotNull @NotNull ResourceObjectDefinition definition, @Nullable @Nullable ShadowContentDescriptionType contentDescriptionOverride, @NotNull @NotNull XMLGregorianCalendar now) The shadow can be raw here. The definition is provided separately. -
getDiagInfo
-
getDiagInfoLazily
-