Search in sources :

Example 1 with ResourceAttributeDefinitionImpl

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);
}
Also used : ResourceAttributeDefinition(com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition) Containerable(com.evolveum.midpoint.prism.Containerable) ResourceAttribute(com.evolveum.midpoint.schema.processor.ResourceAttribute) ResourceAttributeDefinitionImpl(com.evolveum.midpoint.schema.processor.ResourceAttributeDefinitionImpl)

Aggregations

Containerable (com.evolveum.midpoint.prism.Containerable)1 ResourceAttribute (com.evolveum.midpoint.schema.processor.ResourceAttribute)1 ResourceAttributeDefinition (com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition)1 ResourceAttributeDefinitionImpl (com.evolveum.midpoint.schema.processor.ResourceAttributeDefinitionImpl)1