Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotSecurityException


    }

    public List<Link> getLinks ( Host host, User user, boolean respectFrontEndPermissions ) throws DotStateException, DotDataException, DotSecurityException {

        if ( !papi.doesUserHavePermission( host, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions ) ) {
            throw new DotSecurityException( "User " + user + " does not have permission to read " + host.getHostname() );
        }

        List list = ffac.getChildrenClass( host, Link.class );
        return papi.filterCollection( list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user );
    }
View Full Code Here


    }

    public List<Link> getLinks ( Folder parent, User user, boolean respectFrontEndPermissions ) throws DotStateException, DotDataException, DotSecurityException {

        if ( !papi.doesUserHavePermission( parent, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions ) ) {
            throw new DotSecurityException( "User " + user + " does not have permission to read " + parent.getName() );
        }

        List list = ffac.getChildrenClass( parent, Link.class );
        return papi.filterCollection( list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user );
    }
View Full Code Here

    }

  public  List<File> getFiles(Folder parent, User user, boolean respectFrontEndPermissions) throws DotStateException,
    DotDataException, DotSecurityException{
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + parent.getName());
    }
    List list = ffac.getChildrenClass(parent, File.class);
    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }
View Full Code Here

    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }
  public  List<Contentlet> getContent(Folder parent, User user, boolean respectFrontEndPermissions) throws DotStateException,
    DotDataException, DotSecurityException{
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + parent.getName());
    }

    List list = ffac.getChildrenClass(parent, Contentlet.class);
    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }
View Full Code Here

    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }
  public  List<Structure> getStructures(Folder parent, User user, boolean respectFrontEndPermissions) throws DotStateException,
    DotDataException, DotSecurityException{
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + parent.getName());
    }
    List list = StructureFactory.getStructures("folder='"+parent.getInode()+"'", null, 0, 0, null);
    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }
View Full Code Here

  }


  public boolean move(Folder folderToMove, Folder newParentFolder,User user,boolean respectFrontEndPermissions)throws DotDataException, DotSecurityException {
    if (!papi.doesUserHavePermission(folderToMove, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + folderToMove.getName());
    }

    if (!papi.doesUserHavePermission(newParentFolder, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to add to " + newParentFolder.getName());
    }
    return ffac.move(folderToMove, newParentFolder);
  }
View Full Code Here

  }


  public boolean move(Folder folderToMove, Host newParentHost,User user,boolean respectFrontEndPermissions)throws DotDataException, DotSecurityException {
    if (!papi.doesUserHavePermission(folderToMove, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + folderToMove.getName());
    }

    if (!papi.doesUserHavePermission(newParentHost, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to add to " + newParentHost.getHostname());
    }
    return ffac.move(folderToMove, newParentHost);
  }
View Full Code Here

    return ffac.getFolderTree(openNodes, view, content, structureInode, locale, timeZone, roles, isAdminUser, user);
  }

  public List<Contentlet> getLiveContent(Folder parent, User user,boolean respectFrontEndPermissions) throws DotDataException, DotSecurityException {
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read  " + parent.getName());
    }
    ChildrenCondition cond = new ChildrenCondition();
    cond.live=true;
    cond.deleted=false;
    List list = ffac.getChildrenClass(parent, Contentlet.class, cond);
View Full Code Here

  }


  public List<File> getLiveFiles(Folder parent, User user,boolean respectFrontEndPermissions) throws DotDataException, DotSecurityException {
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read  " + parent.getName());
    }
    ChildrenCondition cond = new ChildrenCondition();
    cond.live=true;
    cond.deleted=false;
    List list = ffac.getChildrenClass(parent, File.class, cond);
View Full Code Here

    return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
  }

  public List<File> getLiveFilesSortTitle(Folder parent, User user,boolean respectFrontEndPermissions) throws DotDataException, DotSecurityException {
    if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read  " + parent.getName());
    }
    ChildrenCondition cond = new ChildrenCondition();
        cond.live=true;
        cond.deleted=false;
    List list = ffac.getChildrenClass(parent, File.class, cond, "file_name asc");
View Full Code Here

TOP

Related Classes of com.dotmarketing.exception.DotSecurityException

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.