Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotDataException


      }

            discardConflicts(serverId, IntegrityType.STRUCTURES);

        } catch ( SQLException e ) {
            throw new DotDataException( e.getMessage(), e );
        }
    }
View Full Code Here


            }

            discardConflicts(serverId, IntegrityType.SCHEMES);

        } catch ( SQLException e ) {
            throw new DotDataException( e.getMessage(), e );
        }
    }
View Full Code Here

 
      //build the SQL statement, looping through params
      try {
        executeQuery(conn);
      } catch (Exception e) {
        throw new DotDataException(e.getMessage(),e);
      }
 
  }
View Full Code Here

        gotResult = true;
        //build the SQL statement, looping through params
        try {
      executeQuery();
    } catch (Exception e) {
      throw new DotDataException(e.getMessage(),e);
    }
    }
View Full Code Here

      if(startTransaction){
        HibernateUtil.startTransaction();
      }
    } catch (SQLException e) {
      Logger.error(WorkflowAPIImpl.class,e.getMessage(),e);
      throw new DotDataException(e.getMessage());
    }
    return startTransaction;
    }
View Full Code Here

        try {
            for ( final Map<String, Object> map : rs ) {
                ret.add( this.convertMaptoObject( map, clazz ) );
            }
        } catch ( final Exception e ) {
            throw new DotDataException( "cannot convert object to " + clazz + " " + e.getMessage() );

        }
        return ret;

    }
View Full Code Here

      }
      Map map = new HashMap();
      try {
        map = HibernateUtil.getSession().getSessionFactory().getAllClassMetadata();
      } catch (HibernateException e) {
        throw new DotDataException(e.getMessage(),e);
      }
      Iterator it = map.entrySet().iterator();
      while (it.hasNext()) {
        Map.Entry pairs = (Map.Entry) it.next();
        Class x = (Class) pairs.getKey();
View Full Code Here

    if(!doesUserHavePermission(permissionable, PermissionAPI.PERMISSION_EDIT_PERMISSIONS, user))
      throw new DotSecurityException("User id: " + user.getUserId() + " does not have permission to alter permissions on asset " + permissionable.getPermissionId());

    if(permissions == null || permissions.size() == 0) {
      throw new DotDataException("This method is not intented to remove all permissionable permissions, instead use deletePermissions");
    }

    RoleAPI roleAPI = APILocator.getRoleAPI();

    List<Permission> currentPermissions = permissionFactory.getPermissions(permissionable, true);
    List<String> rolesIncluded = new ArrayList<String>();
    List<Permission> includingLockedRolePermissions = new ArrayList<Permission>();

    for(Permission current : currentPermissions) {
      Role role = roleAPI.loadRoleById(current.getRoleId());
      if(!role.isEditPermissions()) {
        Permission perm = new Permission(permissionable.getPermissionId(), current.getRoleId(), current.getPermission());
        includingLockedRolePermissions.add(perm);
        rolesIncluded.add(role.getId());
      }
    }

    for(Permission p : permissions) {
      Role role = roleAPI.loadRoleById(p.getRoleId());
      if(!role.isEditPermissions()) {
        continue;
      }
      if(!p.getInode().equals(permissionable.getPermissionId()))
        throw new DotDataException("Can't assign permissions to a diferent permissionable");
      rolesIncluded.add(role.getId());
      includingLockedRolePermissions.add(p);
    }

    for(Permission current : currentPermissions) {
View Full Code Here

            }
          }

        } catch (NoSuchRoleException e) {
          Logger.error(this, e.getMessage(), e);
          throw new DotDataException(e.getMessage(), e);
        }

      }
    }
View Full Code Here

    } catch (Exception e) {

      if (localTransaction) {
        HibernateUtil.rollbackTransaction();
      }
      throw new DotDataException(e.getMessage(),e);
    }
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.exception.DotDataException

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.