Package com.ursu.server.dao

Examples of com.ursu.server.dao.UserDao


  @Override
  public CreateUserResult execute(CreateUser action, ExecutionContext context)
      throws ActionException {
    //This should reeeeaaaaaly be cleaned out
    UserDao dao = new UserDao();
   
    log.severe("\nReceived user:"+
          "\n Username: "+ action.getUserToCreate().getUsername()+
          "\n Recieved password: "+ action.getUserToCreate().getHashedPassword()+
          "\n Email: " +action.getUserToCreate().getEmail());
    String sessionId = null;
    String dataStoreId = null;
    User userToCreate = action.getUserToCreate();
   
    if(userToCreate == null )
    {
      log.severe("\nreturned because userToCreate was null!!!");
      return new CreateUserResult(sessionId, dataStoreId);
    }
    else {
      dataStoreId =  dao.createUser(userToCreate);
      log.severe("\n From dao.CreateUser(), the datastoreId is: " +dataStoreId);
      if (dataStoreId != null) {
        HttpSession session = requestProvider.get().getSession();
        session.setAttribute("login.authenticated", userToCreate.getUsername());
        sessionId = session.getId();
View Full Code Here


  }

  @Override
  public LoginResult execute(Login action, ExecutionContext context)
      throws ActionException {
    UserDao dao = new UserDao();
    CurrentUser result = null;
    HttpSession session = requestProvider.get().getSession();
   
      result = dao.loginUser(action.getUsername(), action.getPassword());
      if(result != null)
      {
     
     
      session.setAttribute("login.authenticated", action.getUsername());
View Full Code Here

TOP

Related Classes of com.ursu.server.dao.UserDao

Copyright © 2018 www.massapicom. 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.