Search in sources :

Example 6 with ScimType

use of org.xdi.model.custom.script.type.scim.ScimType in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimPostUpdateGroupMethod.

public boolean executeScimPostUpdateGroupMethod(GluuGroup group, CustomScriptConfiguration customScriptConfiguration) {
    try {
        if (executeExternalGetApiVersion(customScriptConfiguration) < 2)
            return true;
        log.debug("Executing python 'SCIM Post Update Group' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.postUpdateGroup(group, configurationAttributes);
        log.debug("executeScimPostUpdateGroupMethod result = " + result);
        return result;
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        saveScriptError(customScriptConfiguration.getCustomScript(), e);
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 7 with ScimType

use of org.xdi.model.custom.script.type.scim.ScimType in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimCreateGroupMethod.

public boolean executeScimCreateGroupMethod(GluuGroup group, CustomScriptConfiguration customScriptConfiguration) {
    try {
        log.debug("Executing python 'SCIM Create Group' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.createGroup(group, configurationAttributes);
        log.debug("executeScimCreateGroupMethod result = " + result);
        return result;
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        saveScriptError(customScriptConfiguration.getCustomScript(), e);
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 8 with ScimType

use of org.xdi.model.custom.script.type.scim.ScimType in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimPostUpdateUserMethod.

public boolean executeScimPostUpdateUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
    try {
        if (executeExternalGetApiVersion(customScriptConfiguration) < 2)
            return true;
        log.debug("Executing python 'SCIM Post Update User' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.postUpdateUser(user, configurationAttributes);
        log.debug("executeScimPostUpdateUserMethod result = " + result);
        return result;
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        saveScriptError(customScriptConfiguration.getCustomScript(), e);
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 9 with ScimType

use of org.xdi.model.custom.script.type.scim.ScimType in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimUpdateGroupMethod.

public boolean executeScimUpdateGroupMethod(GluuGroup group, CustomScriptConfiguration customScriptConfiguration) {
    try {
        log.debug("Executing python 'SCIM Update Group' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.updateGroup(group, configurationAttributes);
        log.debug("executeScimUpdateGroupMethod result = " + result);
        return result;
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        saveScriptError(customScriptConfiguration.getCustomScript(), e);
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 10 with ScimType

use of org.xdi.model.custom.script.type.scim.ScimType in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimUpdateUserMethod.

public boolean executeScimUpdateUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
    try {
        log.debug("Executing python 'SCIM Update User' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.updateUser(user, configurationAttributes);
        log.debug("executeScimUpdateUserMethod result = " + result);
        return result;
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        saveScriptError(customScriptConfiguration.getCustomScript(), e);
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Aggregations

SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)12 ScimType (org.xdi.model.custom.script.type.scim.ScimType)12