//# 0 errors, 18 messages
//#
package net.sourceforge.pebble.security;
    //#securityrealm.java:1:1: class: net.sourceforge.pebble.security.SecurityRealm
    //#securityrealm.java:1:1: method: net.sourceforge.pebble.security.SecurityRealm.net.sourceforge.pebble.security.SecurityRealm__static_init

import java.util.Collection;

/**
 * Represents a security realm with some basic operations.
 *
 * @author    Simon Brown
 */
public interface SecurityRealm {

  /**
   * Looks up and returns a collection of all users.
   *
   * @return  a Collection of PebbleUserDetails objects
   */
  public Collection<PebbleUserDetails> getUsers() throws SecurityRealmException;

  /**
   * Looks up and returns user details for the given username.
   *
   * @param username    the username to find details for
   * @return  a PebbleUserDetails instance
   */
  public PebbleUserDetails getUser(String username) throws SecurityRealmException;

  /**
   * Creates a new user.
   *
   * @param pud   a PebbleUserDetails instance
   */
  public void createUser(PebbleUserDetails pud) throws SecurityRealmException;

  /**
   * Updates user details, except for the password
   *
   * @param pud   a PebbleUserDetails instance
   */
  public void updateUser(PebbleUserDetails pud) throws SecurityRealmException;

  /**
   * Changes a user's password.
   *
   * @param username    the username of the user
   * @param password    the new password
   * @throws SecurityRealmException
   */
  public void changePassword(String username, String password) throws SecurityRealmException;

  /**
   * Removes user details for the given username.
   *
   * @param username    the username of the user to remove
   */
  public void removeUser(String username) throws SecurityRealmException;

}    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Descendant_Table[net/sourceforge/pebble/security/SecurityRealm]
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.changePassword(Ljava/lang/String;Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.createUser(Lnet/sourceforge/pebble/security/PebbleUserDetails;)V
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails;
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.getUsers()Ljava/util/Collection;
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.removeUser(Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.updateUser(Lnet/sourceforge/pebble/security/PebbleUserDetails;)V
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Descendant_Table[net/sourceforge/pebble/security/SecurityRealm] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.changePassword(Ljava/lang/String;Ljava/lang/String;)V == &changePassword
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.createUser(Lnet/sourceforge/pebble/security/PebbleUserDetails;)V == &createUser
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.getUser(Ljava/lang/String;)Lnet/sourceforge/pebble/security/PebbleUserDetails; == &getUser
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.getUsers()Ljava/util/Collection; == &getUsers
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.removeUser(Ljava/lang/String;)V == &removeUser
    //#post(net.sourceforge.pebble.security.SecurityRealm__static_init): __Dispatch_Table.updateUser(Lnet/sourceforge/pebble/security/PebbleUserDetails;)V == &updateUser
    //#securityrealm.java:: end of method: net.sourceforge.pebble.security.SecurityRealm.net.sourceforge.pebble.security.SecurityRealm__static_init
    //#securityrealm.java:: end of class: net.sourceforge.pebble.security.SecurityRealm
