magnolia-module-rssaggregator Version: 1.2.4 Last Published: Jun 1, 2012

CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

FileLine
info/magnolia/module/rssaggregator/CombinedFeedAction.java72
info/magnolia/module/rssaggregator/paragraphs/CombinedFeedModel.java76
        List<ContentWrapper> results = new ArrayList<ContentWrapper>();
        try {
            QueryManager qm = MgnlContext.getQueryManager("data");

            String orderByNodeValue = this.getContent().getNodeData("orderBy").getString();
            String sortDirectionNodeValue = this.getContent().getNodeData("direction").getString();

            if(StringUtils.isEmpty(orderByNodeValue)){
                orderByNodeValue = orderBy;
            }

            if(StringUtils.isEmpty(sortDirectionNodeValue)){
                sortDirectionNodeValue = sortDirection;
            }

            String queryString = "/jcr:root"+this.getContent().getNodeData("link").getString()+"/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();