Package ca.carleton.gcrc.auth.common

Source Code of ca.carleton.gcrc.auth.common.UserRepositoryNull

package ca.carleton.gcrc.auth.common;

import ca.carleton.gcrc.auth.common.impl.UserImpl;
import ca.carleton.gcrc.auth.common.impl.UserRepositoryAbstract;

public class UserRepositoryNull extends UserRepositoryAbstract implements UserRepository {

  @Override
  public void destroy() {
  }

  @Override
  public User getDefaultUser() throws Exception {
    return new UserImpl();
  }

  @Override
  public User authenticate(String userame, String password) throws Exception {
    throw new Exception("Unable to authenticate in a null repository");
  }

  @Override
  public User userFromId(int id) throws Exception {
    throw new Exception("No user in a null repository");
  }
}
TOP

Related Classes of ca.carleton.gcrc.auth.common.UserRepositoryNull

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.