Search in sources :

Example 1 with ReadableBrand

use of com.salesmanager.shop.model.store.ReadableBrand in project shopizer by shopizer-ecommerce.

the class StoreFacadeImpl method getBrand.

@Override
public ReadableBrand getBrand(String code) {
    MerchantStore mStore = getMerchantStoreByCode(code);
    ReadableBrand readableBrand = new ReadableBrand();
    if (!StringUtils.isEmpty(mStore.getStoreLogo())) {
        String imagePath = imageUtils.buildStoreLogoFilePath(mStore);
        ReadableImage image = createReadableImage(mStore.getStoreLogo(), imagePath);
        readableBrand.setLogo(image);
    }
    List<MerchantConfigEntity> merchantConfigTOs = getMerchantConfigEntities(mStore);
    readableBrand.getSocialNetworks().addAll(merchantConfigTOs);
    return readableBrand;
}
Also used : ReadableImage(com.salesmanager.shop.model.content.ReadableImage) MerchantConfigEntity(com.salesmanager.shop.model.store.MerchantConfigEntity) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) ReadableMerchantStore(com.salesmanager.shop.model.store.ReadableMerchantStore) PersistableMerchantStore(com.salesmanager.shop.model.store.PersistableMerchantStore) ReadableBrand(com.salesmanager.shop.model.store.ReadableBrand)

Aggregations

MerchantStore (com.salesmanager.core.model.merchant.MerchantStore)1 ReadableImage (com.salesmanager.shop.model.content.ReadableImage)1 MerchantConfigEntity (com.salesmanager.shop.model.store.MerchantConfigEntity)1 PersistableMerchantStore (com.salesmanager.shop.model.store.PersistableMerchantStore)1 ReadableBrand (com.salesmanager.shop.model.store.ReadableBrand)1 ReadableMerchantStore (com.salesmanager.shop.model.store.ReadableMerchantStore)1