Search in sources :

Example 61 with ActivationStatusType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType in project midpoint by Evolveum.

the class ConnIdToMidPointConversion method convertEnable.

private void convertEnable(Attribute connIdAttr) throws SchemaException {
    Boolean enabled = getSingleValue(connIdAttr, Boolean.class);
    if (enabled == null) {
        return;
    }
    ActivationType activation = ShadowUtil.getOrCreateActivation(resourceObjectBean);
    ActivationStatusType activationStatus;
    if (enabled) {
        activationStatus = ActivationStatusType.ENABLED;
    } else {
        activationStatus = ActivationStatusType.DISABLED;
    }
    activation.setAdministrativeStatus(activationStatus);
    activation.setEffectiveStatus(activationStatus);
    LOGGER.trace("Converted activation administrativeStatus/effectiveStatus: {}", activationStatus);
}
Also used : ActivationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType) ActivationStatusType(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType)

Aggregations

ActivationStatusType (com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType)48 ActivationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType)43 Test (org.testng.annotations.Test)30 AbstractUnitTest (com.evolveum.midpoint.tools.testng.AbstractUnitTest)13 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)8 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)5 PrismObject (com.evolveum.midpoint.prism.PrismObject)4 ActivationStatusCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationStatusCapabilityType)4 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)3 TimeIntervalStatusType (com.evolveum.midpoint.xml.ns._public.common.common_3.TimeIntervalStatusType)3 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 AssignmentType (com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType)2 LockoutStatusType (com.evolveum.midpoint.xml.ns._public.common.common_3.LockoutStatusType)2 ActivationCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationCapabilityType)2 ArrayList (java.util.ArrayList)2 QName (javax.xml.namespace.QName)2 LensProjectionContext (com.evolveum.midpoint.model.impl.lens.LensProjectionContext)1 AbstractModelIntegrationTest (com.evolveum.midpoint.model.test.AbstractModelIntegrationTest)1 PrismPropertyValue (com.evolveum.midpoint.prism.PrismPropertyValue)1