Search in sources :

Example 11 with ScimType

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

the class ExternalScimService method executeScimPostCreateUserMethod.

public boolean executeScimPostCreateUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
    try {
        if (executeExternalGetApiVersion(customScriptConfiguration) < 2)
            return true;
        log.debug("Executing python 'SCIM Post Create User' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.postCreateUser(user, configurationAttributes);
        log.debug("executeScimPostCreateUserMethod 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 12 with ScimType

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

the class ExternalScimService method executeScimPostDeleteUserMethod.

public boolean executeScimPostDeleteUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
    try {
        if (executeExternalGetApiVersion(customScriptConfiguration) < 2)
            return true;
        log.debug("Executing python 'SCIM Post Delete User' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.postDeleteUser(user, configurationAttributes);
        log.debug("executeScimPostDeleteUserMethod 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