|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.stock.service.ProductService
@Transactional(readOnly=true) public final class ProductService
ProductService
Method Summary | |
---|---|
java.lang.String |
doCreateProduct(Product product,
javax.servlet.http.HttpServletRequest request)
Create the product |
void |
doDeleteProduct(int nIdProduct)
Delete the product |
java.lang.String |
doModifyProduct(Product product,
javax.servlet.http.HttpServletRequest request)
Modify the product |
java.util.List<Product> |
findByFilter(ProductFilter filter)
Return a filtered list of product |
java.lang.String |
getCreateTemplate()
Return create template url for a product |
java.lang.String |
getDeleteJsp()
Return the jsp for deleting a product |
ICategoryHome |
getHomeCategory()
|
IProductHome<Product,ProductFilter> |
getHomeProduct()
|
static ProductService |
getInstance()
|
java.lang.String |
getMessageNotAuthorizedForCreate()
Get the message when a user is not authorized to create a product |
java.lang.String |
getMessageNotAuthorizedForDelete()
Get the message when a user is not authorized to delete a product |
java.lang.String |
getMessageNotAuthorizedForModification()
Get the message when a user is not authorized to modify a product |
java.lang.String |
getModifyTemplate()
Return modify template url for a product |
ObjectDefinition |
getObjectDefinition()
Return the object definition |
java.lang.String |
getOrderTemplate()
Return template url for ordering a product |
Product |
getProduct(int nIdProduct)
Return the product object |
java.lang.String |
getProductClass()
Return the class of the product |
void |
init()
Init the product service and register it in the global product service |
void |
initModelForModification(int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
Insert the needed tag by the product for modification into the model |
void |
initModelForOrder(int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
Insert the needed tag by the product for ordering into the model |
boolean |
isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user)
Checks if if the given user is authorized to create a product |
boolean |
isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user)
Checks if if the given user is authorized to delete a product |
boolean |
isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user)
Checks if if the given user is authorized to modify a product |
void |
setHomeCategory(ICategoryHome homeCategory)
|
void |
setHomeProduct(IProductHome<Product,ProductFilter> homeProduct)
|
void |
updateProduct(Product product)
Update a product in the database |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public IProductHome<Product,ProductFilter> getHomeProduct()
public void setHomeProduct(IProductHome<Product,ProductFilter> homeProduct)
public ICategoryHome getHomeCategory()
public void setHomeCategory(ICategoryHome homeCategory)
public java.lang.String getProductClass()
getProductClass
in interface IProductService
public java.lang.String getCreateTemplate()
getCreateTemplate
in interface IProductService
public java.lang.String getModifyTemplate()
getModifyTemplate
in interface IProductService
public java.lang.String getOrderTemplate()
getOrderTemplate
in interface IProductService
public void init()
init
in interface IProductService
public static ProductService getInstance()
@Transactional public java.lang.String doCreateProduct(Product product, javax.servlet.http.HttpServletRequest request)
doCreateProduct
in interface IProductService
product
- the product to createrequest
- the request
@Transactional public java.lang.String doModifyProduct(Product product, javax.servlet.http.HttpServletRequest request)
doModifyProduct
in interface IProductService
product
- the product to modifyrequest
- the request
@Transactional public void doDeleteProduct(int nIdProduct)
doDeleteProduct
in interface IProductService
nIdProduct
- the id of the product to deletepublic void initModelForModification(int nIdProduct, java.util.Map<java.lang.String,java.lang.Object> model, javax.servlet.http.HttpServletRequest request)
initModelForModification
in interface IProductService
nIdProduct
- the product idmodel
- the modelrequest
- The Http requestpublic void initModelForOrder(int nIdProduct, java.util.Map<java.lang.String,java.lang.Object> model, javax.servlet.http.HttpServletRequest request)
initModelForOrder
in interface IProductService
nIdProduct
- the product idmodel
- the modelrequest
- The Http requestpublic Product getProduct(int nIdProduct)
getProduct
in interface IProductService
nIdProduct
- the product id
public java.lang.String getDeleteJsp()
getDeleteJsp
in interface IProductService
public java.util.List<Product> findByFilter(ProductFilter filter)
findByFilter
in interface IProductService
filter
- the product filter
public ObjectDefinition getObjectDefinition()
getObjectDefinition
in interface IProductService
public boolean isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user)
isAuthorizedToCreate
in interface IProductService
user
- The user who wants to create a product
public boolean isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user)
isAuthorizedToModify
in interface IProductService
user
- The user who wants to modify a product
public boolean isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user)
isAuthorizedToDelete
in interface IProductService
user
- The user who wants to delete a product
public java.lang.String getMessageNotAuthorizedForCreate()
getMessageNotAuthorizedForCreate
in interface IProductService
public java.lang.String getMessageNotAuthorizedForDelete()
getMessageNotAuthorizedForDelete
in interface IProductService
public java.lang.String getMessageNotAuthorizedForModification()
getMessageNotAuthorizedForModification
in interface IProductService
public void updateProduct(Product product)
updateProduct
in interface IProductService
product
- the product to update in the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |