|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.stock.service.GlobalProductService
public final class GlobalProductService
This class provides generics methods for IProductService implementations
| Method Summary | |
|---|---|
java.lang.String |
doCreateProduct(java.lang.String strProductClassName,
Product product,
javax.servlet.http.HttpServletRequest request)
Creates a product |
void |
doDeleteProduct(java.lang.String strProductClassName,
int nIdProduct)
Deletes a product |
java.lang.String |
doModifyProduct(java.lang.String strProductClassName,
Product product,
javax.servlet.http.HttpServletRequest request)
Modifies a product |
java.util.List<Product> |
findByFilter(java.lang.String strProductClassName,
ProductFilter filter)
Get all the products which match with the given filter |
java.util.List<ObjectDefinition> |
getAllRegisteredObjectDefinition(fr.paris.lutece.portal.business.user.AdminUser user)
Get the ObjectDefinition objects of the registered services where the given user is authorized to create |
java.lang.String |
getCreateTemplate(java.lang.String strProductClassName)
Get the creation template of a service |
java.lang.String |
getDeleteJsp(java.lang.String strProductClassName)
Get the deletion jsp of a service |
static GlobalProductService |
getInstance()
Get the instance of this class |
java.lang.String |
getMessageNotAuthorizedForCreate(java.lang.String strProductClassName)
Get the message when a user is not authorized to create a product |
java.lang.String |
getMessageNotAuthorizedForDelete(java.lang.String strProductClassName)
Get the message when a user is not authorized to delete a product |
java.lang.String |
getMessageNotAuthorizedForModification(java.lang.String strProductClassName)
Get the message when a user is not authorized to modify a product |
java.lang.String |
getModifyTemplate(java.lang.String strProductClassName)
Get the modification template of a service |
ObjectDefinition |
getObjectDefinition(java.lang.String strProductClassName)
Get the ObjectDefinition objects of the given product entity name |
java.lang.String |
getOrderTemplate(java.lang.String strProductClassName)
Get the product order template of a service |
Product |
getProduct(java.lang.String strProductClassName,
int nIdProduct)
Get the product with the given id |
void |
initModelForModification(java.lang.String strProductClassName,
int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
Initaliaze the model in parameter for a modification |
void |
initModelForOrder(java.lang.String strProductClassName,
int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
Initaliaze the model in parameter for an order |
boolean |
isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
Checks if a user is authorized to create the given product entity name |
boolean |
isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
Checks if a user is authorized to delete the given product entity name |
boolean |
isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
Checks if a user is authorized to modify the given product entity name |
void |
register(IProductService service)
Register a IProductService service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static GlobalProductService getInstance()
public void register(IProductService service)
IProductService service
service - the service to be registeredpublic java.lang.String getCreateTemplate(java.lang.String strProductClassName)
strProductClassName - The class name of the product entity to create
public java.lang.String getModifyTemplate(java.lang.String strProductClassName)
strProductClassName - The class name of the product entity to modify
public java.lang.String getOrderTemplate(java.lang.String strProductClassName)
strProductClassName - the class name of the service
public java.lang.String getDeleteJsp(java.lang.String strProductClassName)
strProductClassName - the class name of the service
public java.lang.String doCreateProduct(java.lang.String strProductClassName,
Product product,
javax.servlet.http.HttpServletRequest request)
strProductClassName - The class name of the product entity to createproduct - The product to create in databaserequest - The HTTP request
public java.lang.String doModifyProduct(java.lang.String strProductClassName,
Product product,
javax.servlet.http.HttpServletRequest request)
strProductClassName - The class name of the product entity to modifyproduct - The product to modify in databaserequest - The HTTP request
public void doDeleteProduct(java.lang.String strProductClassName,
int nIdProduct)
strProductClassName - The class name of the product entity to deletenIdProduct - The product id to delete
public void initModelForModification(java.lang.String strProductClassName,
int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
strProductClassName - The class name of the product entity to deletenIdProduct - The product id to modifymodel - the model which will be passed in the modification templaterequest - The HTTP request
public void initModelForOrder(java.lang.String strProductClassName,
int nIdProduct,
java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request)
strProductClassName - The class name of the product entity to deletenIdProduct - The product id to ordermodel - the model which will be passed in the order templaterequest - The HTTP request
public Product getProduct(java.lang.String strProductClassName,
int nIdProduct)
strProductClassName - The class name of the product entity to deletenIdProduct - The product id
public java.util.List<Product> findByFilter(java.lang.String strProductClassName,
ProductFilter filter)
strProductClassName - The class name of the product entity to deletefilter - the filter
public java.util.List<ObjectDefinition> getAllRegisteredObjectDefinition(fr.paris.lutece.portal.business.user.AdminUser user)
ObjectDefinition objects of the registered services where the given user is authorized to create
user - the user
ObjectDefinition for which the given user is authorized to create a productpublic ObjectDefinition getObjectDefinition(java.lang.String strProductClassName)
ObjectDefinition objects of the given product entity name
strProductClassName - The class name of the product entity
ObjectDefinition objects of the given class name
public boolean isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
user - the userstrProductClassName - The class name of the product entity
public boolean isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
user - the userstrProductClassName - The class name of the product entity
public boolean isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strProductClassName)
user - the userstrProductClassName - The class name of the product entity
public java.lang.String getMessageNotAuthorizedForCreate(java.lang.String strProductClassName)
strProductClassName - The class name of the product entity
public java.lang.String getMessageNotAuthorizedForModification(java.lang.String strProductClassName)
strProductClassName - The class name of the product entity
public java.lang.String getMessageNotAuthorizedForDelete(java.lang.String strProductClassName)
strProductClassName - The class name of the product entity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||