com.dotmarketing.portlets.categories.business
Class CategoryFactory

java.lang.Object
  extended by com.dotmarketing.portlets.categories.business.CategoryFactory
Direct Known Subclasses:
CategoryFactoryImpl

public abstract class CategoryFactory
extends java.lang.Object

Since:
1.5.1.1
Author:
David Torres

Constructor Summary
CategoryFactory()
           
 
Method Summary
protected abstract  void addChild(Categorizable parent, Category child, java.lang.String relationType)
          This method adds the given category to parent children list
protected abstract  void addParent(Categorizable child, Category parent)
          Adds the given category as a parent of the given children category
protected abstract  void clearCache()
           
protected abstract  void delete(Category object)
          Totally removes a category from the system
protected abstract  void deleteChildren(java.lang.String inode)
          Deletes all the Children of a given parent inode
protected abstract  void deleteTopLevelCategories()
          Deletes all the top level categories
protected abstract  Category find(java.lang.String id)
          This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned
protected abstract  java.util.List<Category> findAll()
          Retrieves the list of all the categories in the system
protected abstract  Category findByKey(java.lang.String key)
          This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned
protected abstract  Category findByName(java.lang.String name)
          This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned
protected abstract  java.util.List<Category> findChildrenByFilter(java.lang.String inode, java.lang.String filter, java.lang.String sort)
          Returns the children categories of the category with the supplied inode filtered by a string
protected abstract  java.util.List<Category> findTopLevelCategories()
          Returns the first level of categories in the system
protected abstract  java.util.List<Category> findTopLevelCategoriesByFilter(java.lang.String filter, java.lang.String sort)
          Returns the first level of categories in the system filtered by a string
protected abstract  java.util.List<Category> getChildren(Categorizable parent)
          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
protected abstract  java.util.List<Category> getChildren(Categorizable parent, java.lang.String orderBy)
          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
protected abstract  java.util.List<Category> getChildren(Categorizable parent, java.lang.String orderBy, java.lang.String relationType)
          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
protected abstract  java.util.List<Category> getParents(Categorizable child)
          Retrieves the list of parents categories associated to the given id/inode
protected abstract  java.util.List<Category> getParents(Categorizable child, java.lang.String relationType)
          Retrieves the list of parents categories associated to the given id/inode
protected abstract  void removeChild(Categorizable parent, Category child, java.lang.String relationType)
          Removes from the list of children categories the given child
protected abstract  void removeChildren(Categorizable parent)
          Removes all the associated children categories of the given parent
protected abstract  void removeParent(Categorizable child, Category parent)
          Associates the given the list of categories as parents of the given children id Older parents gets removed from the list
protected abstract  void removeParents(Categorizable child)
          Removes the parents associated to the given children category
protected abstract  void save(Category object)
          This method saves a category in the system
protected abstract  void saveRemote(Category object)
          This method saves a category in the system coming by a Remote publishing.
protected abstract  void setChildren(Categorizable parent, java.util.List<Category> children)
          This methods associates the given children list to the given parent
protected abstract  void setParents(Categorizable child, java.util.List<Category> parents)
          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

CategoryFactory

public CategoryFactory()
Method Detail

delete

protected abstract void delete(Category object)
                        throws DotDataException
Totally removes a category from the system

Parameters:
object -
Throws:
DotDataException

find

protected abstract Category find(java.lang.String id)
                          throws DotDataException
This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned

Parameters:
id -
Returns:
Throws:
DotDataException

findByKey

protected abstract Category findByKey(java.lang.String key)
                               throws DotDataException
This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned

Parameters:
id -
Returns:
Throws:
DotDataException

findByName

protected abstract Category findByName(java.lang.String name)
                                throws DotDataException
This method get a category object from the cache based on the passed inode, if the object does not exist in cache a null value is returned

Parameters:
name -
Returns:
Throws:
DotDataException

findAll

protected abstract java.util.List<Category> findAll()
                                             throws DotDataException
Retrieves the list of all the categories in the system

Returns:
Throws:
DotDataException

save

protected abstract void save(Category object)
                      throws DotDataException
This method saves a category in the system

Parameters:
object -
Throws:
DotDataException

saveRemote

protected abstract void saveRemote(Category object)
                            throws DotDataException
This method saves a category in the system coming by a Remote publishing.

Parameters:
object -
Throws:
DotDataException

getChildren

protected abstract java.util.List<Category> getChildren(Categorizable parent)
                                                 throws DotDataException
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

Parameters:
id -
Returns:
Throws:
DotDataException

getChildren

protected abstract java.util.List<Category> getChildren(Categorizable parent,
                                                        java.lang.String orderBy)
                                                 throws DotDataException
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

Parameters:
id -
Returns:
Throws:
DotDataException

getChildren

protected abstract java.util.List<Category> getChildren(Categorizable parent,
                                                        java.lang.String orderBy,
                                                        java.lang.String relationType)
                                                 throws DotDataException
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

Parameters:
relationType -
parent -
orderBy - - can be null
Returns:
Throws:
DotDataException

setChildren

protected abstract void setChildren(Categorizable parent,
                                    java.util.List<Category> children)
                             throws DotDataException
This methods associates the given children list to the given parent

Parameters:
parentId -
children -
Throws:
DotDataException

addChild

protected abstract void addChild(Categorizable parent,
                                 Category child,
                                 java.lang.String relationType)
                          throws DotDataException
This method adds the given category to parent children list

Parameters:
parentId -
children -
relationType -
Throws:
DotDataException

removeChildren

protected abstract void removeChildren(Categorizable parent)
                                throws DotDataException
Removes all the associated children categories of the given parent

Parameters:
parentId -
children -
Throws:
DotDataException

removeChild

protected abstract void removeChild(Categorizable parent,
                                    Category child,
                                    java.lang.String relationType)
                             throws DotDataException
Removes from the list of children categories the given child

Parameters:
parentId -
children -
Throws:
DotDataException

getParents

protected abstract java.util.List<Category> getParents(Categorizable child)
                                                throws DotDataException
Retrieves the list of parents categories associated to the given id/inode

Parameters:
id -
Returns:
Throws:
DotDataException

getParents

protected abstract java.util.List<Category> getParents(Categorizable child,
                                                       java.lang.String relationType)
                                                throws DotDataException
Retrieves the list of parents categories associated to the given id/inode

Parameters:
id -
relationType -
Returns:
Throws:
DotDataException

setParents

protected abstract void setParents(Categorizable child,
                                   java.util.List<Category> parents)
                            throws DotDataException
Associates to the given list of categories as parents of the child id/inode Older parents gets replaced by the new list

Parameters:
children -
parents -
Throws:
DotDataException

addParent

protected abstract void addParent(Categorizable child,
                                  Category parent)
                           throws DotDataException
Adds the given category as a parent of the given children category

Parameters:
children -
parents -
Throws:
DotDataException

removeParents

protected abstract void removeParents(Categorizable child)
                               throws DotDataException
Removes the parents associated to the given children category

Parameters:
children -
parents -
Throws:
DotDataException

removeParent

protected abstract void removeParent(Categorizable child,
                                     Category parent)
                              throws DotDataException
Associates the given the list of categories as parents of the given children id Older parents gets removed from the list

Parameters:
children -
parents -
Throws:
DotDataException

deleteTopLevelCategories

protected abstract void deleteTopLevelCategories()
Deletes all the top level categories


findTopLevelCategories

protected abstract java.util.List<Category> findTopLevelCategories()
                                                            throws DotDataException
Returns the first level of categories in the system

Returns:
Throws:
DotDataException

findTopLevelCategoriesByFilter

protected abstract java.util.List<Category> findTopLevelCategoriesByFilter(java.lang.String filter,
                                                                           java.lang.String sort)
                                                                    throws DotDataException
Returns the first level of categories in the system filtered by a string

Returns:
Throws:
DotDataException

deleteChildren

protected abstract void deleteChildren(java.lang.String inode)
Deletes all the Children of a given parent inode


findChildrenByFilter

protected abstract java.util.List<Category> findChildrenByFilter(java.lang.String inode,
                                                                 java.lang.String filter,
                                                                 java.lang.String sort)
                                                          throws DotDataException
Returns the children categories of the category with the supplied inode filtered by a string

Returns:
Throws:
DotDataException

clearCache

protected abstract void clearCache()


Copyright © 2013 dotCMS Inc. All Rights Reserved.