/*
 * The MIT License
 *
 * Copyright (c) 2016 Marcelo "Ataxexe" Guimarães <ataxexe@devnull.tools>
 *
 * Permission  is hereby granted, free of charge, to any person obtaining
 * a  copy  of  this  software  and  associated  documentation files (the
 * "Software"),  to  deal  in the Software without restriction, including
 * without  limitation  the  rights to use, copy, modify, merge, publish,
 * distribute,  sublicense,  and/or  sell  copies of the Software, and to
 * permit  persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * The  above  copyright  notice  and  this  permission  notice  shall be
 * included  in  all  copies  or  substantial  portions  of the Software.
 *
 * THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY OF ANY KIND,
 * EXPRESS  OR  IMPLIED,  INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN  NO  EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM,  DAMAGES  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT  OR  OTHERWISE,  ARISING  FROM,  OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE   OR   THE   USE   OR   OTHER   DEALINGS  IN  THE  SOFTWARE.
 */

package tools.devnull.boteco.plugins.user;

import tools.devnull.boteco.MessageLocation;
import tools.devnull.boteco.user.User;

public interface UserRepository {

  User find(MessageLocation destination);

  User find(String userId);

  User create(String userId, MessageLocation primaryDestination);

  void update(User user);

}

@@ -1374,181 +1374,890 @@
 r;%0A%0A
-public interface UserRepository %7B%0A%0A  User find(MessageLocation destination);%0A%0A  User find(String userId);%0A%0A  User create(String userId, MessageLocation primaryDestination);%0A
+/**%0A * Interface that represents a repository of User objects.%0A *%0A * @author Marcelo %22Ataxexe%22 Guimar%C3%A3es%0A */%0Apublic interface UserRepository %7B%0A%0A  /**%0A   * Finds the user associated with the given message location%0A   *%0A   * @param location the location%0A   * @return the user associated with the given location%0A   */%0A  User find(MessageLocation location);%0A%0A  /**%0A   * Finds the user associated with the given id%0A   *%0A   * @param userId the id of the user%0A   * @return the user associated with the given id%0A   */%0A  User find(String userId);%0A%0A  /**%0A   * Creates a new user and associates it with the given location%0A   *%0A   * @param userId   the user id%0A   * @param location the message location%0A   * @return the created user%0A   */%0A  User create(String userId, MessageLocation location);%0A%0A  /**%0A   * Updates the given user in the repository%0A   *%0A   * @param user the user to update%0A   */
 %0A  v

add docs