|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CategoryAPI
This class defines the API contract of methods usable to control cms categories
| Method Summary | |
|---|---|
void |
addChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
This method adds the given category to parent children list |
void |
addChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
This method adds the given category to parent children list |
void |
addParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Adds the given category as a parent of the given children category |
boolean |
canAddChildren(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
|
boolean |
canAddToTopLevel(com.liferay.portal.model.User user)
|
boolean |
canEditCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
|
boolean |
canUseCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
|
void |
clearCache()
This is a low level method only intended to be use for maintenance purposes |
void |
delete(Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Totally removes a category from the system |
Category |
find(java.lang.String id,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
This method get a category object from the cache based on the passed inode, if the object does not exist a null value is returned |
java.util.List<Category> |
findAll(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of all the categories in the system |
Category |
findByKey(java.lang.String key,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
This method get a category object from the cache based on the passed key, if the object does not exist a null value is returned |
Category |
findByName(java.lang.String name,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Deprecated. This method shouldn't be used because it might have more than one category with the same name |
java.util.List<Category> |
findTopLevelCategories(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of all top level categories in the system |
void |
flushChildrenCache()
This method flushes the children cache |
java.util.List<Category> |
getAllChildren(Category category,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Recursive Method that returns a list of categories given a parent category, it does not take into account the whole hierarchy, instead all categories are being added to the categories list being returned. |
java.util.List<Category> |
getCategoryTreeDown(Categorizable categorizable,
Category catToSearchFrom,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Will return to you all category hierarchy (children and subchildren and so on) who are attached to the categorizable and are below the passed category |
java.util.List<Category> |
getCategoryTreeUp(Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves a list all the line of parent categories of the given child category a final fake top category is added at the beginning of the list to represent the top of the hierarchy |
java.util.List<Category> |
getChildren(Categorizable parent,
boolean onlyActive,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of children categories associated to the given id/inode, this method can be used to retrived associated categories to another type of objects like categories associated to contentlets |
java.util.List<Category> |
getChildren(Categorizable parent,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of children categories associated to the given id/inode, this method can be used to retrived associated categories to another type of objects like categories associated to contentlets |
java.util.List<Category> |
getChildren(Categorizable parent,
java.lang.String relationType,
boolean onlyActive,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of children categories associated to the given id/inode, this method can be used to retrived associated categories to another type of objects like categories associated to contentlets |
java.util.List<Category> |
getChildren(Categorizable parent,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of children categories associated to the given id/inode, this method can be used to retrived associated categories to another type of objects like categories associated to contentlets |
java.util.List<Category> |
getChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of children categories associated to the given id/inode, this method can be used to retrived associated categories to another type of objects like categories associated to contentlets |
java.util.List<Category> |
getParents(Categorizable child,
boolean onlyActive,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of parents categories associated to the given id/inode |
java.util.List<Category> |
getParents(Categorizable child,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of parents categories associated to the given id/inode |
java.util.List<Category> |
getParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Retrieves the list of parents categories associated to the given id/inode |
boolean |
hasDependencies(Category cat)
check If the category has dependencies. |
void |
removeChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Removes from the list of children categories the given child |
void |
removeChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Removes from the list of children categories the given child |
void |
removeChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Removes all the associated children categories of the given parent |
void |
removeParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Associates the given the list of categories as parents of the given children id Older parents gets removed from the list |
void |
removeParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Removes the parents associated to the given children category |
void |
save(Category parent,
Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Saves categories, When saving a new category the parent should be passed to the API to check if the user has permissions to add children to the parent and the parent will be associated to the passed category object |
void |
setChildren(Categorizable parent,
java.util.List<Category> children,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
This methods associates the given children list to the given parent |
void |
setParents(Categorizable child,
java.util.List<Category> parents,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
Associates to the given list of categories as parents of the child id/inode Older parents gets replaced by the new list |
| Method Detail |
|---|
boolean canUseCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
cat - user - respectFrontendRoles -
DotDataException
boolean canAddChildren(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
cat - user - respectFrontendRoles -
DotDataExceptionboolean canAddToTopLevel(com.liferay.portal.model.User user)
user -
boolean canEditCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
cat - user - respectFrontendRoles -
DotDataException
void delete(Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
object -
DotDataException
DotSecurityException
Category find(java.lang.String id,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
Category findByKey(java.lang.String key,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
Category findByName(java.lang.String name,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
name -
DotDataException
DotSecurityException
java.util.List<Category> findAll(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
DotDataException
DotSecurityException
java.util.List<Category> findTopLevelCategories(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
DotDataException
DotSecurityException
void save(Category parent,
Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parent - Parent can be null if saving an old categoryobject - user -
DotDataException
DotSecurityException
java.util.List<Category> getChildren(Categorizable parent,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
java.util.List<Category> getChildren(Categorizable parent,
java.lang.String relationType,
boolean onlyActive,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id - relationType - orderBy - - can be null
DotDataException
DotSecurityException
java.util.List<Category> getChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
java.util.List<Category> getChildren(Categorizable parent,
boolean onlyActive,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parent - orderBy -
DotDataException
DotSecurityException
java.util.List<Category> getChildren(Categorizable parent,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parent - orderBy -
DotDataException
DotSecurityException
void setChildren(Categorizable parent,
java.util.List<Category> children,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parentId - children -
DotDataException
DotSecurityException
void addChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parentId - children -
DotDataException
DotSecurityException
void addChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parentId - children -
DotDataException
DotSecurityException
void removeChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parentId - children -
DotDataException
DotSecurityException
void removeChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parentId - children -
DotDataException
DotSecurityException
void removeChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
parent - child - user - relationType - respectFrontendRoles -
DotDataException
DotSecurityException
java.util.List<Category> getParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
java.util.List<Category> getParents(Categorizable child,
boolean onlyActive,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
relationType - id - onlyActive -
DotDataException
DotSecurityException
java.util.List<Category> getParents(Categorizable child,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
id -
DotDataException
DotSecurityException
void setParents(Categorizable child,
java.util.List<Category> parents,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
children - parents -
DotDataException
DotSecurityException
void addParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
children - parents -
DotDataException
DotSecurityException
void removeParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
children - parents -
DotDataException
DotSecurityException
void removeParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
children - parents -
DotDataException
DotSecurityException
java.util.List<Category> getAllChildren(Category category,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
category -
DotDataException
DotSecurityException
java.util.List<Category> getCategoryTreeUp(Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
cat - l -
DotDataException
DotSecurityException
java.util.List<Category> getCategoryTreeDown(Categorizable categorizable,
Category catToSearchFrom,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
categorizable - catToSearchFrom - user - respectFrontendRoles -
DotDataException
DotSecurityExceptionvoid clearCache()
boolean hasDependencies(Category cat)
throws DotDataException
category -
DotSecurityException
DotDataExceptionvoid flushChildrenCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||