Package com.dotmarketing.business.util

Examples of com.dotmarketing.business.util.HostNameComparator


    User user = userWebAPI.getLoggedInUser(req);

    HostAPI hostAPI = APILocator.getHostAPI();
    List<Host> hosts = hostAPI.findAll(user, userWebAPI.isLoggedToFrontend(req));
    List<Map<String, Object>> hostResults = new ArrayList<Map<String, Object>>();
    Collections.sort(hosts, new HostNameComparator());

    for(Host host : hosts) {
      if(host.isSystemHost() || (!showArchived && host.isArchived()))
        continue;
      if(host.getHostname().toLowerCase().startsWith(filter.toLowerCase()))
View Full Code Here


    for(Field field : fields) {
      if(field.isListed() && field.getFieldType().startsWith("text"))
        searchableFields.add(field);
    }

    Collections.sort(hosts, new HostNameComparator());

    for(Host h : hosts) {
      if(h.isSystemHost())
        continue;
      boolean addToList = false;
View Full Code Here

    User user = userWebAPI.getLoggedInUser(req);
    ContentletAPI contentAPI = APILocator.getContentletAPI();

    boolean respectFrontend = !userWebAPI.isLoggedToBackend(req);
    List<Host> hosts = hostAPI.findAll(user, respectFrontend);
    Collections.sort(hosts, new HostNameComparator());

    List<Map<String, Object>> listOfHosts = new ArrayList<Map<String,Object>>(hosts.size());

    for(Host host : hosts) {
      if(host.isSystemHost())
View Full Code Here

       hosts.add(newHost);
    } else {
       newHost = hostWebAPI.getCurrentHost(ctx.getHttpServletRequest());
       hosts.add(newHost);
    }
    Collections.sort(hosts, new HostNameComparator())// DOTCMS JIRA - 4354

    for (Host host : hosts) {
      if(host.isSystemHost())
        continue;
      if(host.isArchived()==false){
View Full Code Here

    }
        boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(ctx.getHttpServletRequest());
    HostAPI hostAPI = APILocator.getHostAPI();
    List<Host> hosts = hostAPI.findAll(user, respectFrontendRoles);
    List<Map<String, Object>> hostsToReturn = new ArrayList<Map<String,Object>>(hosts.size());
    Collections.sort(hosts, new HostNameComparator());
    for (Host h: hosts) {
      List permissions = new ArrayList();
      try {
        permissions = permissionAPI.getPermissionIdsFromRoles(h, roles, user);
      } catch (DotDataException e) {
View Full Code Here

        User user = userWebAPI.getLoggedInUser(ctx.getHttpServletRequest());
        boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(ctx.getHttpServletRequest());
    HostAPI hostAPI = APILocator.getHostAPI();
    List<Host> hosts = hostAPI.findAll(user, respectFrontendRoles);
    List<Map<String, Object>> hostsToReturn = new ArrayList<Map<String,Object>>(hosts.size());
    Collections.sort(hosts, new HostNameComparator());
    for (Host h: hosts) {
      if(UtilMethods.isSet(requiredPermissions)){
        if(permissionAPI.doesUserHavePermissions(h,requiredPermissions, user)){
          hostsToReturn.add(hostMap(h));
        }
View Full Code Here

          permissionAPI.doesUserHavePermissions(folder,"TEMPLATE_LAYOUTS:"+PermissionAPI.PERMISSION_READ, user)) {
        filteredHosts.add(h);
      }
    }

    Collections.sort(hosts, new HostNameComparator());
    for (Host h: filteredHosts) {
      if(permissionAPI.doesUserHavePermissions(h,"TEMPLATE_LAYOUTS:"+PermissionAPI.PERMISSION_READ, user)){
        hostsToReturn.add(hostMap(h));
      }
    }
View Full Code Here

    }
    boolean respectFrontendRoles = userWebAPI.isLoggedToFrontend(ctx.getHttpServletRequest());
    HostAPI hostAPI = APILocator.getHostAPI();
    List<Host> hosts = hostAPI.findAll(user, respectFrontendRoles);
    List<Map<String, Object>> hostsToReturn = new ArrayList<Map<String,Object>>(hosts.size());
    Collections.sort(hosts, new HostNameComparator());
    for (Host h: hosts) {
      List permissions = new ArrayList();
      try {
        permissions = permissionAPI.getPermissionIdsFromRoles(h, roles, user);
      } catch (DotDataException e) {
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.util.HostNameComparator

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.