Subversion Repositories SmartDukaan

Rev

Rev 37206 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.service.external;

import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
import com.spice.profitmandi.dao.model.ContentPojo;
import com.spice.profitmandi.dao.model.external.CatalogContentModel;
import com.spice.profitmandi.dao.model.external.CatalogSkuModel;
import com.spice.profitmandi.dao.model.external.ExternalCategoryModel;
import com.spice.profitmandi.dao.model.external.ExternalPage;
import com.spice.profitmandi.dao.model.external.ExternalStoreModel;
import com.spice.profitmandi.dao.model.external.StoreSkuModel;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Backing service for the third-party /external/v1 APIs. Store AND category
 * scoping are enforced here: every read is intersected with the calling
 * client's mapped stores and exposed categories.
 */
public interface ExternalApiService {

    List<ExternalCategoryModel> getCategoryMaster(int apiClientId);

    ExternalPage<CatalogContentModel> getCatalogMaster(int apiClientId, Long updatedSince, int offset, int limit);

    ExternalPage<CatalogSkuModel> getCatalogSkuMaster(int apiClientId, Long updatedSince, int offset, int limit);

    ExternalPage<StoreSkuModel> getSkuMaster(int apiClientId, Integer storeId, Long updatedSince, int offset,
            int limit) throws ProfitMandiBusinessException;

    ExternalPage<ExternalStoreModel> getStoreMaster(int apiClientId, int offset, int limit);

    Map<Long, ContentPojo> getCatalogsByIds(int apiClientId, List<Long> catalogIds);

    List<CatalogSkuModel> getCatalogSkusByIds(int apiClientId, List<Integer> catalogIds);

    List<StoreSkuModel> getStock(int apiClientId, int storeId, Collection<Integer> itemIds)
            throws ProfitMandiBusinessException;

    ExternalPage<StoreSkuModel> getStockPage(int apiClientId, int storeId, int offset, int limit)
            throws ProfitMandiBusinessException;
}