use of com.evolveum.midpoint.xml.ns._public.common.common_3.RegistrationConfirmationMethodType 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;
}
Aggregations