use of com.evolveum.midpoint.prism.PrismPropertyDefinition in project midpoint by Evolveum.
the class TestParseScriptingExpression method processParsings.
private void processParsings(SerializingFunction<PrismPropertyValue<ExpressionPipelineType>> serializer, String serId) throws Exception {
PrismPropertyDefinition definition = getPrismContext().getSchemaRegistry().findPropertyDefinitionByElementName(SchemaConstants.S_PIPELINE);
processParsings(ExpressionPipelineType.class, ExpressionPipelineType.COMPLEX_TYPE, definition, serializer, serId);
}
use of com.evolveum.midpoint.prism.PrismPropertyDefinition in project midpoint by Evolveum.
the class PropertyDelta method createDelta.
public static <O extends Objectable, T> PropertyDelta<T> createDelta(ItemPath propertyPath, Class<O> compileTimeClass, PrismContext prismContext) {
PrismObjectDefinition<O> objectDefinition = prismContext.getSchemaRegistry().findObjectDefinitionByCompileTimeClass(compileTimeClass);
PrismPropertyDefinition propDef = objectDefinition.findPropertyDefinition(propertyPath);
return new PropertyDelta<T>(propertyPath, propDef, prismContext);
}
use of com.evolveum.midpoint.prism.PrismPropertyDefinition in project midpoint by Evolveum.
the class PropertyDelta method createReplaceEmptyDelta.
/**
* Create delta that deletes all values of the specified property.
*/
public static <O extends Objectable> PropertyDelta createReplaceEmptyDelta(PrismObjectDefinition<O> objectDefinition, QName propertyName) {
PrismPropertyDefinition propertyDefinition = objectDefinition.findPropertyDefinition(propertyName);
if (propertyDefinition == null) {
throw new IllegalArgumentException("No definition for " + propertyName + " in " + objectDefinition);
}
// hoping the prismContext is there
PropertyDelta delta = new PropertyDelta(propertyName, propertyDefinition, objectDefinition.getPrismContext());
delta.setValuesToReplace(new ArrayList<PrismPropertyValue>());
return delta;
}
use of com.evolveum.midpoint.prism.PrismPropertyDefinition in project midpoint by Evolveum.
the class PropertyDelta method createAddDelta.
public static <O extends Objectable> PropertyDelta createAddDelta(PrismContainerDefinition<O> containerDefinition, QName propertyName, Object... realValues) {
PrismPropertyDefinition propertyDefinition = containerDefinition.findPropertyDefinition(propertyName);
if (propertyDefinition == null) {
throw new IllegalArgumentException("No definition for " + propertyName + " in " + containerDefinition);
}
// hoping the prismContext is there
PropertyDelta delta = new PropertyDelta(propertyName, propertyDefinition, containerDefinition.getPrismContext());
for (Object realVal : realValues) {
delta.addValueToAdd(new PrismPropertyValue(realVal));
}
return delta;
}
use of com.evolveum.midpoint.prism.PrismPropertyDefinition in project midpoint by Evolveum.
the class PropertyDelta method createModificationReplaceProperty.
public static <T> PropertyDelta<T> createModificationReplaceProperty(ItemPath propertyPath, PrismObjectDefinition<?> objectDefinition, Collection<T> propertyValues) {
PrismPropertyDefinition propDef = objectDefinition.findPropertyDefinition(propertyPath);
// hoping the prismContext is there
PropertyDelta<T> propertyDelta = new PropertyDelta<T>(propertyPath, propDef, objectDefinition.getPrismContext());
Collection<PrismPropertyValue<T>> pValues = new ArrayList<PrismPropertyValue<T>>(propertyValues.size());
for (T val : propertyValues) {
pValues.add(new PrismPropertyValue<T>(val));
}
propertyDelta.setValuesToReplace(pValues);
return propertyDelta;
}
Aggregations