Package edu.uga.galileo.voci.exception

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


    try {
      rdao.addRole2User(user);
    } catch (RoleUpdateAddException ruaex) {
      Logger.debug("Couldn't add role for user : " + user.getUserName(),
          ruaex);
      throw new RoleUpdateAddException("Couldn't add role for user : "
          + user.getUserName());
    }

  }// end addRole2User()
View Full Code Here


    try {
      rdao.updateRole2User(user);
    } catch (RoleUpdateAddException ruaex) {
      Logger.debug("Couldn't update role for user : "
          + user.getUserName(), ruaex);
      throw new RoleUpdateAddException("Couldn't update role for user : "
          + user.getUserName());
    }

  }// end updateRole2User()
View Full Code Here

      alm.addRecord(project.getProjectId(), ContentType.ROLE, role
          .getRoleId(), sessionUser.getUserName(), auditLogText);
    } catch (RoleUpdateAddException noRoleEx) {
      Logger.warn("\n System failed to update role...(role name :=  "
          + role.getName() + " ) \n", noRoleEx);
      throw new RoleUpdateAddException(
          "System failed to update role -> roleId ( "
              + role.getRoleId() + ")");
    }

  }// end updateRole()
View Full Code Here

          .getRoleId(), user.getUserName(), "{created}");
    } catch (RoleUpdateAddException noRoleEx) {
      Logger.error(
          "\n System failed to add top level role...(role name :=  "
              + role.getName() + " ) \n", noRoleEx);
      throw new RoleUpdateAddException(
          "System failed to add top level role -> roleId ( "
              + role.getRoleId() + ")");
    }

  }// end addTopLevelRole()
View Full Code Here

      alm.addRecord(role.getProjectId(), ContentType.ROLE, role
          .getRoleId(), user.getUserName(), "{created}");
    } catch (RoleUpdateAddException noRoleEx) {
      Logger.error("\n System failed to add child role...(role name :=  "
          + role.getName() + " ) \n", noRoleEx);
      throw new RoleUpdateAddException(
          "System failed to add child role -> parent_roleId ( "
              + role.getParentRoleId() + ")");
    }

  }// end addChildRole()
View Full Code Here

      Configuration.getConnectionPool().executeInsertOrUpdate(qpp);
    }
    catch( SQLException e )
    {
      Logger.error("SQLException prevented role2user record deletion", e);
      throw new RoleUpdateAddException(
          "SQLException prevented role2user record deletion: "
              + e.getMessage());
    }
   
    // update user roles   
    //get roleId's
    int[] roleIds = getRoleIdsByNames(user.getRoles());
    StringBuffer sql = new StringBuffer();
   
    for( int i = 0; i < roleIds.length; i++ )
    {
      sql.append(" insert into role2user ");
      sql.append(" ( user_id, role_id ) ");
      sql.append(" values ");
      sql.append(" ( ?, ?) ");
   
      QueryParser qp = new QueryParser(sql.toString());
      qp.addPreparedStmtElementDefinition(user.getUserId());
      qp.addPreparedStmtElementDefinition( roleIds[i]);
 
      try
      {
        Configuration.getConnectionPool().executeInsertOrUpdate(qp);
      }
      catch( SQLException e )
      {
        Logger.error("SQLException prevented role2user record update", e);
        throw new RoleUpdateAddException(
            "SQLException prevented top role2user record update: "
                + e.getMessage());
      }
      sql = new StringBuffer();
    }
View Full Code Here

        Configuration.getConnectionPool().executeInsertOrUpdate(qp);
      }
      catch( SQLException e )
      {
        Logger.error("SQLException prevented role2user record addition", e);
        throw new RoleUpdateAddException(
            "SQLException prevented role2user role record addition: "
                + e.getMessage());
      }
      sql = new StringBuffer();
    }
View Full Code Here

      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    }
    catch( SQLException e )
    {
      Logger.error("Role record couldn't be updated", e);
      throw new RoleUpdateAddException(
          "SQLException prevented role record update: "
              + e.getMessage());
    }
  }// end updateRole()
View Full Code Here

      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    }
    catch( SQLException e )
    {
      Logger.error("SQLException prevented top level role record addition", e);
      throw new RoleUpdateAddException(
          "SQLException prevented top level role record addition: "
              + e.getMessage());
    }

  }// end addTopLevelRole()
View Full Code Here

      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    }
    catch( SQLException e )
    {
      Logger.error("SQLException prevented child role record addition", e);
      throw new RoleUpdateAddException(
          "SQLException prevented child role record addition: "
              + e.getMessage());
    }

  }// end addChildRole()
View Full Code Here

TOP

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

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.