public ItemDelta<V,D> createEmptyDelta(ItemPath path) { //noinspection unchecked return outputDefinition.createEmptyDelta(path); }
private <F extends AssignmentHolderType> void executeDataReduction(LensContext<F> context, LifecycleStateActionDataReductionType dataReduction, XMLGregorianCalendar now, Task task, OperationResult result) throws SchemaException { if (dataReduction == null) { return; } LensFocusContext<F> focusContext = context.getFocusContext(); PrismObjectDefinition<F> focusDefinition = focusContext.getObjectDefinition(); for (ItemPathType purgeItemPathType : dataReduction.getPurgeItem()) { ItemPath purgeItemPath = purgeItemPathType.getItemPath(); LOGGER.trace("Purging item {} from {}", purgeItemPath, focusContext.getObjectNew()); ItemDefinition purgeItemDef = focusDefinition.findItemDefinition(purgeItemPath); ItemDelta purgeItemDelta = purgeItemDef.createEmptyDelta(purgeItemPath); purgeItemDelta.setValueToReplace(); focusContext.swallowToSecondaryDelta(purgeItemDelta); } }
@Override public ItemDelta<?,?> getSubDelta(ItemPath path) { if (path.isEmpty()) { return this; } Long id = null; if (path.startsWithId()) { id = path.firstToIdOrNull(); path = path.rest(); } ItemDefinition itemDefinition = getDefinition().findItemDefinition(path); if (itemDefinition == null) { throw new IllegalStateException("No definition of " + path + " in " + getDefinition()); } ItemDelta<?,?> itemDelta = itemDefinition.createEmptyDelta(getPath().append(path)); itemDelta.addValuesToAdd(findItemValues(id, path, getValuesToAdd())); itemDelta.addValuesToDelete(findItemValues(id, path, getValuesToDelete())); itemDelta.setValuesToReplace(findItemValues(id, path, getValuesToReplace())); if (itemDelta.isEmpty()) { return null; } return itemDelta; }
ItemDelta itemDelta = itemDefinition.createEmptyDelta(itemPath); MergeStrategyType leftStrategy = itemMergeConfig.getLeft(); MergeStrategyType rightStrategy = itemMergeConfig.getRight();
ItemDelta<V,D> itemDelta = itemDefinition.createEmptyDelta(itemPath);
boolean hasRange, boolean isDelete) throws SchemaException { ItemDelta outputFocusItemDelta = outputDefinition.createEmptyDelta(outputPath); Item<V, D> targetFocusItem = null; if (focusNew != null) { outputFocusItemDelta = outputDefinition.createEmptyDelta(originMapping.getOutputPath());
targetItemDefinition = params.getTargetItemDefinition(); ItemDelta<V,D> targetItemDelta = targetItemDefinition.createEmptyDelta(mappingOutputPath);
ItemDelta<IV,ID> itemDelta = propOutputDefinition.createEmptyDelta(targetPath); itemDelta.addValuesToAdd(PrismValueCollectionsUtil.cloneCollection(pvalues));