Package it.hotel.model.permission

Examples of it.hotel.model.permission.Permission


    SystemUtils.getLogger().finest("Invocato");
    try {
      this.getPermissionDAO().deletePermission(permissionName);
      List permissions = new ArrayList(_permissions);
      for (int i=0; i<permissions.size(); i++) {
        Permission currentPerm = (Permission) permissions.get(i);
        if (permissionName.equalsIgnoreCase(currentPerm.getName())) {
          _permissions.remove(currentPerm);
          break;
        }
      }
      Iterator roleIt = _roles.values().iterator();
View Full Code Here


  public void updatePermission(Permission permission) throws SystemException {
    try {
      this.getPermissionDAO().updatePermission(permission);
      List permissions = new ArrayList(_permissions);
      for (int i=0; i<permissions.size(); i++) {
        Permission currentPerm = (Permission) permissions.get(i);
        if (permission.getName().equalsIgnoreCase(currentPerm.getName())) {
          _permissions.remove(currentPerm);
          break;
        }
      }
      _permissions.add(permission);
View Full Code Here

  public Set loadPermissions() {
    Connection conn = null;
    Statement stat = null;
    ResultSet res = null;
    Set permissions = new HashSet();
    Permission permission = null;
    try {
      conn = this.getConnection();
      stat = conn.createStatement();
      res = stat.executeQuery(ALL_PERMISSIONS);
      while (res.next()) {
View Full Code Here

   * @param res The resultset to read the values from
   * @return The Permission object created.
   * @throws SQLException
   */
  private Permission createPermissionFromRecord(ResultSet res) throws SQLException {
    Permission permission = new Permission();
    permission.setName(res.getString(1));
    permission.setDescription(res.getString(2));
    return permission;
  }
View Full Code Here

TOP

Related Classes of it.hotel.model.permission.Permission

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.