Search in sources :

Example 1 with GoLiveQueueChildFilter

use of org.craftercms.studio.api.v1.to.GoLiveQueueChildFilter in project studio by craftercms.

the class WorkflowServiceImpl method getGoLiveItems.

protected List<ContentItemTO> getGoLiveItems(final String site, final DmContentItemComparator comparator) throws ServiceLayerException {
    List<String> displayPatterns = servicesConfig.getDisplayInWidgetPathPatterns(site);
    List<ContentItemTO> categoryItems = getCategoryItems(site);
    GoLiveQueue queue = new GoLiveQueue();
    fillQueue(site, queue, null);
    Set<ContentItemTO> queueItems = queue.getQueue();
    ContentItemTO.ChildFilter childFilter = new GoLiveQueueChildFilter(queue);
    GoLiveQueueOrganizer goLiveQueueOrganizer = new GoLiveQueueOrganizer(contentService, childFilter);
    for (ContentItemTO queueItem : queueItems) {
        if (queueItem.getLastEditDate() != null) {
            queueItem.setEventDate(queueItem.getLastEditDate());
        }
        goLiveQueueOrganizer.addToGoLiveItems(site, queueItem, categoryItems, comparator, false, displayPatterns);
    }
    return categoryItems;
}
Also used : ContentItemTO(org.craftercms.studio.api.v1.to.ContentItemTO) GoLiveQueueChildFilter(org.craftercms.studio.api.v1.to.GoLiveQueueChildFilter) GoLiveQueueOrganizer(org.craftercms.studio.impl.v1.util.GoLiveQueueOrganizer) GoLiveQueue(org.craftercms.studio.api.v1.to.GoLiveQueue)

Aggregations

ContentItemTO (org.craftercms.studio.api.v1.to.ContentItemTO)1 GoLiveQueue (org.craftercms.studio.api.v1.to.GoLiveQueue)1 GoLiveQueueChildFilter (org.craftercms.studio.api.v1.to.GoLiveQueueChildFilter)1 GoLiveQueueOrganizer (org.craftercms.studio.impl.v1.util.GoLiveQueueOrganizer)1