|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.stock.service.GlobalCategoryService
public final class GlobalCategoryService
This class provides generics methods for ICategoryService
implementations
Method Summary | |
---|---|
java.lang.String |
doCreateCategory(java.lang.String strCategoryClassName,
Category category,
javax.servlet.http.HttpServletRequest request)
Creates a category |
void |
doDeleteCategory(java.lang.String strCategoryClassName,
int nIdCategory)
Deletes a category |
java.lang.String |
doModifyCategory(java.lang.String strCategoryClassName,
Category category,
javax.servlet.http.HttpServletRequest request)
Modifies a category |
java.util.List<Category> |
findByFilter(java.lang.String strCategoryClassName,
CategoryFilter filter)
Finds all categories which match the given filter |
java.util.List<ObjectDefinition> |
getAllRegisteredObjectDefinition()
Get the ObjectDefinition objects of all the registered services |
java.util.List<ICategoryService> |
getAllRegisteredServices()
Get all the registered services |
Category |
getCategory(java.lang.String strCategoryClassName,
int nIdCategory)
Get the category with the given id |
Category |
getCategoryWithChildren(java.lang.String strCategoryClassName,
int nIdCategory)
Finds a category and fetch children |
Category |
getCategoryWithParent(java.lang.String strCategoryClassName,
int nIdCategory)
Finds a category and fetch parent |
java.lang.String |
getCreateTemplate(java.lang.String strCategoryClassName)
Get the creation template of a service |
java.lang.String |
getDeleteJsp(java.lang.String strCategoryClassName)
Get the deletion jsp of a service |
static GlobalCategoryService |
getInstance()
Get the instance of this class |
java.lang.String |
getMessageNotAuthorizedForCreate(java.lang.String strCategoryClassName)
Get the message when a user is not authorized to create a category |
java.lang.String |
getMessageNotAuthorizedForDelete(java.lang.String strCategoryClassName)
Get the message when a user is not authorized to delete a category |
java.lang.String |
getMessageNotAuthorizedForModification(java.lang.String strCategoryClassName)
Get the message when a user is not authorized to modify a category |
java.lang.String |
getModifyTemplate(java.lang.String strCategoryClassName)
Get the modification template of a service |
ObjectDefinition |
getObjectDefinition(java.lang.String strCategoryClassName)
Finds the ObjectDefinition objects of the given category entity name |
void |
initModelForCreation(java.lang.String strCategoryClassName,
java.util.Map<java.lang.String,java.lang.Object> model)
Initaliaze the model in parameter for a creation |
void |
initModelForModification(java.lang.String strCategoryClassName,
int nIdCategory,
java.util.Map<java.lang.String,java.lang.Object> model)
Initaliaze the model in parameter for a modification |
boolean |
isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strCategoryClassName)
Checks if a user is authorized to create the given category entity name |
boolean |
isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strCategoryClassName)
Checks if a user is authorized to delete the given category entity name |
boolean |
isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user,
java.lang.String strCategoryClassName)
Checks if a user is authorized to modify the given category entity name |
void |
register(ICategoryService service)
Register a ICategoryService service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static GlobalCategoryService getInstance()
public void register(ICategoryService service)
ICategoryService
service
service
- the service to be registeredpublic java.lang.String getCreateTemplate(java.lang.String strCategoryClassName)
strCategoryClassName
- The class name of the category entity to create
public java.lang.String getModifyTemplate(java.lang.String strCategoryClassName)
strCategoryClassName
- The class name of the category entity to modify
public java.lang.String getDeleteJsp(java.lang.String strCategoryClassName)
strCategoryClassName
- The class name of the category entity to modify
public java.lang.String doCreateCategory(java.lang.String strCategoryClassName, Category category, javax.servlet.http.HttpServletRequest request)
strCategoryClassName
- The class name of the category entity to createcategory
- The category to create in databaserequest
- The HTTP request
public java.lang.String doModifyCategory(java.lang.String strCategoryClassName, Category category, javax.servlet.http.HttpServletRequest request)
strCategoryClassName
- The class name of the category entity to modifycategory
- The category to modify in databaserequest
- The HTTP request
public void doDeleteCategory(java.lang.String strCategoryClassName, int nIdCategory)
strCategoryClassName
- The class name of the category entity to deletenIdCategory
- The category id to delete in databasepublic void initModelForModification(java.lang.String strCategoryClassName, int nIdCategory, java.util.Map<java.lang.String,java.lang.Object> model)
strCategoryClassName
- The class name of the category entity to deletenIdCategory
- The category id to modifymodel
- the model which will be passed in the modification templatepublic void initModelForCreation(java.lang.String strCategoryClassName, java.util.Map<java.lang.String,java.lang.Object> model)
strCategoryClassName
- The class name of the category entity to createmodel
- the model which will be passed in the modification templatepublic Category getCategory(java.lang.String strCategoryClassName, int nIdCategory)
strCategoryClassName
- The class name of the category entity to deletenIdCategory
- The category id
public java.util.List<ICategoryService> getAllRegisteredServices()
public java.util.List<ObjectDefinition> getAllRegisteredObjectDefinition()
ObjectDefinition
objects of all the registered services
ObjectDefinition
objects of all the registered servicespublic Category getCategoryWithParent(java.lang.String strCategoryClassName, int nIdCategory)
strCategoryClassName
- The class name of the category entitynIdCategory
- the id of the searched category
public ObjectDefinition getObjectDefinition(java.lang.String strCategoryClassName)
ObjectDefinition
objects of the given category entity name
strCategoryClassName
- The class name of the category entity
ObjectDefinition
objects of the given category class namepublic Category getCategoryWithChildren(java.lang.String strCategoryClassName, int nIdCategory)
strCategoryClassName
- The class name of the category entitynIdCategory
- the id of the searched category
public java.util.List<Category> findByFilter(java.lang.String strCategoryClassName, CategoryFilter filter)
strCategoryClassName
- The class name of the category entityfilter
- The filter
public boolean isAuthorizedToCreate(fr.paris.lutece.portal.business.user.AdminUser user, java.lang.String strCategoryClassName)
user
- the userstrCategoryClassName
- The class name of the category entity
public boolean isAuthorizedToModify(fr.paris.lutece.portal.business.user.AdminUser user, java.lang.String strCategoryClassName)
user
- the userstrCategoryClassName
- The class name of the category entity
public boolean isAuthorizedToDelete(fr.paris.lutece.portal.business.user.AdminUser user, java.lang.String strCategoryClassName)
user
- the userstrCategoryClassName
- The class name of the category entity
public java.lang.String getMessageNotAuthorizedForCreate(java.lang.String strCategoryClassName)
strCategoryClassName
- he class name of the category entity
public java.lang.String getMessageNotAuthorizedForModification(java.lang.String strCategoryClassName)
strCategoryClassName
- he class name of the category entity
public java.lang.String getMessageNotAuthorizedForDelete(java.lang.String strCategoryClassName)
strCategoryClassName
- he class name of the category entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |