Search in sources :

Example 1 with ReadableContentFull

use of com.salesmanager.shop.model.content.ReadableContentFull in project shopizer by shopizer-ecommerce.

the class ContentFacadeImpl method convertContentToReadableContentFull.

@Deprecated
private ReadableContentFull convertContentToReadableContentFull(MerchantStore store, Language language, Content content) {
    ReadableContentFull contentFull = new ReadableContentFull();
    try {
        List<ContentDescriptionEntity> descriptions = this.createContentDescriptionEntitys(store, content, language);
        contentFull.setDescriptions(descriptions);
        contentFull.setId(content.getId());
        contentFull.setDisplayedInMenu(content.isLinkToMenu());
        contentFull.setContentType(content.getContentType().name());
        contentFull.setCode(content.getCode());
        contentFull.setId(content.getId());
        contentFull.setVisible(content.isVisible());
        return contentFull;
    } catch (ServiceException e) {
        throw new ServiceRuntimeException("Error while creating ReadableContentFull", e);
    }
}
Also used : ServiceException(com.salesmanager.core.business.exception.ServiceException) ReadableContentFull(com.salesmanager.shop.model.content.ReadableContentFull) ContentDescriptionEntity(com.salesmanager.shop.model.content.ContentDescriptionEntity) ServiceRuntimeException(com.salesmanager.shop.store.api.exception.ServiceRuntimeException)

Aggregations

ServiceException (com.salesmanager.core.business.exception.ServiceException)1 ContentDescriptionEntity (com.salesmanager.shop.model.content.ContentDescriptionEntity)1 ReadableContentFull (com.salesmanager.shop.model.content.ReadableContentFull)1 ServiceRuntimeException (com.salesmanager.shop.store.api.exception.ServiceRuntimeException)1