public class ShowService extends fr.paris.lutece.plugins.stock.service.ProductService implements IShowService
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_DATE |
static String |
ID_SPRING_DEFAULT |
Constructor and Description |
---|
ShowService() |
Modifier and Type | Method and Description |
---|---|
void |
correctProduct(ShowDTO product)
Check if rules should be apply to the product
|
void |
doDeleteProduct(int nIdProduct)
Delete the product.
|
ShowDTO |
doSaveProduct(ShowDTO product,
File[] filePosterArray)
Modifies a product.
|
List<ShowDTO> |
findAll()
Return a list of all products.
|
List<ShowDTO> |
findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter)
Return a filtered list of product.
|
fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> |
findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Return a filtered list of product
|
ShowDTO |
findById(Integer nIdProduct)
Find by id.
|
fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> |
getAllProduct(fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Return a list of products
|
List<ShowDTO> |
getComeProduct(List<String> ordList,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
Return a list of product with date_start after the current date.
|
List<ShowDTO> |
getCurrentAndComeProduct(List<String> orderList)
Return a list of product with date_end after the current date.
|
List<ShowDTO> |
getCurrentProduct(List<String> orderList,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
Return a list of products with date_end after the current date.
|
byte[] |
getImage(Integer idProduct)
Gets the image data.
|
ShowDTO |
getProduct(int nIdProduct)
Return the product object.
|
fr.paris.lutece.plugins.stock.business.product.Product |
getProductById(Integer id) |
byte[] |
getRealImage(Integer idProduct)
Gets the real image.
|
byte[] |
getTbImage(Integer idProduct)
Gets the thumbnail image.
|
void |
init()
Init the product service and register it in the global product service.
|
void |
updateProduct(ShowDTO product) |
public static final String ID_SPRING_DEFAULT
public static final String FORMAT_DATE
public void init()
init
in interface IShowService
public void doDeleteProduct(int nIdProduct)
doDeleteProduct
in interface IShowService
nIdProduct
- the id of the product to deletepublic ShowDTO getProduct(int nIdProduct)
getProduct
in interface IShowService
nIdProduct
- the product idpublic fr.paris.lutece.plugins.stock.business.product.Product getProductById(Integer id)
getProductById
in interface IShowService
public List<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter)
findByFilter
in interface IShowService
filter
- the product filter@Transactional(readOnly=false, propagation=REQUIRES_NEW) public void updateProduct(ShowDTO product)
public fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
findByFilter
in interface IShowService
filter
- the product filterpaginationProperties
- the pagination properties@Transactional(readOnly=false, propagation=REQUIRES_NEW) public ShowDTO doSaveProduct(ShowDTO product, File[] filePosterArray) throws fr.paris.lutece.plugins.stock.commons.exception.ValidationException
doSaveProduct
in interface IShowService
product
- The product to modify in databasefilePosterArray
- files posterfr.paris.lutece.plugins.stock.commons.exception.ValidationException
public ShowDTO findById(Integer nIdProduct)
findById
in interface IShowService
nIdProduct
- the n id productpublic fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> getAllProduct(fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
getAllProduct
in interface IShowService
paginationProperties
- the pagination propertiespublic List<ShowDTO> findAll()
findAll
in interface IShowService
public List<ShowDTO> getCurrentProduct(List<String> orderList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
getCurrentProduct
in interface IShowService
orderList
- the list of orderspaginator
- the paginatorpublic List<ShowDTO> getComeProduct(List<String> ordList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
getComeProduct
in interface IShowService
ordList
- the order listpaginator
- the paginatorpublic List<ShowDTO> getCurrentAndComeProduct(List<String> orderList)
getCurrentAndComeProduct
in interface IShowService
orderList
- the order listpublic byte[] getImage(Integer idProduct)
getImage
in interface IShowService
idProduct
- the id productpublic byte[] getTbImage(Integer idProduct)
getTbImage
in interface IShowService
idProduct
- the id productpublic byte[] getRealImage(Integer idProduct)
IShowService
getRealImage
in interface IShowService
idProduct
- the id productpublic void correctProduct(ShowDTO product)
IShowService
correctProduct
in interface IShowService
product
- the product to checkCopyright © 2020 City of Paris. All rights reserved.