Package edu.uga.galileo.voci.exception

Examples of edu.uga.galileo.voci.exception.NoUserRolesException


  public String getRolesByUserId(int userId) throws NoUserRolesException {
    String roleNames = "";
    try {
      roleNames = rdao.getUserRoleNames(userId);
    } catch (NoUserRolesException ex) {
      throw new NoUserRolesException(
          "\n\n System couldn't retrieve list of roles for user -> userId: "
              + userId);
    }

    return roleNames;
View Full Code Here


      Configuration.getConnectionPool().executeQuery(qp);
      roleList = qp.getResults(String.class, "name");
     
      if( roleList == null )
      {
        throw new NoUserRolesException("Database errors prevented retrieval of role names for user");
      }
     
      for( int i = 0; i < qp.getResultCount(); i++)
      {
        ArrayList results = qp.getRowResults(i);
        userRoles.append( results.get(0).toString() + " (" + results.get(1).toString() + ")|" );       
      }
      /*for( String role: roleList )
      {
        userRoles.append( role + "|" );
      }*/
     
      roleNames = userRoles.toString();
      // get rid of last pipe
      roleNames = roleNames.substring( 0, roleNames.lastIndexOf("|") )
      Logger.debug("\n\n role names pipe del after last pipe removed:  " + roleNames + "\n\n");
    }
    catch(SQLException ex)
    {
      Logger.error("\n\n Database errors prevented retrieval of role names for user", ex);
      throw new NoUserRolesException("Database errors prevented retrieval of role names for user");
    }
    catch(DataTypeMismatchException dtmmex)
    {
      Logger.debug("\n\n data type mismatch exception occurred trying to retrieve role names for user - PSQLRoleDAO.getUserRoleNames \n");
    }
View Full Code Here

TOP

Related Classes of edu.uga.galileo.voci.exception.NoUserRolesException

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.