Search in sources :

Example 1 with ValidEntry

use of org.nextprot.api.core.service.annotation.ValidEntry in project nextprot-api by calipho-sib.

the class EntryPageServiceImpl method hasContentForPageDisplay.

@Cacheable(value = "page-display", key = "#entryName")
@Override
public Map<String, Boolean> hasContentForPageDisplay(@ValidEntry String entryName) {
    Entry entry = entryBuilderService.build(EntryConfig.newConfig(entryName).withEverything());
    Map<String, Boolean> map = new HashMap<>();
    for (PageViewFactory page : PageViewFactory.values()) {
        PageView pv = page.getPageView();
        map.put(pv.getLabel(), pv.doDisplayPage(entry));
    }
    return map;
}
Also used : PageView(org.nextprot.api.core.domain.ui.page.PageView) Entry(org.nextprot.api.core.domain.Entry) ValidEntry(org.nextprot.api.core.service.annotation.ValidEntry) HashMap(java.util.HashMap) PageViewFactory(org.nextprot.api.core.domain.ui.page.PageViewFactory) Cacheable(org.springframework.cache.annotation.Cacheable)

Aggregations

HashMap (java.util.HashMap)1 Entry (org.nextprot.api.core.domain.Entry)1 PageView (org.nextprot.api.core.domain.ui.page.PageView)1 PageViewFactory (org.nextprot.api.core.domain.ui.page.PageViewFactory)1 ValidEntry (org.nextprot.api.core.service.annotation.ValidEntry)1 Cacheable (org.springframework.cache.annotation.Cacheable)1