Search in sources :

Example 1 with UpdateUserType

use of org.xdi.model.custom.script.type.user.UpdateUserType in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalUpdateUserMethod.

public boolean executeExternalUpdateUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, boolean persisted) {
    try {
        log.debug("Executing python 'updateUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.updateUser(user, persisted, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Example 2 with UpdateUserType

use of org.xdi.model.custom.script.type.user.UpdateUserType in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalAddUserMethod.

public boolean executeExternalAddUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, boolean persisted) {
    try {
        log.debug("Executing python 'addUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.addUser(user, persisted, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Example 3 with UpdateUserType

use of org.xdi.model.custom.script.type.user.UpdateUserType in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalNewUserMethod.

public boolean executeExternalNewUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user) {
    try {
        log.debug("Executing python 'newUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.newUser(user, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Example 4 with UpdateUserType

use of org.xdi.model.custom.script.type.user.UpdateUserType in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalDeleteUserMethod.

public boolean executeExternalDeleteUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, boolean persisted) {
    try {
        log.debug("Executing python 'addUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.deleteUser(user, persisted, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Aggregations

SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)4 UpdateUserType (org.xdi.model.custom.script.type.user.UpdateUserType)4