Examples of filterCollection()


Examples of com.dotmarketing.business.PermissionAPI.filterCollection()

            //Checking if the user can add templates to a host
            PermissionAPI perAPI = APILocator.getPermissionAPI();
            List<Host> hosts = APILocator.getHostAPI().findAll( user, false );
            hosts.remove( APILocator.getHostAPI().findSystemHost( user, false ) );
            hosts = perAPI.filterCollection( hosts, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, false, user );

            if ( hosts.size() == 0 ) {
                req.setAttribute( WebKeys.TEMPLATE_CAN_ADD, false );
            } else {
                req.setAttribute( WebKeys.TEMPLATE_CAN_ADD, true );
View Full Code Here

Examples of com.dotmarketing.business.PermissionAPI.filterCollection()

        Host host = hostAPI.findParentHost(container, user, false);

    List<Host> hosts = APILocator.getHostAPI().findAll(user, false);
    hosts.remove(APILocator.getHostAPI().findSystemHost(user, false));
    hosts = perAPI.filterCollection(hosts, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, false, user);
    if(host != null && !hosts.contains(host)) {
      hosts.add(host);
    }
    req.setAttribute(WebKeys.CONTAINER_HOSTS, hosts);
  }
View Full Code Here

Examples of com.dotmarketing.business.PermissionAPI.filterCollection()

      while(!done) {
        dh.setFirstResult(internalOffset);
        dh.setMaxResults(internalLimit);
        resultList = dh.list();
        PermissionAPI permAPI = APILocator.getPermissionAPI();
        toReturn.addAll(permAPI.filterCollection(resultList, PermissionAPI.PERMISSION_READ, false, user));
        if(countLimit > 0 && toReturn.size() >= countLimit + offset)
          done = true;
        else if(resultList.size() < internalLimit)
          done = true;
View Full Code Here

Examples of com.dotmarketing.business.PermissionAPI.filterCollection()

      //Checking if the user can add templates to a host
      PermissionAPI perAPI = APILocator.getPermissionAPI();
      List<Host> hosts = APILocator.getHostAPI().findAll(user, false);
      hosts.remove(APILocator.getHostAPI().findSystemHost(user, false));
      hosts = perAPI.filterCollection(hosts, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, false, user);
      if(hosts.size() == 0) {
        req.setAttribute(WebKeys.CONTAINER_CAN_ADD, false);
      } else {
        req.setAttribute(WebKeys.CONTAINER_CAN_ADD, true);
      }
View Full Code Here

Examples of com.dotmarketing.business.PermissionAPI.filterCollection()

      while(!done) {
        dh.setFirstResult(internalOffset);
        dh.setMaxResults(internalLimit);
        resultList = dh.list();
        PermissionAPI permAPI = APILocator.getPermissionAPI();
        toReturn.addAll(permAPI.filterCollection(resultList, PermissionAPI.PERMISSION_READ, false, user));
        if(countLimit > 0 && toReturn.size() >= countLimit + offset)
          done = true;
        else if(resultList.size() < internalLimit)
          done = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.