|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dotmarketing.portlets.categories.business.CategoryAPIImpl
public class CategoryAPIImpl
This class is an specific implementation of the CategoryAPI API to manage dotCMS categories
| Constructor Summary | |
|---|---|
CategoryAPIImpl()
|
|
| 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)
This method get a category object based on its name this method needs to be used carefully 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CategoryAPIImpl()
| Method Detail |
|---|
public boolean canUseCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
canUseCategory in interface CategoryAPIcat - user - respectFrontendRoles -
DotDataException
public boolean canAddChildren(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
canAddChildren in interface CategoryAPIcat - user - respectFrontendRoles -
DotDataExceptionpublic boolean canAddToTopLevel(com.liferay.portal.model.User user)
canAddToTopLevel in interface CategoryAPIuser -
public boolean canEditCategory(Category cat,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException
canEditCategory in interface CategoryAPIcat - user - respectFrontendRoles -
DotDataException
public void delete(Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
delete in interface CategoryAPIDotDataException
DotSecurityException
public Category find(java.lang.String id,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
find in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> findAll(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
findAll in interface CategoryAPIDotDataException
DotSecurityException
public void save(Category parent,
Category object,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
save in interface CategoryAPIparent - Parent can be null if saving an old category
DotDataException
DotSecurityException
public void addChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
addChild in interface CategoryAPIDotDataException
DotSecurityException
public void addChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
addChild in interface CategoryAPIDotDataException
DotSecurityException
public void addParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
addParent in interface CategoryAPIDotDataException
DotSecurityException
public Category findByKey(java.lang.String key,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
findByKey in interface CategoryAPIDotDataException
DotSecurityException
public Category findByName(java.lang.String name,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
findByName in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> findTopLevelCategories(com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
findTopLevelCategories in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getChildren in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getChildren(Categorizable parent,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getChildren in interface CategoryAPIDotDataException
DotSecurityException
public 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
CategoryAPI
getChildren in interface CategoryAPIorderBy - - can be null
DotDataException
DotSecurityException
public java.util.List<Category> getChildren(Categorizable parent,
boolean onlyActive,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getChildren in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getChildren(Categorizable parent,
java.lang.String orderBy,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getChildren in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getParents in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getParents(Categorizable child,
boolean onlyActive,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getParents in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getParents(Categorizable child,
boolean onlyActive,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getParents in interface CategoryAPIDotDataException
DotSecurityException
public void removeChild(Categorizable parent,
Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
removeChild in interface CategoryAPIDotDataException
DotSecurityException
public void removeChild(Categorizable parent,
Category child,
java.lang.String relationType,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
removeChild in interface CategoryAPIDotDataException
DotSecurityException
public void removeChildren(Categorizable parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
removeChildren in interface CategoryAPIDotDataException
DotSecurityException
public void removeParent(Categorizable child,
Category parent,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
removeParent in interface CategoryAPIDotDataException
DotSecurityException
public void removeParents(Categorizable child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
removeParents in interface CategoryAPIDotDataException
DotSecurityException
public void setChildren(Categorizable parent,
java.util.List<Category> children,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
setChildren in interface CategoryAPIDotDataException
DotSecurityException
public void setParents(Categorizable child,
java.util.List<Category> parents,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
setParents in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getAllChildren(Category category,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getAllChildren in interface CategoryAPIDotDataException
DotSecurityExceptionpublic void clearCache()
CategoryAPI
clearCache in interface CategoryAPI
public java.util.List<Category> getCategoryTreeUp(Category child,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getCategoryTreeUp in interface CategoryAPIDotDataException
DotSecurityException
public java.util.List<Category> getCategoryTreeDown(Categorizable categorizable,
Category catToSearchFrom,
com.liferay.portal.model.User user,
boolean respectFrontendRoles)
throws DotDataException,
DotSecurityException
CategoryAPI
getCategoryTreeDown in interface CategoryAPIDotDataException
DotSecurityException
public boolean hasDependencies(Category cat)
throws DotDataException
CategoryAPI
hasDependencies in interface CategoryAPIDotDataExceptionpublic void flushChildrenCache()
CategoryAPI
flushChildrenCache in interface CategoryAPI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||