Ejemplo n.º 1
0
 /**
  * Returns the User object for a given login
  *
  * @param userName
  * @param password
  * @return User
  */
 public User getUser(String userName, String password) {
   return blackboard.getUserBoard().getUserByMembershipUsernameAndPassword(userName, password);
 }
Ejemplo n.º 2
0
 /**
  * Returns true if the provided userName and password are correctly matched to a user in the
  * system with login credentials
  *
  * @param userName
  * @param password
  * @return
  */
 public boolean authenticate(String userName, String password) {
   return blackboard.getMembershipBoard().authenticate(userName, password);
 }
Ejemplo n.º 3
0
 /**
  * Creates a new membershipUser in the system. Users created in this manner may login to the
  * system.
  *
  * @param userName
  * @param password
  * @return
  */
 public int registerMember(String userName, String password) {
   blackboard.startTransaction();
   int membershipId = blackboard.getMembershipBoard().registerMember(userName, password);
   blackboard.commitTransaction();
   return membershipId;
 }
Ejemplo n.º 4
0
 /**
  * Default public contructor. A Blackboard instance will be created using {@link Blackboard
  * blackboards} default constructor.
  */
 public Membership() {
   blackboard = new Blackboard();
   blackboard.load();
 }