Search in sources :

Example 16 with GluuOrganization

use of org.gluu.oxtrust.model.GluuOrganization in project oxTrust by GluuFederation.

the class ApisConfigurationAction method save.

public String save() {
    GluuOrganization organization = organizationService.getOrganization();
    organization.setLinktrackEnabled(enableLinktrack);
    organization.setLinktrackLogin(linktrackLogin);
    organization.setLinktrackPassword(linktrackPassword);
    organizationService.updateOrganization(organization);
    return OxTrustConstants.RESULT_SUCCESS;
}
Also used : GluuOrganization(org.gluu.oxtrust.model.GluuOrganization)

Example 17 with GluuOrganization

use of org.gluu.oxtrust.model.GluuOrganization in project oxTrust by GluuFederation.

the class ApisConfigurationAction method init.

public String init() {
    GluuOrganization organization = organizationService.getOrganization();
    enableLinktrack = organization.getLinktrackEnabled();
    linktrackLogin = organization.getLinktrackLogin();
    linktrackPassword = organization.getLinktrackPassword();
    return OxTrustConstants.RESULT_SUCCESS;
}
Also used : GluuOrganization(org.gluu.oxtrust.model.GluuOrganization)

Example 18 with GluuOrganization

use of org.gluu.oxtrust.model.GluuOrganization in project oxTrust by GluuFederation.

the class RegistrationInterceptionService method runInitRegistrationScripts.

public boolean runInitRegistrationScripts(GluuCustomPerson person, Map<String, String[]> requestParameters) {
    GluuOrganization org = organizationService.getOrganization();
    RegistrationConfiguration config = org.getOxRegistrationConfiguration();
    if (config != null && config.isRegistrationInterceptorsConfigured()) {
        List<RegistrationInterceptorScript> scripts = config.getRegistrationInterceptorScripts();
        List<RegistrationInterceptorScript> sortedEnabledInitRegistrationScripts = sort(getActive(getInitRegistrationScripts(scripts)));
        if (sortedEnabledInitRegistrationScripts != null) {
            boolean result = true;
            for (RegistrationInterceptorScript script : sortedEnabledInitRegistrationScripts) {
                RegistrationScript registrationScript = createRegistrationScriptFromStringWithPythonException(script);
                result &= registrationScript.execute(script.getCustomAttributes(), person, requestParameters);
            }
            return result;
        } else {
            return true;
        }
    } else {
        return true;
    }
}
Also used : RegistrationScript(org.gluu.oxtrust.service.python.interfaces.RegistrationScript) RegistrationInterceptorScript(org.gluu.oxtrust.model.RegistrationInterceptorScript) RegistrationConfiguration(org.gluu.oxtrust.model.RegistrationConfiguration) GluuOrganization(org.gluu.oxtrust.model.GluuOrganization)

Aggregations

GluuOrganization (org.gluu.oxtrust.model.GluuOrganization)18 RegistrationConfiguration (org.gluu.oxtrust.model.RegistrationConfiguration)7 ArrayList (java.util.ArrayList)4 RegistrationInterceptorScript (org.gluu.oxtrust.model.RegistrationInterceptorScript)4 IOException (java.io.IOException)3 RegistrationScript (org.gluu.oxtrust.service.python.interfaces.RegistrationScript)3 GluuAttribute (org.xdi.model.GluuAttribute)3 File (java.io.File)2 InputStream (java.io.InputStream)2 OutputStream (java.io.OutputStream)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 GluuImage (org.xdi.model.GluuImage)2 DownloadWrapper (org.xdi.util.io.DownloadWrapper)2 ParseException (java.text.ParseException)1 HashSet (java.util.HashSet)1 AuthenticationFailedException (javax.mail.AuthenticationFailedException)1 MessagingException (javax.mail.MessagingException)1 ServletException (javax.servlet.ServletException)1