private boolean isResourceModification(ItemDelta itemDelta) { ItemPath path = itemDelta.getPath(); ItemPath parentPath = itemDelta.getParentPath(); if (ShadowType.F_ATTRIBUTES.equivalent(parentPath)) { return true; } if (ShadowType.F_AUXILIARY_OBJECT_CLASS.equivalent(path)) { return true; } if (ShadowType.F_ASSOCIATION.equivalent(parentPath)) { return true; } if (ShadowType.F_ASSOCIATION.equivalent(path)) { return true; } if (ShadowType.F_ACTIVATION.equivalent(parentPath)) { return true; } if (ShadowType.F_ACTIVATION.equivalent(path)) { // should not occur, but for completeness... return true; } if (SchemaConstants.PATH_CREDENTIALS_PASSWORD.equivalent(parentPath)) { return true; } return false; }
private boolean isFocusPhoto(ItemDelta delta) { return FocusType.F_JPEG_PHOTO.equivalent(delta.getPath()); }
private boolean isAttributeDelta(ItemDelta itemDelta) { return ShadowType.F_ATTRIBUTES.equivalent(itemDelta.getParentPath()); }
private boolean isShadowPendingOperation(RObject<?> object, ItemDelta delta) { return object instanceof RShadow && ShadowType.F_PENDING_OPERATION.equivalent(delta.getPath()); }
private boolean isMetadata(ItemDelta delta) { ItemPath named = delta.getPath().namedSegmentsOnly(); return ObjectType.F_METADATA.equivalent(named); }
public static void clearCacheForDelta(Collection<? extends ItemDelta> modifications) { if (modifications == null) { return; } for (ItemDelta itemDelta : modifications) { if (ObjectType.F_NAME.equivalent(itemDelta.getPath())) { clearCacheForValues(itemDelta.getValuesToAdd()); // these may present a conflict clearCacheForValues(itemDelta.getValuesToReplace()); // so do these } } }
public GetOperationOptions findLookupTableGetOption(Collection<SelectorOptions<GetOperationOptions>> options) { Collection<SelectorOptions<GetOperationOptions>> filtered = SelectorOptions.filterRetrieveOptions(options); for (SelectorOptions<GetOperationOptions> option : filtered) { ObjectSelector selector = option.getSelector(); if (selector == null) { // Ignore this. These are top-level options. There will not // apply to lookup table continue; } if (LookupTableType.F_ROW.equivalent(selector.getPath())) { return option.getOptions(); } } return null; }
if (!ShadowType.F_ASSOCIATION.equivalent(delta.getPath())) { continue;
private boolean hasChangesOnResource( Collection<? extends ItemDelta> itemDeltas) { for (ItemDelta itemDelta : itemDeltas) { if (isAttributeDelta(itemDelta) || SchemaConstants.PATH_PASSWORD.equivalent(itemDelta.getParentPath())) { return true; } else if (SchemaConstants.PATH_ACTIVATION.equivalent(itemDelta.getParentPath())){ return true; } else if (ShadowType.F_ASSOCIATION.equivalent(itemDelta.getPath())) { return true; } } return false; }
if (!FocusType.F_ASSIGNMENT.equivalent(delta.getPath())) { continue;
} else if (ShadowType.F_ASSOCIATION.equivalent(itemDelta.getPath())) { if (itemDelta instanceof ContainerDelta) { entitlementConverter.collectEntitlementChange(ctx, (ContainerDelta<ShadowAssociationType>)itemDelta, operations); throw new UnsupportedOperationException("Not supported delta: " + itemDelta); } else if (ShadowType.F_AUXILIARY_OBJECT_CLASS.equivalent(itemDelta.getPath())) { if (itemDelta instanceof PropertyDelta) { PropertyModificationOperation attributeModification = new PropertyModificationOperation(
Collection<ItemDelta> repoChanges = new ArrayList<>(); for (ItemDelta itemDelta : objectChange) { if (ShadowType.F_ATTRIBUTES.equivalent(itemDelta.getParentPath())) { QName attrName = itemDelta.getElementName(); if (objectClassDefinition.isSecondaryIdentifier(attrName)) { continue; } else if (ShadowType.F_ACTIVATION.equivalent(itemDelta.getParentPath())) { if (!ProvisioningUtil.shouldStoreActivationItemInShadow(itemDelta.getElementName(), cachingStrategy)) { continue; } else if (ShadowType.F_ACTIVATION.equivalent(itemDelta.getPath())) { // should not occur, but for completeness... for (PrismContainerValue<ActivationType> valueToAdd : ((ContainerDelta<ActivationType>) itemDelta).getValuesToAdd()) { ProvisioningUtil.cleanupShadowActivation(valueToAdd.asContainerable());
return; // already has a resource-related definition if (!ShadowType.F_ATTRIBUTES.equivalent(valueFilter.getParentPath())) { return;
private void assertObjectTemplateInternals(PrismObject<ObjectTemplateType> object, QName elementName) throws SchemaException { int assignmentValuesFound = 0; for (ObjectTemplateMappingType mappingType : object.asObjectable().getMapping()) { if (mappingType.getExpression() != null) { if (mappingType.getTarget() != null && mappingType.getTarget().getPath() != null && UserType.F_ASSIGNMENT.equivalent(mappingType.getTarget().getPath().getItemPath())) { ItemDefinition assignmentDef = getPrismContext().getSchemaRegistry() .findObjectDefinitionByCompileTimeClass(UserType.class) .findItemDefinition(UserType.F_ASSIGNMENT); for (JAXBElement evaluator : mappingType.getExpression().getExpressionEvaluator()) { if (evaluator.getValue() instanceof RawType) { RawType rawType = (RawType) evaluator.getValue(); System.out.println("\nraw assignment:\n" + rawType); Item assignment = rawType.getParsedItem(assignmentDef); System.out.println("\nassignment:\n" + assignment.debugDump()); assignmentValuesFound++; } } } } } assertEquals("wrong # of assignment values found in mapping", 2, assignmentValuesFound); }
ItemPath subjectItemPath = subjectDelta.getPath(); if (ShadowType.F_ASSOCIATION.equivalent(subjectItemPath)) { ContainerDelta<ShadowAssociationType> containerDelta = (ContainerDelta<ShadowAssociationType>)subjectDelta; subjectShadowAfter = entitlementConverter.collectEntitlementsAsObjectOperation(ctx, roMap, containerDelta,
throw new ConfigurationException("Empty target path in "+mapping.getContextDescription()); boolean isAssignment = FocusType.F_ASSIGNMENT.equivalent(targetFocusItemPath); Item targetFocusItem = null; if (focusNew != null) {
boolean isAssignment = FocusType.F_ASSIGNMENT.equivalent(itemPath);
targetFocusItem = focusNew.findItem(outputPath); boolean isAssignment = FocusType.F_ASSIGNMENT.equivalent(outputPath);