Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pebble.domain
Class CategoryBuilder

    java.lang.Object
      net.sourceforge.pebble.domain.CategoryBuilder

    public class CategoryBuilder

extends java.lang.Object

A class to manage blog categories.

Author:
  Simon Brown

Constructor Summary
`CategoryBuilder(Blog blog)` Creates a new instance.
`CategoryBuilder(Blog blog, Category rootCategory)` Creates a new instance.

Method Summary
`void` | `addCategory(Category category)` Adds a category.
`java.util.List<Category>` | `getCategories()` Gets a collection containing all blog categories, ordered by category name.
`java.util.List<Category>` | `getCategories(Category category)`
`Category` | `getCategory(java.lang.String id)` Gets (and creates if necessary), the specified category.
`Category` | `getRootCategory()` Gets the root category.
`void` | `removeCategory(Category category)` Removes a category.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CategoryBuilder

    public CategoryBuilder(Blog blog)

  Creates a new instance.

### CategoryBuilder

    public CategoryBuilder(Blog blog,
                           Category rootCategory)

  Creates a new instance.

Method Detail

### addCategory

    public void addCategory(Category category)

  Adds a category.

  Parameters:
    `category` - a Category instance

### removeCategory

    public void removeCategory(Category category)

  Removes a category.

  Parameters:
    `category` - a Category instance

### getCategory

    public Category getCategory(java.lang.String id)

  Gets (and creates if necessary), the specified category.

  Parameters:
    `id` - the id of the category to find
  Returns:
    a Category instance

### getRootCategory

    public Category getRootCategory()

  Gets the root category.

  Returns:
    a Category instance

### getCategories

    public java.util.List<Category> getCategories()

  Gets a collection containing all blog categories, ordered by category name.

  Returns:
    a sorted List of Category instances

### getCategories

    public java.util.List<Category> getCategories(Category category)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006, Simon Brown. All Rights Reserved.