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=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..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,165 +17,142 @@ 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; /** * An interface for user beans *
- * @author Roland Haeder
- * @param event User registration event
- */
- 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
+ * 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 event Event being fired
+ * @return Redirect outcome
*/
- void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event);
+ String addUser ();
/**
- * Checks whether the given contact is a user
+ * Deletes given user account
*
- * @param contact Contact to check
+ * @param user User instance to delete
*
- * @return Whether the contact is a user
+ * @return Redirect outcome
*/
- boolean isContactFound (final Contact contact);
+ String deleteUserData (final User user);
/**
- * Checks whether a public user account is registered. This means that at
- * least one user profile has its flag "public user profile" enabled.
+ * Edits currently loaded user's data in database.
*
- * @return Whether at least one user has a public profile
+ * @return Redirect outcome
*/
- boolean isVisibleUserFound ();
+ String editUserData ();
/**
- * Checks whether given user instance's name is used
+ * 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's name to check
+ * @param user User instance to be locked
*
- * @return Whether it is already used
+ * @return Redirect outcome
*/
- boolean isUserNameRegistered (final User user);
+ String lockUserAccount (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
+ * Unlocks selected user's account. This method makes sure that the account
+ * is locked.
*
- * @return User instance
+ * @param user User instance to be unlocked
*
- * @throws UserNotFoundException If the user is not found
+ * @return Redirect outcome
*/
- User lookupUserById (final Long userId) throws UserNotFoundException;
+ String unlockUserAccount (final User user);
/**
- * All users
+ * Getter for user name
*
- * @return A list of all public user profiles
+ * @return User name
*/
- List
- * @return A list of all public user profiles
+ * @param userName User name
*/
- List
- * @return Whether users are registered
+ * @return Clear-text user password
*/
- boolean hasUsers ();
+ String getUserPassword ();
/**
- * 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.
+ * Setter for clear-text user password
*
- * @return Redirect outcome
+ * @param userPassword Clear-text user password
*/
- String addUser ();
+ void setUserPassword (final String userPassword);
/**
- * Edits cuirrently loaded user's data in database.
+ * Getter for clear-text user password repeated
*
- * @return Redirect outcome
+ * @return Clear-text user password repeated
*/
- String editUserData ();
+ String getUserPasswordRepeat ();
/**
- * Getter for user name
+ * Setter for clear-text user password repeated
*
- * @return User name
+ * @param userPasswordRepeat Clear-text user password repeated
*/
- String getUserName ();
+ void setUserPasswordRepeat (final String userPasswordRepeat);
/**
- * Setter for user name
+ * Getter for flag if user needs to change password
*
- * @param userName User name
+ * @return Flag if user needs to change password
*/
- void setUserName (final String userName);
+ Boolean getUserMustChangePassword ();
/**
- * Getter for unencrypted user password
+ * Setter for flag if user needs to change password
*
- * @return Unencrypted user password
+ * @param userMustChangePassword Flag if user needs to change password
*/
- String getUserPassword ();
+ void setUserMustChangePassword (final Boolean userMustChangePassword);
/**
- * Setter for unencrypted user password
+ * Getter for user lock reason
*
- * @param userPassword Unencrypted user password
+ * @return User lock reason
*/
- void setUserPassword (final String userPassword);
+ String getUserLockReason ();
/**
- * Getter for unencrypted user password repeated
+ * Setter for user lock reason
*
- * @return Unencrypted user password repeated
+ * @param userLockReason User lock reason
*/
- String getUserPasswordRepeat ();
+ void setUserLockReason (final String userLockReason);
/**
- * Setter for unencrypted user password repeated
+ * Getter for user delete reason
*
- * @param userPasswordRepeat Unencrypted user password repeated
+ * @return User delete reason
*/
- void setUserPasswordRepeat (final String userPasswordRepeat);
+ String getUserDeleteReason ();
/**
- * Returns a list of all selectable contacts for user creation. Contacts
- * from already existing users are excluded in this list.
+ * Setter for user delete reason
*
- * @return A list of all selectable contacts
+ * @param userDeleteReason User delete reason
*/
- List