Package edu.wpi.cs.wpisuitetng.exceptions

Examples of edu.wpi.cs.wpisuitetng.exceptions.SessionException


    // get a copy of the session so we can touch projects.
    Session current = this.getSession(sessionId);
    if(current == null)
    {
      logger.log(Level.WARNING, "Project Session switch attempted with invalid SSID");
      throw new SessionException("Session matching the givenId does not exist");
    }
   
    User u = current.getUser();
   
    // find the project
    ManagerLayer manager = ManagerLayer.getInstance();
    ProjectManager projects = manager.getProjects();
    Project p = null;
   
    try
    {
      p = projects.getEntityByName(current, projectName)[0];
   
      if(p == null)
      {
        throw new NotFoundException("Could not find project with given name to switch to.");
      }
    }
    catch(NotFoundException e)
    {
      logger.log(Level.WARNING, "Project Session switch attempted with nonexistent project");
      throw new SessionException("Session-project switch failed because requested project does not exist.");
    }
   
    this.removeSession(sessionId);
   
    logger.log(Level.INFO, "User Project Session Switch successful!");
View Full Code Here

TOP

Related Classes of edu.wpi.cs.wpisuitetng.exceptions.SessionException

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.