package org.mxchange.jusercore.model.email_address;
import java.io.Serializable;
+import java.util.List;
import javax.ejb.Remote;
-import org.mxchange.jusercore.model.user.User;
/**
* A remote interface for changing email addresses
@Remote
public interface EmailChangeSessionBeanRemote extends Serializable {
+ /**
+ * Checks whether given email address is already enqueued
+ * <p>
+ * @param emailAddress Email address to check
+ * <p>
+ * @return Whether the email address has already been enqueued
+ */
+ boolean isEmailAddressEnqueued (final String emailAddress);
+
+ /**
+ * Returns a list of all queued email addresses, not limited to a user
+ * <p>
+ * @return A list of all queued email addresses
+ */
+ List<String> allQueuedAddressesAsList ();
+
/**
* "Enqueues" given email change object
* <p>
- * @param emailChange User instance to update
+ * @param emailChange Email change instance to insert
*/
void enqueueEmailAddressForChange (final ChangeableEmailAddress emailChange);
/**
* Updates given user's email address.
* <p>
- * @param user User instance to update
+ * @param emailChange Email change instance to mark as used
*/
- void updateEmailAddress (final User user);
+ void updateEmailAddress (final ChangeableEmailAddress emailChange);
}
*/
boolean ifUserIdExists (final Long userId);
+ /**
+ * Checks if given user exists
+ * <p>
+ * @param user User to check
+ * <p>
+ * @return Whether the user exists
+ */
+ boolean ifUserExists (final User user);
+
/**
* Checks if the the given user's name is already registered
* <p>