Search in sources :

Example 6 with ItemWrapper

use of com.evolveum.midpoint.web.component.prism.ItemWrapper in project midpoint by Evolveum.

the class TestIntegrationObjectWrapperFactory method assertItemWrapperFullConrol.

private <C extends Containerable> void assertItemWrapperFullConrol(ContainerWrapper<C> containerWrapper, QName propName, boolean visible) {
    ItemWrapper itemWrapper = containerWrapper.findPropertyWrapper(propName);
    assertEquals("Wrong " + propName + " readOnly", Boolean.FALSE, (Boolean) itemWrapper.isReadonly());
    assertEquals("Wrong " + propName + " visible", visible, itemWrapper.isVisible());
    assertEquals("Wrong " + propName + " definition.canRead", Boolean.TRUE, (Boolean) itemWrapper.getItemDefinition().canRead());
    assertEquals("Wrong " + propName + " definition.canAdd", Boolean.TRUE, (Boolean) itemWrapper.getItemDefinition().canAdd());
    assertEquals("Wrong " + propName + " definition.canModify", Boolean.TRUE, (Boolean) itemWrapper.getItemDefinition().canModify());
}
Also used : ItemWrapper(com.evolveum.midpoint.web.component.prism.ItemWrapper)

Aggregations

ItemWrapper (com.evolveum.midpoint.web.component.prism.ItemWrapper)6 Task (com.evolveum.midpoint.task.api.Task)4 ObjectWrapperFactory (com.evolveum.midpoint.web.component.prism.ObjectWrapperFactory)4 Test (org.testng.annotations.Test)4 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)3 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)2 ValueWrapper (com.evolveum.midpoint.web.component.prism.ValueWrapper)2 ActivationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType)2 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)2 DummyGroup (com.evolveum.icf.dummy.resource.DummyGroup)1 ItemDefinition (com.evolveum.midpoint.prism.ItemDefinition)1 PrismContainerValue (com.evolveum.midpoint.prism.PrismContainerValue)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 AssociationWrapper (com.evolveum.midpoint.web.component.prism.AssociationWrapper)1 ContainerWrapper (com.evolveum.midpoint.web.component.prism.ContainerWrapper)1 ShadowAssociationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowAssociationType)1 ShadowAttributesType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowAttributesType)1 ShadowIdentifiersType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowIdentifiersType)1 QName (javax.xml.namespace.QName)1