protected String getTagPredicate(Map<String, String> filter) { if (filter.containsKey(PARAM_TAG)) { final ContentMap contentMap = templatingFunctions.contentByPath(filter.get(PARAM_TAG), NewsWorkspaceUtil.COLLABORATION); if (contentMap != null) { final String tagId = (String) contentMap.get("@id"); if (StringUtils.isNotEmpty(tagId)) { return "AND p.tags like '%" + tagId + "%' "; } } else { log.debug("Tag [{}] not found", filter.get(PARAM_TAG)); } } return StringUtils.EMPTY; }
protected String getCategoryPredicate(Map<String, String> filter) { if (filter.containsKey(PARAM_CATEGORY)) { final ContentMap contentMap = templatingFunctions.contentByPath( filter.get(PARAM_CATEGORY), NewsWorkspaceUtil.CATEGORIES); if (contentMap != null) { final String categoryId = (String) contentMap.get("@id"); if (StringUtils.isNotEmpty(categoryId)) { return "AND p.categories like '%" + categoryId + "%' "; } } else { log.debug("Category [{}] not found", filter.get(PARAM_CATEGORY)); } } return StringUtils.EMPTY; }