package org.bodington.server.realm;

import java.util.Calendar;

import org.bodington.database.PrimaryKey;
import org.bodington.server.BuildingServerException;
import org.bodington.server.BuildingSession;

public interface UserAdminSession extends BuildingSession
{
    /**
     * Attempt to create a new user.
     * @param fullname The display name of the user. Is used when displaying the user.
     * Eg: Dave Johnson.
     * @param initials The initals of the user. Eg: D
     * @param surname The surname of the user. Often used for sorting. Eg: Johnson.
     * @return The created user.
     * @throws BuildingServerException If there was a problem creating the user.
     */
    public User addUser(String fullname, String initials, String surname)
    throws BuildingServerException;
    
    public void updateUser(PrimaryKey userId, String fullname, String initals, String surname)
    throws BuildingServerException;
    
    public void setUserDetail(PrimaryKey userId, Calendar dob, String email)
    throws BuildingServerException;
    
    public void setLogin(PrimaryKey userId, String username, String password)
    throws BuildingServerException;
    
    public void setWebAuthUsername(PrimaryKey userId, String username)
    throws BuildingServerException;
    
    public void addAlias(PrimaryKey userId, Alias type, String alias)
    throws BuildingServerException;
    
    public void removeAlias(PrimaryKey userId, Alias type, String alias)
    throws BuildingServerException;
    
    

}
