public void addDeadShadowDeltas(PrismObject<ShadowType> repoShadow, AsynchronousOperationResult asyncResult, List<ItemDelta> shadowModifications) { LOGGER.trace("Marking shadow {} as dead", repoShadow); if (ShadowUtil.isExists(repoShadow.asObjectable())) { shadowModifications.add(createShadowPropertyReplaceDelta(repoShadow, ShadowType.F_EXISTS, Boolean.FALSE)); } if (!ShadowUtil.isDead(repoShadow.asObjectable())) { shadowModifications.add(createShadowPropertyReplaceDelta(repoShadow, ShadowType.F_DEAD, Boolean.TRUE)); } }
public ShadowState determineShadowState(ProvisioningContext ctx, PrismObject<ShadowType> shadow, XMLGregorianCalendar now) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, ExpressionEvaluationException { ShadowType shadowType = shadow.asObjectable(); ChangeTypeType pendingLifecycleOperation = findPreviousPendingLifecycleOperationInGracePeriod(ctx, shadow, now); if (ShadowUtil.isDead(shadowType)) { if (pendingLifecycleOperation == ChangeTypeType.DELETE) { return ShadowState.CORPSE; } else { return ShadowState.TOMBSTONE; } } if (ShadowUtil.isExists(shadowType)) { if (pendingLifecycleOperation == ChangeTypeType.DELETE) { return ShadowState.REAPING; } else if (pendingLifecycleOperation == ChangeTypeType.ADD) { return ShadowState.GESTATION; } else { return ShadowState.LIFE; } } if (SchemaConstants.LIFECYCLE_PROPOSED.equals(shadowType.getLifecycleState())) { return ShadowState.PROPOSED; } else { return ShadowState.CONCEPTION; } }
throw new IllegalStateException("Deleted "+shadow+" not dead"); if (ShadowUtil.isExists(shadowType)) { throw new IllegalStateException("Deleted "+shadow+" exists");
addDeadShadowDeltas(repoShadow, opState.getAsyncResult(), shadowModifications); } else { if (!ShadowUtil.isExists(repoShadow.asObjectable())) { shadowModifications.add(createShadowPropertyReplaceDelta(repoShadow, ShadowType.F_EXISTS, null));
if (ShadowUtil.isExists(repositoryShadow.asObjectable())) {
public void determineFullShadowFlag(PrismObject<ShadowType> loadedShadow) { ShadowType shadowType = loadedShadow.asObjectable(); if (ShadowUtil.isDead(shadowType) || !ShadowUtil.isExists(shadowType)) { setFullShadow(false); return; } OperationResultType fetchResult = shadowType.getFetchResult(); if (fetchResult != null && (fetchResult.getStatus() == OperationResultStatusType.PARTIAL_ERROR || fetchResult.getStatus() == OperationResultStatusType.FATAL_ERROR) && (getObjectAny().asObjectable().getFailedOperationType() == null || getObjectAny().asObjectable().getFailedOperationType() != FailedOperationTypeType.ADD)) { // todo what about other kinds of status? [e.g. in-progress] setFullShadow(false); } else { setFullShadow(true); } }
+ "resourceShadow="+ShadowUtil.shortDumpShadow(resourceShadow)+", repoShadow="+ShadowUtil.shortDumpShadow(liveShadow)); if (!ShadowUtil.isExists(repoShadowType)) {
if (!ShadowUtil.isExists(objectCurrent.asObjectable())) { LOGGER.debug("Load of full resource object {} ended with non-existent shadow (options={})", projCtx, getOptions); projCtx.setExists(false);
projectionContext.setExists(false); } else { projectionContext.setExists(ShadowUtil.isExists(shadow.asObjectable())); if (ShadowUtil.isDead(shadow.asObjectable())) { projectionContext.markTombstone();
if (!ShadowUtil.isDead(currentShadowType) || ShadowUtil.isExists(currentShadowType)) { shadowManager.markShadowTombstone(currentShadow, parentResult);
if (ShadowUtil.isExists(account)) { if (supportActivation) { assertNotNull("Current shadow does not have activation", account.getActivation());
projectionContext.setExists(ShadowUtil.isExists(newShadow.asObjectable())); projectionContext.setFullShadow(false); } catch (ObjectNotFoundException e) {
projCtx.determineFullShadowFlag(objectOld); projCtx.setLoadedObject(objectOld); projCtx.setExists(ShadowUtil.isExists(objectOld.asObjectable())); projCtx.recompute();