The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
info/magnolia/module/rssaggregator/CombinedFeedAction.java | 77 |
info/magnolia/module/rssaggregator/templates/components/CombinedFeedModel.java | 89 |
List<ContentWrapper> results = new ArrayList<ContentWrapper>(); try { QueryManager qm = MgnlContext.getQueryManager("data"); String orderByNodeValue = PropertyUtil.getString(content, "orderBy"); String sortDirectionNodeValue = PropertyUtil.getString(content, "direction"); String link = PropertyUtil.getString(content, "link"); if(StringUtils.isEmpty(orderByNodeValue)){ orderByNodeValue = orderBy; } if(StringUtils.isEmpty(sortDirectionNodeValue)){ sortDirectionNodeValue = sortDirection; } String queryString = "/jcr:root"+link+"/data[1]/*/* order by " + orderByNodeValue + " " + sortDirectionNodeValue; //String queryString = "SELECT * FROM mgnl:contentNode WHERE jcr:path LIKE \'/rssaggregator/news/data/%/%\' order by pubDate"; log.debug(queryString); Query q = qm.createQuery(queryString, "xpath"); QueryResult res = q.execute(); Collection<Content> col = res.getContent(DataConsts.MODULE_DATA_CONTENT_NODE_TYPE); for (Content c : col) { results.add(new NodeMapWrapper(c, c.getHandle())); |