package org.rmatil.sync.network.api;

import org.rmatil.sync.network.core.model.NodeLocation;
import org.rmatil.sync.persistence.exceptions.InputOutputException;

public interface IUserManager {

    boolean isRegistered(String username)
            throws InputOutputException;

    boolean login(IUser user, NodeLocation nodeLocation);

    boolean logout(IUser user, NodeLocation nodeLocation);

}
@@ -160,183 +160,1328 @@
 n;%0A%0A
-public interface IUserManager %7B%0A%0A    boolean isRegistered(String username)%0A            throws InputOutputException;%0A%0A    boolean login(IUser user, NodeLocation nodeLocation);%0A
+/**%0A * A manager abstracting the tasks%0A * to log users in or out and to check%0A * whether an user is already registered%0A */%0Apublic interface IUserManager %7B%0A%0A    /**%0A     * Checks whether the user with%0A     * the given user name is already registered%0A     *%0A     * @param username The username to check%0A     *%0A     * @return True, if not registered yet, false otherwise%0A     *%0A     * @throws InputOutputException If connecting to the storage layer fails%0A     */%0A    boolean isRegistered(String username)%0A            throws InputOutputException;%0A%0A    /**%0A     * Logs the given user in and adds the specified%0A     * node location to the list of connected clients.%0A     * Furthermore, the private and the public key as well as the%0A     * salt are added to the storage layer.%0A     *%0A     * @param user         The user to login%0A     * @param nodeLocation The node location of the user%0A     *%0A     * @return True, if login was successful, false otherwise%0A     */%0A    boolean login(IUser user, NodeLocation nodeLocation);%0A%0A    /**%0A     * Logs the given user out and removes the specified%0A     * node location from the list of connected nodes.%0A     *%0A     * @param user         The user to logout%0A     * @param nodeLocation The node location to remove%0A     *%0A     * @return True, if logout was successful, false otherwise%0A     */
 %0A   

Add documentation