Search in sources :

Example 1 with DefaultPagination

use of org.commonjava.indy.core.model.DefaultPagination in project indy by Commonjava.

the class NfcController method getAllMissing.

public Pagination<NotFoundCacheDTO> getAllMissing(Page page) {
    return new DefaultPagination<>(page, (handler) -> {
        Map<Location, Set<String>> allMissing = ((AbstractNotFoundCache) cache).getAllMissing(page.getPageIndex(), page.getPageSize());
        NotFoundCacheDTO dto = getNotFoundCacheDTO(allMissing);
        return dto;
    });
}
Also used : AbstractNotFoundCache(org.commonjava.indy.core.inject.AbstractNotFoundCache) Set(java.util.Set) DefaultPagination(org.commonjava.indy.core.model.DefaultPagination) NotFoundCacheDTO(org.commonjava.indy.model.core.dto.NotFoundCacheDTO) KeyedLocation(org.commonjava.indy.model.galley.KeyedLocation) LocationUtils.toLocation(org.commonjava.indy.util.LocationUtils.toLocation) Location(org.commonjava.maven.galley.model.Location)

Aggregations

Set (java.util.Set)1 AbstractNotFoundCache (org.commonjava.indy.core.inject.AbstractNotFoundCache)1 DefaultPagination (org.commonjava.indy.core.model.DefaultPagination)1 NotFoundCacheDTO (org.commonjava.indy.model.core.dto.NotFoundCacheDTO)1 KeyedLocation (org.commonjava.indy.model.galley.KeyedLocation)1 LocationUtils.toLocation (org.commonjava.indy.util.LocationUtils.toLocation)1 Location (org.commonjava.maven.galley.model.Location)1