Examples of PaginatedCategories


Examples of com.dotmarketing.portlets.categories.business.PaginatedCategories

        } else {
          catAPI.sortChildren(inode);
        }
      }

      PaginatedCategories pagCategories = topLevelCats?catAPI.findTopLevelCategories(user, false, start, count, q, sort):
          catAPI.findChildren(user, inode, false, start, count, q, sort);

      List<Map<String,Object>> items = new ArrayList<Map<String,Object>>();
      List<Category> categories = pagCategories.getCategories();

      if(categories!=null) {
        for (Category category : categories) {
          Map<String,Object> catMap = new HashMap<String,Object>();
          catMap.put("inode", category.getInode());
          catMap.put("category_name", category.getCategoryName());
          catMap.put("category_key", category.getKey());
          catMap.put("category_velocity_var_name", category.getCategoryVelocityVarName());
          catMap.put("sort_order", category.getSortOrder());
          catMap.put("keywords", category.getKeywords());
          items.add(catMap);
        }
      }

      Map<String,Object> m = new HashMap<String, Object>();
      m.put("items", items);
      m.put("numRows", pagCategories.getTotalCount());
      String s = mapper.writeValueAsString(m);
      response.setContentType("text/plain");
      response.getWriter().write(s);
      response.getWriter().flush();
      response.getWriter().close();
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.