From 378de3a34fd2ea1b3732eb9888838cd315865c1c Mon Sep 17 00:00:00 2001 From: Benjamin Barth Date: Wed, 3 Feb 2016 17:48:12 +0100 Subject: [PATCH] Added JavaDoc to AuthenticationManagerImpl class and ErrorMessageView interface --- .../AuthenticationManagerImpl.java | 16 ++++++++++++---- .../ui/authentication/ErrorMessageView.java | 11 ++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java index 1cb34706d9f..7f8bcc71ee3 100644 --- a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java +++ b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java @@ -17,6 +17,14 @@ import com.sap.sse.security.ui.client.i18n.StringMessages; import com.sap.sse.security.ui.shared.SuccessInfo; import com.sap.sse.security.ui.shared.UserDTO; +/** + * Default implementation of {@link AuthenticationManager} interface, which delegates to the respective methods of + * {@link UserService} or {@link UserManagementServiceAsync} provided in via constructors. Failure handling is implemented + * by showing an appropriate error message using the browser's default dialog box via {@link Window#alert(String)}. + * + * @see #AuthenticationManagerImpl(WithSecurity, EventBus, String, String) + * @see #AuthenticationManagerImpl(UserService, EventBus, String, String) + */ public class AuthenticationManagerImpl implements AuthenticationManager { private final UserManagementServiceAsync userManagementService; @@ -37,9 +45,9 @@ public class AuthenticationManagerImpl implements AuthenticationManager { * @param eventBus * the {@link EventBus} instance * @param emailConfirmationUrl - * URL with is send to users to verify their email address + * URL which is send to users to verify their email address * @param passwordResetUrl - * URL with is send to users to reset their password + * URL which is send to users to reset their password */ public AuthenticationManagerImpl(WithSecurity clientFactory, EventBus eventBus, String emailConfirmationUrl, String passwordResetUrl) { @@ -56,9 +64,9 @@ public class AuthenticationManagerImpl implements AuthenticationManager { * @param eventBus * the {@link EventBus} instance * @param emailConfirmationUrl - * URL with is send to users to verify their email address + * URL which is send to users to verify their email address * @param passwordResetUrl - * URL with is send to users to reset their password + * URL which is send to users to reset their password */ public AuthenticationManagerImpl(UserService userService, EventBus eventBus, String emailConfirmationUrl, String passwordResetUrl) { diff --git a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/ErrorMessageView.java b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/ErrorMessageView.java index f0aa4e1fa67..5379e07ddbd 100644 --- a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/ErrorMessageView.java +++ b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/ErrorMessageView.java @@ -1,7 +1,16 @@ package com.sap.sse.security.ui.authentication; +/** + * Interface for a view showing and error message. + */ public interface ErrorMessageView { - + + /** + * Show the given error message + * + * @param errorMessage + * the error message to show + */ void setErrorMessage(String errorMessage); }