protected List<CmsDetailPageInfo> mergeDetailPages(
        List<CmsDetailPageInfo> parentDetailPages,
        List<CmsDetailPageInfo> ownDetailPages) {

        List<CmsDetailPageInfo> parentDetailPageCopies = Lists.newArrayList();
        for (CmsDetailPageInfo info : parentDetailPages) {
            parentDetailPageCopies.add(info.copyAsInherited());
        }

        List<CmsDetailPageInfo> result = new ArrayList<CmsDetailPageInfo>();
        Map<String, List<CmsDetailPageInfo>> resultDetailPageMap = Maps.newHashMap();
        resultDetailPageMap.putAll(getDetailPagesMap(parentDetailPageCopies));
        resultDetailPageMap.putAll(getDetailPagesMap(ownDetailPages));
        result = new ArrayList<CmsDetailPageInfo>();
        for (List<CmsDetailPageInfo> pages : resultDetailPageMap.values()) {
            result.addAll(pages);
        }
        return result;
    }
protected List < CmsDetailPageInfo > mergeDetailPages ( List < CmsDetailPageInfo > parentDetailPages , List < CmsDetailPageInfo > ownDetailPages ) { List < CmsDetailPageInfo > parentDetailPageCopies = Lists . newArrayList ( ) ; for ( CmsDetailPageInfo info : parentDetailPages ) { parentDetailPageCopies . add ( info . copyAsInherited ( ) ) ; } List < CmsDetailPageInfo > result = new ArrayList < CmsDetailPageInfo > ( ) ; Map < String , List < CmsDetailPageInfo > > resultDetailPageMap = Maps . newHashMap ( ) ; resultDetailPageMap . putAll ( getDetailPagesMap ( parentDetailPageCopies ) ) ; resultDetailPageMap . putAll ( getDetailPagesMap ( ownDetailPages ) ) ; result = new ArrayList < CmsDetailPageInfo > ( ) ; for ( List < CmsDetailPageInfo > pages : resultDetailPageMap . values ( ) ) { result . addAll ( pages ) ; } return result ; }
Merges two lists of detail pages, one from a parent configuration and one from a child configuration.<p>

@param parentDetailPages the parent's detail pages
@param ownDetailPages the child's detail pages

@return the merged detail pages