Search in sources :

Example 1 with ConfirmationNotifierType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConfirmationNotifierType in project midpoint by Evolveum.

the class ConfirmationNotifier method createConfirmationLink.

protected String createConfirmationLink(UserType userType, GeneralNotifierType generalNotifierType, OperationResult result) {
    ConfirmationNotifierType userRegistrationNotifier = (ConfirmationNotifierType) generalNotifierType;
    RegistrationConfirmationMethodType confirmationMethod = userRegistrationNotifier.getConfirmationMethod();
    if (confirmationMethod == null) {
        return null;
    }
    ExpressionEnvironment expressionEnv = new ExpressionEnvironment();
    expressionEnv.setCurrentResult(result);
    ModelExpressionThreadLocalHolder.pushExpressionEnvironment(expressionEnv);
    try {
        switch(confirmationMethod) {
            case LINK:
                //				SystemConfigurationType systemConfiguration = notificationsUtil.getSystemConfiguration(result);
                //				if (systemConfiguration == null) {
                //					LOGGER.trace("No system configuration defined. Skipping link generation.");
                //					return null;
                //				}
                ////				String defaultHostname = SystemConfigurationTypeUtil.getDefaultHostname(systemConfiguration);
                String confirmationLink = getConfirmationLink(userType);
                return confirmationLink;
            case PIN:
                throw new UnsupportedOperationException("PIN confirmation not supported yes");
            //				return getNonce(userType);
            default:
                break;
        }
    } finally {
        ModelExpressionThreadLocalHolder.popExpressionEnvironment();
    }
    return null;
}
Also used : ExpressionEnvironment(com.evolveum.midpoint.model.impl.expr.ExpressionEnvironment) RegistrationConfirmationMethodType(com.evolveum.midpoint.xml.ns._public.common.common_3.RegistrationConfirmationMethodType) ConfirmationNotifierType(com.evolveum.midpoint.xml.ns._public.common.common_3.ConfirmationNotifierType)

Aggregations

ExpressionEnvironment (com.evolveum.midpoint.model.impl.expr.ExpressionEnvironment)1 ConfirmationNotifierType (com.evolveum.midpoint.xml.ns._public.common.common_3.ConfirmationNotifierType)1 RegistrationConfirmationMethodType (com.evolveum.midpoint.xml.ns._public.common.common_3.RegistrationConfirmationMethodType)1