throw new ObjectNotFoundException("Returned delta attribute with name: "+ name +" for which, has not been found ResourceAttributeDefinition."); PropertyDelta<Object> delta = prismContext.deltaFactory().property().create(ItemPath.create(ShadowType.F_ATTRIBUTES, definition.getName()), definition); if(attrDeltaSideEffect.getValuesToReplace() != null){
PropertyDelta pdelta = prismContext.deltaFactory().property().createModificationReplaceProperty( (ItemPath.create(ObjectType.F_METADATA, MetadataType.F_MODIFY_CHANNEL)), accountDefinition, "channel"); modifications.add(pdelta); pdelta = prismContext.deltaFactory().property().createModificationReplaceProperty((ItemPath.create(ObjectType.F_METADATA, MetadataType.F_MODIFY_TIMESTAMP)), accountDefinition, modifyTimestampBefore); modifications.add(pdelta);
newName = ((PrismPropertyValue)itemDelta.getValuesToAdd().iterator().next()).getValue().toString(); PropertyDelta<PolyString> nameDelta = prismContext.deltaFactory().property().createReplaceDelta(shadow.getDefinition(), ShadowType.F_NAME, new PolyString(newName)); repoChanges.add(nameDelta);
PolyString oldRepoShadowName = oldRepoShadow.getName(); if (!currentShadowName.equalsOriginalValue(oldRepoShadowName)) { PropertyDelta<?> shadowNameDelta = prismContext.deltaFactory().property().createModificationReplaceProperty(ShadowType.F_NAME, oldRepoShadow.getDefinition(),currentShadowName); shadowDelta.addModification(shadowNameDelta);
property.setRealValue(100); PropertyDelta delta = prismContext.deltaFactory().property().create(ItemPath.create(TaskType.F_EXTENSION, property.getElementName()), property.getDefinition());
.createModificationReplacePropertyCollection(ShadowType.F_RESULT, getResourceObjectShadowDefinition(), objResult.createOperationResultType()); try {
throw new IllegalArgumentException("No definition for " + attribute1 + " in " + userPrismDefinition); PropertyDelta delta1 = prismContext.deltaFactory().property().create(attribute1, propertyDefinition1); delta2 = prismContext.deltaFactory().container().create(attribute2, (PrismContainerDefinition) propertyDefinition2); } else { delta2 = prismContext.deltaFactory().property().create(attribute2, (PrismPropertyDefinition) propertyDefinition2);
PropertyDelta resultingDelta = prismContext.deltaFactory().property().create(propertyDelta.getPath(), propertyDelta.getPropertyDefinition()); resultingDelta.setValuesToReplace(currentValues); return new PropertyModificationOperation(resultingDelta);
PrismProperty item = shadow.findProperty(employeeTypePath); PropertyDelta deleteDelta = prismContext.deltaFactory().property().create(ShadowType.F_ATTRIBUTES, item.getDefinition().getName(), item.getDefinition());
opResult.recordFatalError("Failed to finish operation with shadow: " + ObjectTypeUtil.toShortString(shadow.asObjectable()) +". Reason: " + ex.getMessage(), ex); Collection<? extends ItemDelta> modifications = prismContext.deltaFactory().property() .createModificationReplacePropertyCollection(ShadowType.F_ATTEMPT_NUMBER, shadow.getDefinition(), shadow.asObjectable().getAttemptNumber() + 1); try {
PropertyDelta<ShadowKindType> kindDelta = prismContext.deltaFactory().property().createReplaceDelta(shadow.getDefinition(), ShadowType.F_KIND, syncCtx.getKind()); deltas.add(kindDelta); PropertyDelta<String> intentDelta = prismContext.deltaFactory().property().createReplaceDelta(shadow.getDefinition(), ShadowType.F_INTENT, syncCtx.getIntent()); deltas.add(intentDelta);
schemaCachingMetadata = MiscSchemaUtil.generateCachingMetadata(); modifications.add( prismContext.deltaFactory().property().createModificationReplaceProperty( ItemPath.create(ResourceType.F_SCHEMA, CapabilitiesType.F_CACHING_METADATA), resource.getDefinition(),
ShadowType applicableShadowType = applicableShadow.asObjectable(); if (applicableShadowType.getIntent() == null || SchemaConstants.INTENT_UNKNOWN.equals(applicableShadowType.getIntent())) { PropertyDelta<String> intentDelta = prismContext.deltaFactory().property().createModificationReplaceProperty(ShadowType.F_INTENT, syncCtx.getApplicableShadow().getDefinition(), syncCtx.getIntent()); modifications.add(intentDelta); PropertyDelta<ShadowKindType> intentDelta = prismContext.deltaFactory().property().createModificationReplaceProperty(ShadowType.F_KIND, syncCtx.getApplicableShadow().getDefinition(), syncCtx.getKind()); modifications.add(intentDelta);
.asPrismObject().getDefinition().findPropertyDefinition(icfNamePath); ItemDelta renameDelta = prismContext.deltaFactory().property() .createModificationReplaceProperty(icfNamePath, icfNameDef, "uid=rename,ou=People,dc=example,dc=com"); ((Collection)delta.getModifications()).add(renameDelta);
OperationResult result = task.getResult(); PropertyDelta<String> givenNameDelta = prismContext.deltaFactory().property().create( ItemPath.create(ShadowType.F_ATTRIBUTES, new QName(RESOURCE_OPENDJ_NS, "givenName")), null); PropertyDelta<String> titleDelta = prismContext.deltaFactory().property().create( ItemPath.create(ShadowType.F_ATTRIBUTES, new QName(RESOURCE_OPENDJ_NS, "title")), null);
PropertyDelta<String> delta1 = prismContext.deltaFactory().property().create(descDefinition); delta1.addRealValuesToAdd("add1"); assertPath(delta1, UserType.F_DESCRIPTION); DOMUtil.XSD_STRING); ItemPath itemPathAssDescNoId = ItemPath.create(UserType.F_ASSIGNMENT, AssignmentType.F_DESCRIPTION); PropertyDelta<String> propDelta2 = prismContext.deltaFactory().property().create(itemPathAssDescNoId, descDefinition); assertPath(propDelta2, itemPathAssDescNoId); PropertyDelta<String> propDelta3 = prismContext.deltaFactory().property().create(itemPathAssDesc1Id, descDefinition); assertPath(propDelta3, itemPathAssDesc1Id);
PropertyDelta propertyDelta = prismContext.deltaFactory().property().createModificationAddProperty( UserType.F_DESCRIPTION, getUserDefinition().findPropertyDefinition(UserType.F_DESCRIPTION), "This value will be not added");
XmlTypeConverter.createXMLGregorianCalendar(VALID_TO_MILLIS)); PrismObjectDefinition def = prismContext.getSchemaRegistry().findObjectDefinitionByCompileTimeClass(ShadowType.class); PropertyDelta validFromDelta = prismContext.deltaFactory().property().createModificationDeleteProperty(SchemaConstants.PATH_ACTIVATION_VALID_FROM, def.findPropertyDefinition(SchemaConstants.PATH_ACTIVATION_VALID_FROM), XmlTypeConverter.createXMLGregorianCalendar(VALID_FROM_MILLIS));
XmlTypeConverter.createXMLGregorianCalendar(VALID_TO_MILLIS)); PrismObjectDefinition<ShadowType> def = accountType.asPrismObject().getDefinition(); PropertyDelta<XMLGregorianCalendar> validFromDelta = prismContext.deltaFactory().property().createModificationDeleteProperty( SchemaConstants.PATH_ACTIVATION_VALID_FROM, def.findPropertyDefinition(SchemaConstants.PATH_ACTIVATION_VALID_FROM),
cachingMetadata = MiscSchemaUtil.generateCachingMetadata(); modifications.add( prismContext.deltaFactory().property().createModificationReplaceProperty( ItemPath.create(ResourceType.F_CAPABILITIES, CapabilitiesType.F_CACHING_METADATA), connectorSpec.getResource().getDefinition(),