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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAssociation(ShadowType shadow, ShadowReferenceAttribute association) static voidaddAttribute(ShadowType shadow, ShadowAttribute<?, ?, ?, ?> attribute) static voidaddPrimaryIdentifierValue(ShadowType shadow, Object primaryIdentifierValue) Adds primary identifier value to the shadow.static PrismObjectDefinition<ShadowType>applyObjectDefinition(PrismObjectDefinition<ShadowType> shadowDefinition, ResourceObjectDefinition objectClassDefinition) static voidapplyResourceSchema(PrismObject<? extends ShadowType> shadow, ResourceSchema resourceSchema) This is not supposed to be used in production code! It is just for the tests.static <T> TcastShadowContainer(@NotNull PrismContainerValue<?> parent, QName containerName, Class<T> expectedClass) static voidcheckConsistence(PrismObject<? extends ShadowType> shadow, String desc) static voidcheckConsistency(PrismContainerDefinition<ShadowAttributesType> attributesDefinition, String desc) static PolyStringdetermineShadowName(PrismObject<ShadowType> shadow) static PolyStringdetermineShadowName(ShadowType shadow) static PolyStringTypestatic @NotNull ItemCachedStatusgetActivationCachedStatus(@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 ...static @NotNull Collection<ShadowSimpleAttribute<?>>getAllIdentifiers(PrismObject<? extends ShadowType> shadow) static @NotNull Collection<ShadowSimpleAttribute<?>>getAllIdentifiers(ShadowType shadow) static ShadowAssociationgetAssociation(PrismObject<ShadowType> shadow, QName associationName) static ShadowAssociationgetAssociation(ShadowType shadow, QName associationName) static @NotNull Collection<ShadowAssociation>getAssociations(@NotNull PrismObject<ShadowType> shadow) static @NotNull Collection<ShadowAssociation>getAssociations(@NotNull ShadowType shadow) TODOstatic @NotNull ShadowAssociationsCollectiongetAssociationsCollection(@NotNull ShadowType shadowBean) static ShadowAssociationsContainergetAssociationsContainer(@NotNull PrismObject<ShadowType> shadow) Similar togetAttributesContainer(ShadowType).static @Nullable ShadowAssociationsContainergetAssociationsContainer(@NotNull ShadowType shadow) Similar togetAttributesContainer(ShadowType).static ShadowAssociationsContainergetAssociationsContainerRequired(@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 ItemNamegetAttributeName(ItemPath attributePath, String message) static @NotNull Collection<ShadowAttribute<?,?, ?, ?>> getAttributes(PrismObject<? extends ShadowType> shadow) static @NotNull Collection<ShadowAttribute<?,?, ?, ?>> getAttributes(ShadowType shadowType) static @Nullable ShadowAttributesContainergetAttributesContainer(PrismObject<? extends ShadowType> shadow) static ShadowAttributesContainergetAttributesContainer(ShadowType shadowType) static @NotNull ShadowAttributesContainerstatic @NotNull ShadowAttributesContainerstatic @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> TgetAttributeValue(PrismObject<? extends ShadowType> shadow, QName attrName) static <T> TgetAttributeValue(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 ShadowCorrelationStateTypegetCorrelationStateRequired(@NotNull ShadowType shadow) static <T extends AbstractCorrelatorStateType>
TgetCorrelatorStateRequired(@NotNull ShadowType shadow, Class<T> clazz) static StringgetDiagInfo(PrismObject<ShadowType> shadow) static ObjectgetDiagInfoLazily(PrismObject<ShadowType> shadow) static StringgetHumanReadableName(PrismObject<? extends ShadowType> shadow) static StringgetHumanReadableName(ShadowType shadowType) static ObjectgetHumanReadableNameLazily(PrismObject<? extends ShadowType> shadow) static StringgetIntent(PrismObject<ShadowType> shadow) static StringgetIntent(ShadowType shadow) Returns intent from the shadow.static ShadowKindTypegetKind(PrismObject<ShadowType> shadow) static ShadowKindTypegetKind(ShadowType shadow) static @Nullable SynchronizationSituationDescriptionTypegetLastSyncSituationDescription(@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 ResourceObjectClassDefinitiongetObjectClassDefinition(@NotNull ShadowType shadow) static @NotNull QNamegetObjectClassRequired(@NotNull ShadowType shadow) static ActivationTypegetOrCreateActivation(ShadowType shadowType) static ShadowAssociationsContainerAssuming the shadow has the correct definition.static ShadowAttributesContainergetOrCreateAttributesContainer(PrismObject<? extends ShadowType> shadow, ResourceObjectDefinition definition) static @NotNull ShadowAttributesContainerstatic @NotNull ShadowAttributesContainerAssuming the shadow has the correct definition.static ShadowAttributesContainergetOrCreateAttributesContainer(ShadowType shadow, ResourceObjectDefinition definition) static @NotNull PasswordTypegetOrCreateShadowPassword(ShadowType shadow) static ProtectedStringTypegetPasswordValue(ShadowType shadowType) 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 ObjectgetPrimaryIdentifierValue(@NotNull ShadowType shadow, @NotNull ResourceObjectDefinition objectDefinition) static ShadowReferenceAttributegetReferenceAttribute(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 ShadowReferenceAttributesCollectiongetReferenceAttributesCollection(@NotNull ShadowType shadowBean) getResourceModifications(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static PolyStringgetResourceName(PrismObject<ShadowType> shadow) static PolyStringgetResourceName(ShadowType shadowType) static @NotNull ResourceObjectDefinitiongetResourceObjectDefinition(@NotNull PrismObject<ShadowType> shadow) static @NotNull ResourceObjectDefinitiongetResourceObjectDefinition(@NotNull ShadowType shadow) The shadow must have the attributes container and a definition.static StringgetResourceOid(PrismObject<ShadowType> shadow) static StringgetResourceOid(ShadowType shadowType) static @NotNull StringgetResourceOidRequired(@NotNull ShadowType shadow) static Collection<ShadowSimpleAttribute<?>>getSecondaryIdentifiers(PrismObject<? extends ShadowType> shadow) static Collection<ShadowSimpleAttribute<?>>getSecondaryIdentifiers(ShadowType shadowType) static ItemCachedStatusgetShadowCachedStatus(@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 ItemCachedStatusgetShadowCachedStatus(@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 StringgetSingleStringAttributeValue(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 booleanhasAttributeModifications(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static booleanhasResourceModifications(@NotNull Collection<? extends ItemDelta<?, ?>> modifications) static @NotNull ItemCachedStatusisAssociationLoaded(@NotNull ItemName assocName, @Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static @NotNull ItemCachedStatusisAttributeLoaded(@NotNull ItemName attrName, @Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @Nullable ShadowAttributeDefinition<?, ?, ?, ?> attrDefOverride, @NotNull XMLGregorianCalendar now) static booleanisAttributeModification(QName firstPathName) static @NotNull ItemCachedStatusisAuxiliaryObjectClassPropertyLoaded(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static booleanisClassified(ShadowKindType kind, String intent) static booleanisClassified(ShadowType shadow) static booleanisConflicting(ShadowType shadow1, ShadowType shadow2) static booleanisDead(@NotNull PrismObject<ShadowType> shadow) static booleanisDead(ObjectReferenceType projectionRef) static booleanisDead(ShadowType shadow) static booleanisExists(PrismObject<ShadowType> shadow) static booleanisExists(ShadowType shadow) static booleanisGone(@NotNull ShadowType shadow) Returns true if the shadow state indicates that it is 'gone', i.e.static booleanisGoneApproximate(@NotNull ShadowType shadow) AsisGone(ShadowType)but with possibly incomplete information.static booleanisKnown(ShadowKindType kind) static booleanstatic booleanisNonAttributeResourceModification(QName firstPathName) static booleanisNotDead(PrismObject<ShadowType> shadow) static booleanisNotDead(ObjectReferenceType projectionRef) static booleanisNotDead(ShadowType shadow) static booleanisNotKnown(ShadowKindType kind) static booleanisNotKnown(String intent) static @NotNull ItemCachedStatusisPasswordValueLoaded(@Nullable PrismObject<ShadowType> shadow, @NotNull ResourceObjectDefinition definition, @NotNull XMLGregorianCalendar now) static booleanisProtected(@Nullable ShadowType shadow) static booleanisProtected(PrismObject<? extends ShadowType> shadow) static booleanisRaw(@NotNull ShadowType shadowBean) static booleanisResourceModification(ItemDelta<?, ?> modification) static booleanmatches(@NotNull ShadowType shadow, @NotNull ShadowDiscriminatorType discriminator) static booleanmatches(@NotNull ShadowType shadow, @Nullable String resourceOid, @Nullable ShadowKindType kind, @Nullable String intent) Null values mean "any" here.static booleanmatchesAttribute(ItemPath path, QName attributeName) static booleanmatchesPattern(ShadowType shadowType, ShadowDiscriminatorType discr) InterpretsShadowDiscriminatorTypeas a pattern.static @NotNull ShadowKindTyperesolveDefault(ShadowKindType kind) static @NotNull StringresolveDefault(String intent) static voidsetCorrelatorState(@NotNull ShadowType shadow, @Nullable AbstractCorrelatorStateType state) static voidsetPassword(ShadowType shadow, ProtectedStringType passwordValue) static voidsetPasswordIncomplete(ShadowType shadow) static @NotNull ShadowAttributesContainersetupAttributesContainer(@NotNull ShadowType shadowBean, @NotNull ResourceObjectDefinition objectDefinition) Creates the resource attributes container with a proper definition.static StringshortDumpShadow(PrismObject<ShadowType> shadow) static StringshortDumpShadow(ShadowType shadow) static ObjectshortDumpShadowLazily(PrismObject<ShadowType> shadow) static ObjectshortDumpShadowLazily(ShadowType shadow) static booleansimpleAttributesEqualRelaxed(@NotNull Collection<ShadowSimpleAttribute<?>> attributes1, @NotNull Collection<ShadowSimpleAttribute<?>> attributes2) static List<PendingOperationType>sortPendingOperations(List<PendingOperationType> pendingOperations) static voidvalidateAttributeSchema(ShadowType shadow, ResourceObjectDefinition objectDefinition) static booleanwasSynchronizedAfterDeath(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 shadow must have the attributes container and a definition. -
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
- Throws:
SchemaException
-
getOrCreateShadowPassword
-
getOrCreateActivation
-
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
InterpretsShadowDiscriminatorTypeas 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
-
getPasswordValue
-
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
-
simpleAttributesEqualRelaxed
public static boolean simpleAttributesEqualRelaxed(@NotNull @NotNull Collection<ShadowSimpleAttribute<?>> attributes1, @NotNull @NotNull Collection<ShadowSimpleAttribute<?>> attributes2) -
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
-