use of com.evolveum.midpoint.schema.processor.ResourceAttributeDefinitionImpl in project midpoint by Evolveum.
the class TestUtil method setAttribute.
public static void setAttribute(PrismObject<ShadowType> account, QName attrName, QName typeName, PrismContext prismContext, String value) throws SchemaException {
PrismContainer<Containerable> attributesContainer = account.findContainer(ShadowType.F_ATTRIBUTES);
ResourceAttributeDefinition attrDef = new ResourceAttributeDefinitionImpl(attrName, typeName, prismContext);
ResourceAttribute attribute = attrDef.instantiate();
attribute.setRealValue(value);
attributesContainer.add(attribute);
}
Aggregations