X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjjobs%2Fbeans%2Fuser%2FJobsAdminUserWebRequestController.java;h=08ae18cd6a77dda96919654c589fab207ec25171;hb=986dd1b14ec9f2a549fccec5f09ca98b0b5fd0b5;hp=b7f42e40fead9d87b7e767eb6ad04a6aead99c06;hpb=3c7cd5562f315a596a6feae7b985feb2fc8834d0;p=jjobs-war.git diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java index b7f42e40..08ae18cd 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Roland Haeder + * Copyright (C) 2016, 2017 Roland Häder * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,49 +17,59 @@ package org.mxchange.jjobs.beans.user; import java.io.Serializable; -import java.util.List; -import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; /** * An interface for user beans *

- * @author Roland Haeder + * @author Roland Häder */ public interface JobsAdminUserWebRequestController extends Serializable { /** - * Tries to lookup user by given id number. If the user is not found or the - * account status is not CONFIRMED proper exceptions are thrown. + * Adds user instance to database by preparing a complete user instance and + * sending it to the EJB. The data set in the controller is being verified, + * e.g. if the user name or email address is not used yet. *

- * @param userId User id + * @return Redirect outcome + */ + String addUser (); + + /** + * Deletes given user account *

- * @return User instance + * @param user User instance to delete *

- * @throws UserNotFoundException If the user is not found + * @return Redirect outcome */ - User lookupUserById (final Long userId) throws UserNotFoundException; + String deleteUserData (final User user); /** - * All users + * Edits currently loaded user's data in database. *

- * @return A list of all public user profiles + * @return Redirect outcome */ - List allUsers (); + String editUserData (); /** - * Checks whether users are registered + * Locks selected user's account. This method makes sure that a lock reason + * is provided that th user later can read on login attempts. + *

+ * @param user User instance to be locked *

- * @return Whether users are registered + * @return Redirect outcome */ - boolean hasUsers (); + String lockUserAccount (final User user); /** - * Adds user instance to database by preparing a complete user instance and - * sending it to the EJB. The data set in the controller is being verified, - * e.g. if the user name or email address is not used yet. + * Unlocks selected user's account. This method makes sure that the account + * is locked. + *

+ * @param user User instance to be unlocked + *

+ * @return Redirect outcome */ - void addUser (); + String unlockUserAccount (final User user); /** * Getter for user name @@ -76,31 +86,73 @@ public interface JobsAdminUserWebRequestController extends Serializable { void setUserName (final String userName); /** - * Getter for unencrypted user password + * Getter for clear-text user password *

- * @return Unencrypted user password + * @return Clear-text user password */ String getUserPassword (); /** - * Setter for unencrypted user password + * Setter for clear-text user password *

- * @param userPassword Unencrypted user password + * @param userPassword Clear-text user password */ void setUserPassword (final String userPassword); /** - * Getter for unencrypted user password repeated + * Getter for clear-text user password repeated *

- * @return Unencrypted user password repeated + * @return Clear-text user password repeated */ String getUserPasswordRepeat (); /** - * Setter for unencrypted user password repeated + * Setter for clear-text user password repeated *

- * @param userPasswordRepeat Unencrypted user password repeated + * @param userPasswordRepeat Clear-text user password repeated */ void setUserPasswordRepeat (final String userPasswordRepeat); + /** + * Getter for flag if user needs to change password + *

+ * @return Flag if user needs to change password + */ + Boolean getUserMustChangePassword (); + + /** + * Setter for flag if user needs to change password + *

+ * @param userMustChangePassword Flag if user needs to change password + */ + void setUserMustChangePassword (final Boolean userMustChangePassword); + + /** + * Getter for user lock reason + *

+ * @return User lock reason + */ + String getUserLockReason (); + + /** + * Setter for user lock reason + *

+ * @param userLockReason User lock reason + */ + void setUserLockReason (final String userLockReason); + + /** + * Getter for user delete reason + *

+ * @return User delete reason + */ + String getUserDeleteReason (); + + /** + * Setter for user delete reason + *

+ * @param userDeleteReason User delete reason + */ + void setUserDeleteReason (final String userDeleteReason); + }