X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjjobs%2Fbeans%2Fuser%2FJobsAdminUserWebRequestController.java;h=fd466e4c5b722262f257f7c4b594ef0f7b89ffd8;hb=fe57297eeb81553d228fe9ee795992216479cdd2;hp=928235011647053334baa215b7ffae23c05c9f6e;hpb=84a67513898d5d8d524b34eced3ee81651445ad9;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 92823501..fd466e4c 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java @@ -17,12 +17,7 @@ package org.mxchange.jjobs.beans.user; import java.io.Serializable; -import java.util.List; -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; -import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent; -import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; /** @@ -40,93 +35,40 @@ public interface JobsAdminUserWebRequestController extends Serializable { void afterRegistrationEvent (final UserRegisteredEvent event); /** - * Event observer for logged-in user - *

- * @param event Event instance - */ - void afterUserLogin (final UserLoggedInEvent event); - - /** - * Listens to fired event when user updated personal data - *

- * @param event Event being fired - */ - void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event); - - /** - * Checks whether the given contact is a user - *

- * @param contact Contact to check - *

- * @return Whether the contact is a user - */ - boolean isContactFound (final Contact contact); - - /** - * Checks whether a public user account is registered. This means that at - * least one user profile has its flag "public user profile" enabled. - *

- * @return Whether at least one user has a public profile - */ - boolean isVisibleUserFound (); - - /** - * Checks whether given user instance's name is used - *

- * @param user User instance's name to check - *

- * @return Whether it is already used - */ - boolean isUserNameRegistered (final User user); - - /** - * 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. - *

- * @param userId User id - *

- * @return User instance - *

- * @throws UserNotFoundException If the user is not found - */ - User lookupUserById (final Long userId) throws UserNotFoundException; - - /** - * All users + * 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. *

- * @return A list of all public user profiles + * @return Redirect outcome */ - List allUsers (); + String addUser (); /** - * All public user profiles + * Edits cuirrently loaded user's data in database. *

- * @return A list of all public user profiles + * @return Redirect outcome */ - List allVisibleUsers (); + 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. *

- * @return Whether users are registered - */ - boolean hasUsers (); - - /** - * 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 user User instance to be locked *

* @return Redirect outcome */ - String addUser (); + String lockUserAccount (final User user); /** - * Edits cuirrently loaded user's data in database. + * Unlocks selected user's account. This method makes sure that the account + * is locked. + *

+ * @param user User instance to be unlocked *

* @return Redirect outcome */ - String editUserData (); + String unlockUserAccount (final User user); /** * Getter for user name @@ -171,11 +113,31 @@ public interface JobsAdminUserWebRequestController extends Serializable { void setUserPasswordRepeat (final String userPasswordRepeat); /** - * Returns a list of all selectable contacts for user creation. Contacts - * from already existing users are excluded in this list. + * 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 *

- * @return A list of all selectable contacts + * @param userLockReason User lock reason */ - List selectableContacts (); + void setUserLockReason (final String userLockReason); }