String activatedVaadinUIs = env.getProperty(CDM_VAADIN_UI_ACTIVATED);
if(activatedVaadinUIs == null){
// not in environment? Read it from the config file!
- activatedVaadinUIs = appConfig.getProperty(configFile , CDM_VAADIN_UI_ACTIVATED);
+ activatedVaadinUIs = appConfig.getProperty(configFile, CDM_VAADIN_UI_ACTIVATED);
} else {
logger.warn("Active UIs are defined via system properties -D" + CDM_VAADIN_UI_ACTIVATED + "=" + activatedVaadinUIs + " ignoring config file." );
}
logger.debug("UserAccountAction.REGISTER_ACCOUNT for " + servletBaseUrl + ", emailAddress:" + emailAddress);
CountDownLatch finshedSignal = new CountDownLatch(1);
- List<Throwable> asyncException = new ArrayList<>(1);
- ListenableFuture<Boolean> futureResult = repo.getAccountRegistrationService().emailAccountRegistrationRequest(emailAddress,
- servletBaseUrl.toString() + "/app/" + UserAccountSelfManagementUI.NAME + "#!" + AccountRegistrationViewBean.NAME + "/%s");
+ List<Throwable> asyncExceptions = new ArrayList<>(1);
+ String passwordRequestFormUrlTemplate = servletBaseUrl.toString() + "/app/" + UserAccountSelfManagementUI.NAME + "#!" + AccountRegistrationViewBean.NAME + "/%s";
+ ListenableFuture<Boolean> futureResult = repo.getAccountRegistrationService()
+ .emailAccountRegistrationRequest(emailAddress, passwordRequestFormUrlTemplate);
futureResult.addCallback(
successFuture -> {
finshedSignal.countDown();
},
exception -> {
// possible MailException
- asyncException.add(exception);
+ asyncExceptions.add(exception);
finshedSignal.countDown();
}
);
// than futureResult.addCallback( can be processed, the exception
// can not be caught asynchronously
// so we are adding all these exceptions here
- asyncException.add(e);
+ asyncExceptions.add(e);
}
- if(!asyncException.isEmpty()) {
+ if(!asyncExceptions.isEmpty()) {
getView().getLoginDialog().getRegisterMessageLabel()
- .setValue("Sending the account registration email to you has failed. Please try again later or contect the support in case this error persists.");
+ .setValue("Sending the account registration email to you has failed. Please try again later or contact the support in case this error persists.");
getView().getLoginDialog().getRegisterMessageLabel().setStyleName(ValoTheme.LABEL_FAILURE);
- asyncException.stream().forEach(e->{e.printStackTrace(); logger.error("Error when sending mail: ", e.getMessage());});
+ asyncExceptions.stream().forEach(e->{e.printStackTrace(); logger.error("Error when sending mail: ", e.getMessage());});
} else {
if(!asyncTimeout && result) {
getView().getLoginDialog().getRegisterMessageLabel().setValue("An email with with further instructions has been sent to you.");
}
}
}
-
}
*/
@SpringComponent
@Scope("prototype")
-public class TaxonNamePopupEditor extends AbstractCdmDTOPopupEditor<TaxonNameDTO, TaxonName, TaxonNameEditorPresenter>
- implements TaxonNamePopupEditorView{
+public class TaxonNamePopupEditor
+ extends AbstractCdmDTOPopupEditor<TaxonNameDTO, TaxonName, TaxonNameEditorPresenter>
+ implements TaxonNamePopupEditorView{
private static final long serialVersionUID = -7037436241474466359L;
-
private final static Logger logger = LogManager.getLogger();
private final static int GRID_COLS = 4;