package ch.sahits;
/**
* This interface provides the functionality that is provided through
* the webservice:
* <ul>
* <li>Check the database for a username password combination</li>
* <li>Add a new record to the database</li>
* <li>Generate a new password and send it per email</li>
* </ul>
* To help the functionality of an implementing class the following two
* methods should be implemented as well:<br>
* <code>private String generateNewPassword(String userName, String email)</code><br>
* <code>private String generateNewPassword(String email)</code>
*/
public interface Taz {
/**
* Check the login request based on the username password combination
* @param userName username
* @param password password
* @return true if the combination is valid
*/
public boolean checkLoginRequest(String userName, String password);
/**
* Generate a new password and send it per email. The parameter userName is optional
* and if supplied is used to check against the email address
* @param email email
* @param userName optional username
*/
public void sendMailWithNewPassword(String email,String userName);
/**
* Add a new entry to the database
* @param codeExt
* @param text
* @param sort
* @param status
* @param isOriginalAntC
* @return null if the entry could be added succesfully an error message otherwise
*/
public String addEntry(String codeExt, String text, long sort, String status, String isOriginalAntC);
}