Search in sources :

Example 16 with RestartResponseException

use of org.apache.wicket.RestartResponseException in project midpoint by Evolveum.

the class PageAuthenticationBase method initResetCredentialsConfiguration.

private void initResetCredentialsConfiguration() {
    // TODO: cleanup, the same as in the PageRegistrationBase
    SecurityPolicyType securityPolicy = resolveSecurityPolicy();
    this.resetPasswordPolicy = new ResetPolicyDto();
    try {
        this.resetPasswordPolicy.initResetPolicyDto(securityPolicy);
    } catch (SchemaException e) {
        LOGGER.error("Failed to initialize self registration configuration.", e);
        getSession().error(createStringResource("PageSelfRegistration.selfRegistration.configuration.init.failed").getString());
        throw new RestartResponseException(PageLogin.class);
    }
}
Also used : RestartResponseException(org.apache.wicket.RestartResponseException) ResetPolicyDto(com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Example 17 with RestartResponseException

use of org.apache.wicket.RestartResponseException in project midpoint by Evolveum.

the class PageAuthenticationBase method initPostAuthenticationConfiguration.

private void initPostAuthenticationConfiguration() {
    SecurityPolicyType securityPolicy = resolveSecurityPolicy();
    this.postAuthenticationDto = new SelfRegistrationDto();
    try {
        this.postAuthenticationDto.initPostAuthenticationDto(securityPolicy);
    } catch (SchemaException e) {
        LOGGER.error("Failed to initialize self registration configuration.", e);
        getSession().error(createStringResource("PageSelfRegistration.selfRegistration.configuration.init.failed").getString());
        throw new RestartResponseException(PageLogin.class);
    }
}
Also used : RestartResponseException(org.apache.wicket.RestartResponseException) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Example 18 with RestartResponseException

use of org.apache.wicket.RestartResponseException in project midpoint by Evolveum.

the class PageAuthenticationBase method resolveSecurityPolicy.

private SecurityPolicyType resolveSecurityPolicy() {
    SecurityPolicyType securityPolicy = resolveSecurityPolicy(null);
    if (securityPolicy == null) {
        LOGGER.error("No security policy defined.");
        getSession().error(createStringResource("PageSelfRegistration.securityPolicy.notFound").getString());
        throw new RestartResponseException(PageLogin.class);
    }
    return securityPolicy;
}
Also used : RestartResponseException(org.apache.wicket.RestartResponseException) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Example 19 with RestartResponseException

use of org.apache.wicket.RestartResponseException in project midpoint by Evolveum.

the class PageRegistrationBase method resolveSecurityPolicy.

private SecurityPolicyType resolveSecurityPolicy() {
    SecurityPolicyType securityPolicy = resolveSecurityPolicy(null);
    if (securityPolicy == null) {
        LOGGER.error("No security policy defined.");
        getSession().error(createStringResource("PageSelfRegistration.securityPolicy.notFound").getString());
        throw new RestartResponseException(PageLogin.class);
    }
    return securityPolicy;
}
Also used : RestartResponseException(org.apache.wicket.RestartResponseException) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Example 20 with RestartResponseException

use of org.apache.wicket.RestartResponseException in project midpoint by Evolveum.

the class PageRegistrationBase method initSelfRegistrationConfiguration.

private void initSelfRegistrationConfiguration() {
    SecurityPolicyType securityPolicy = resolveSecurityPolicy();
    this.selfRegistrationDto = new SelfRegistrationDto();
    try {
        this.selfRegistrationDto.initSelfRegistrationDto(securityPolicy);
    } catch (SchemaException e) {
        LOGGER.error("Failed to initialize self registration configuration.", e);
        getSession().error(createStringResource("PageSelfRegistration.selfRegistration.configuration.init.failed").getString());
        throw new RestartResponseException(PageLogin.class);
    }
}
Also used : SchemaException(com.evolveum.midpoint.util.exception.SchemaException) RestartResponseException(org.apache.wicket.RestartResponseException) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Aggregations

RestartResponseException (org.apache.wicket.RestartResponseException)73 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)36 Task (com.evolveum.midpoint.task.api.Task)27 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)20 ArrayList (java.util.ArrayList)10 PrismObject (com.evolveum.midpoint.prism.PrismObject)8 CommonException (com.evolveum.midpoint.util.exception.CommonException)8 SecurityPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)8 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)6 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)6 WrapperContext (com.evolveum.midpoint.gui.api.factory.wrapper.WrapperContext)5 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)5 MidPointPrincipal (com.evolveum.midpoint.security.api.MidPointPrincipal)5 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)5 PageError (com.evolveum.midpoint.web.page.error.PageError)5 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)4 Collection (java.util.Collection)4 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)4 IModel (org.apache.wicket.model.IModel)4 StringValue (org.apache.wicket.util.string.StringValue)4