com.dotmarketing.viewtools
Class CategoriesWebAPI

java.lang.Object
  extended by com.dotmarketing.viewtools.CategoriesWebAPI
All Implemented Interfaces:
org.apache.velocity.tools.view.tools.ViewTool

public class CategoriesWebAPI
extends java.lang.Object
implements org.apache.velocity.tools.view.tools.ViewTool


Constructor Summary
CategoriesWebAPI()
           
 
Method Summary
 java.util.List<Category> filterCategoriesByUserPermissions(java.util.List<java.lang.Object> catInodes)
           
 java.util.List<Category> getActiveChildrenCategories(Category cat)
           
 java.util.List<Category> getActiveChildrenCategories(Inode inode)
           
 java.util.List<Category> getActiveChildrenCategories(java.lang.String inode)
           
 java.util.List<Category> getActiveChildrenCategoriesByKey(java.lang.String key)
           
 java.util.List<Category> getActiveChildrenCategoriesByParent(java.util.ArrayList<java.lang.String> o)
           
 java.util.List<Category> getActiveChildrenCategoriesOrderByName(Category cat)
           
 java.util.List<Category> getActiveChildrenCategoriesOrderByName(Inode inode)
           
 java.util.List<Category> getActiveChildrenCategoriesOrderByName(java.lang.String inode)
           
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategories(Inode inode)
          Retrieves a plain list of all the children categories (any depth) of the given parent inode The list returned is a list of maps, each map has the category and the level of this category belongs E.G.
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategories(java.lang.String inode)
          Retrieves a plain list of all the children categories (any depth) of the given parent inode The list returned is a list of maps, each map has the category and the level of this category belongs E.G.
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategoriesByKey(java.lang.String key)
          Retrieves a plain list of all the children categories (any depth) of the given parent category key The list returned is a list of maps, each map has the category and the level of this category belongs E.G.
 java.util.List<Category> getAllCategoriesListByEntityName(java.lang.String entityName)
           
 java.lang.String getCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, boolean displayTitle, boolean multipleValues, int size)
          Deprecated. 
 java.lang.String getCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, long[] selectedCategories, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, long childInode, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, java.lang.String[] selectCatsString, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, java.lang.String childInode, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
           
 java.lang.String getCategoriesByEntityNameTextMode(java.lang.String parameterName, java.lang.String entityName, long[] selectedCats, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityNameTextMode(java.lang.String parameterName, java.lang.String entityName, long childInode, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityNameTextMode(java.lang.String parameterName, java.lang.String entityName, java.lang.String[] selectCatsString, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
          Deprecated. 
 java.lang.String getCategoriesByEntityNameTextMode(java.lang.String parameterName, java.lang.String entityName, java.lang.String childInode, boolean displayTitle, boolean multipleValues, int size, boolean readonly)
           
 java.util.List<Category> getCategoriesByUser(com.liferay.portal.model.User user)
           
 java.util.List<Category> getCategoriesListByEntityName(java.lang.String entityName)
           
 CategoryAPI getCategoryAPI()
           
 Category getCategoryByInode(long inode)
          Deprecated. 
 Category getCategoryByInode(java.lang.String inode)
           
 Category getCategoryByKey(java.lang.String key)
           
 Category getCategoryByName(java.lang.String name)
          Deprecated. Multiple categories can have the same name so this method should be avoid to search a single category
 java.lang.String getCategoryKeyByContentlet(long contentletInode)
          Deprecated. 
 java.lang.String getCategoryKeyByContentlet(java.lang.String contentletInode)
           
 java.util.List<Category> getChildrenCategories(Category cat)
           
 java.util.List<Category> getChildrenCategories(Inode inode)
           
 java.util.List<Category> getChildrenCategories(java.lang.String inode)
           
 java.util.List<Category> getChildrenCategoriesByKey(java.lang.String key)
           
 java.util.List<Category> getInodeCategories(Inode inodeObj)
           
 java.util.List<Category> getInodeCategories(java.lang.String inode)
           
 java.lang.String getSimpleCategoriesByEntityName(java.lang.String parameterName, java.lang.String entityName, long selectedCategory)
          Deprecated. 
 java.lang.String getSimpleComboByEntityName(java.lang.String parameterName, java.lang.String entityName, long selectedCategory)
          Deprecated. 
 void init(java.lang.Object obj)
          Initializes this instance using the given data
 void setCategoryAPI(CategoryAPI categoryAPI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoriesWebAPI

public CategoriesWebAPI()
Method Detail

getCategoryAPI

public CategoryAPI getCategoryAPI()

setCategoryAPI

public void setCategoryAPI(CategoryAPI categoryAPI)

init

public void init(java.lang.Object obj)
Description copied from interface: org.apache.velocity.tools.view.tools.ViewTool
Initializes this instance using the given data

Specified by:
init in interface org.apache.velocity.tools.view.tools.ViewTool
Parameters:
obj - the initialization data

getCategoriesByEntityName

@Deprecated
public java.lang.String getCategoriesByEntityName(java.lang.String parameterName,
                                                             java.lang.String entityName,
                                                             boolean displayTitle,
                                                             boolean multipleValues,
                                                             int size)
Deprecated. 


getCategoriesListByEntityName

public java.util.List<Category> getCategoriesListByEntityName(java.lang.String entityName)

getAllCategoriesListByEntityName

public java.util.List<Category> getAllCategoriesListByEntityName(java.lang.String entityName)

getChildrenCategoriesByKey

public java.util.List<Category> getChildrenCategoriesByKey(java.lang.String key)

getCategoryByKey

public Category getCategoryByKey(java.lang.String key)

getCategoryByName

public Category getCategoryByName(java.lang.String name)
Deprecated. Multiple categories can have the same name so this method should be avoid to search a single category

Parameters:
name -
Returns:

getChildrenCategories

public java.util.List<Category> getChildrenCategories(Category cat)

getChildrenCategories

public java.util.List<Category> getChildrenCategories(Inode inode)

getChildrenCategories

public java.util.List<Category> getChildrenCategories(java.lang.String inode)

getActiveChildrenCategories

public java.util.List<Category> getActiveChildrenCategories(Category cat)

getActiveChildrenCategoriesByKey

public java.util.List<Category> getActiveChildrenCategoriesByKey(java.lang.String key)

getActiveChildrenCategories

public java.util.List<Category> getActiveChildrenCategories(Inode inode)

getActiveChildrenCategories

public java.util.List<Category> getActiveChildrenCategories(java.lang.String inode)

getActiveChildrenCategoriesOrderByName

public java.util.List<Category> getActiveChildrenCategoriesOrderByName(Category cat)

getActiveChildrenCategoriesOrderByName

public java.util.List<Category> getActiveChildrenCategoriesOrderByName(Inode inode)

getActiveChildrenCategoriesOrderByName

public java.util.List<Category> getActiveChildrenCategoriesOrderByName(java.lang.String inode)

getActiveChildrenCategoriesByParent

public java.util.List<Category> getActiveChildrenCategoriesByParent(java.util.ArrayList<java.lang.String> o)

getAllActiveChildrenCategoriesByKey

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategoriesByKey(java.lang.String key)
Retrieves a plain list of all the children categories (any depth) of the given parent category key The list returned is a list of maps, each map has the category and the level of this category belongs E.G. level: 1 cat: Best Practices level: 1 cat: Conferences & Presentations level: 2 cat: second level level: 1 cat: Marketing

Parameters:
key - parent category key
Returns:

getAllActiveChildrenCategories

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategories(Inode inode)
Retrieves a plain list of all the children categories (any depth) of the given parent inode The list returned is a list of maps, each map has the category and the level of this category belongs E.G. level: 1 cat: Best Practices level: 1 cat: Conferences & Presentations level: 2 cat: second level level: 1 cat: Marketing

Parameters:
inode - parent inode
Returns:

getAllActiveChildrenCategories

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllActiveChildrenCategories(java.lang.String inode)
Retrieves a plain list of all the children categories (any depth) of the given parent inode The list returned is a list of maps, each map has the category and the level of this category belongs E.G. level: 1 cat: Best Practices level: 1 cat: Conferences & Presentations level: 2 cat: second level level: 1 cat: Marketing

Parameters:
inode - parent inode
Returns:

getInodeCategories

public java.util.List<Category> getInodeCategories(java.lang.String inode)

getInodeCategories

public java.util.List<Category> getInodeCategories(Inode inodeObj)

getCategoriesByEntityName

public java.lang.String getCategoriesByEntityName(java.lang.String parameterName,
                                                  java.lang.String entityName,
                                                  java.lang.String childInode,
                                                  boolean displayTitle,
                                                  boolean multipleValues,
                                                  int size,
                                                  boolean readonly)

getCategoriesByEntityName

@Deprecated
public java.lang.String getCategoriesByEntityName(java.lang.String parameterName,
                                                             java.lang.String entityName,
                                                             long childInode,
                                                             boolean displayTitle,
                                                             boolean multipleValues,
                                                             int size,
                                                             boolean readonly)
Deprecated. 

Parameters:
parameterName - value of the "name" attribute for the html tag
entityName - name of the entity that have the categories
selectedCategories - Selected categories inodes
displayTitle - if do you want that the title display or not (Entity Name)
multipleValues - if the user could select multiple values
size - the height in entries that could be displayed
readonly - if the select is disable
Returns:

getCategoriesByEntityName

@Deprecated
public java.lang.String getCategoriesByEntityName(java.lang.String parameterName,
                                                             java.lang.String entityName,
                                                             java.lang.String[] selectCatsString,
                                                             boolean displayTitle,
                                                             boolean multipleValues,
                                                             int size,
                                                             boolean readonly)
Deprecated. 

This methods return the selects required for the categories of an entity

Parameters:
parameterName - value of the "name" attribute for the html tag
entityName - name of the entity that have the categories
selectedCategories - Selected categories inodes
displayTitle - if do you want that the title display or not (Entity Name)
multipleValues - if the user could select multiple values
size - the height in entries that could be displayed
readonly - if the select is disable
Returns:

getSimpleCategoriesByEntityName

@Deprecated
public java.lang.String getSimpleCategoriesByEntityName(java.lang.String parameterName,
                                                                   java.lang.String entityName,
                                                                   long selectedCategory)
Deprecated. 


getCategoryByInode

public Category getCategoryByInode(java.lang.String inode)

getCategoryByInode

@Deprecated
public Category getCategoryByInode(long inode)
Deprecated. 


getCategoryKeyByContentlet

@Deprecated
public java.lang.String getCategoryKeyByContentlet(long contentletInode)
Deprecated. 


getCategoryKeyByContentlet

public java.lang.String getCategoryKeyByContentlet(java.lang.String contentletInode)

getCategoriesByUser

public java.util.List<Category> getCategoriesByUser(com.liferay.portal.model.User user)

filterCategoriesByUserPermissions

public java.util.List<Category> filterCategoriesByUserPermissions(java.util.List<java.lang.Object> catInodes)


Copyright © 2010 dotCMS Inc. All Rights Reserved.