All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.jhonsapp.finaluser.service.PersonUserService Maven / Gradle / Ivy

The newest version!
package br.com.jhonsapp.finaluser.service;

import javax.ejb.Remote;

import br.com.jhonsapp.finaluser.domain.PersonUser;

/**
 * This interface describes the methods that all person user service classes,
 * from the same project, should have.
 * 
 * @param 
 *            Type of the object to be manipulated by the class.
 * 
 * @see UserService
 * 
 * @author Jhonathan Camacho
 * 
 */
@Remote
public interface PersonUserService extends UserService {

	/**
	 * Returns the android token through the user's email.
	 * 
	 * @param email
	 *            the user's email
	 * 
	 * @return the android token through the user's email.
	 */
	public String findAndroidToken(String email);

	/**
	 * Returns a user through user email.
	 * 
	 * @param email
	 *            the user's email
	 * 
	 * @return a user through user email.
	 */
	public T findUser(String email);

	public boolean validateLogin(String email, String password);

	/**
	 * Check if the user's password is valid.
	 * 
	 * @param password
	 *            the user's password
	 * 
	 * @return true if the password is valid and false otherwise.
	 */
	public boolean isPasswordValid(String password);

	/**
	 * Check if the code passed by parameter is the same as the user of the
	 * email also passed by parameter.
	 * 
	 * @param email
	 *            the user's email
	 * @param code
	 *            the user's code
	 * 
	 * @return True if the passed code is from the user who is the owner of the
	 *         email and false otherwise.
	 */
	public boolean canResetUserPassword(String email, String code);

	/**
	 * Updates the user's password.
	 * 
	 * @param user
	 *            user who will have the password updated.
	 */
	public void resetPassword(T user);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy