org.blojsom.blog
Interface Category

All Known Implementing Classes:
DatabaseCategory

public interface Category

Category

Since:
blojsom 3.0
Version:
$Id: Category.java,v 1.4 2007/01/17 02:35:16 czarneckid Exp $
Author:
David Czarnecki

Method Summary
 java.lang.Integer getBlogId()
          Get the blog ID
 java.lang.String getDescription()
          Retrieves the description of this category
 java.lang.String getEncodedName()
          Return the category name encoded for a link
 java.lang.Integer getId()
          Get the category ID
 java.util.Map getMetaData()
          Retrieves the meta-data associated with this category
 java.lang.String getName()
          Return the category name
 Category getParentCategory()
          Returns the parent category of this category.
 java.lang.Integer getParentCategoryId()
          Get the blog parent category ID
 void setBlogId(java.lang.Integer blogId)
          Set the blog ID
 void setDescription(java.lang.String desc)
          Sets the description of this category
 void setId(java.lang.Integer id)
          Set the category ID
 void setMetaData(java.util.Map metadata)
          Set the meta-data associated with this category
 void setName(java.lang.String name)
          Set a new name for this category
 void setParentCategory(Category category)
          Sets the parent category of this category
 void setParentCategoryId(java.lang.Integer id)
          Se the parent category ID
 

Method Detail

getId

public java.lang.Integer getId()
Get the category ID

Returns:
Category ID

setId

public void setId(java.lang.Integer id)
Set the category ID

Parameters:
id - Category ID

getParentCategoryId

public java.lang.Integer getParentCategoryId()
Get the blog parent category ID

Returns:
Parent category ID

setParentCategoryId

public void setParentCategoryId(java.lang.Integer id)
Se the parent category ID


getBlogId

public java.lang.Integer getBlogId()
Get the blog ID

Returns:
Blog ID

setBlogId

public void setBlogId(java.lang.Integer blogId)
Set the blog ID

Parameters:
blogId - Blog ID

getName

public java.lang.String getName()
Return the category name

Returns:
Category name

getEncodedName

public java.lang.String getEncodedName()
Return the category name encoded for a link

Returns:
Category name encoded as UTF-8 with preserved "/" and "+" characters

setName

public void setName(java.lang.String name)
Set a new name for this category

Parameters:
name - Category name

setDescription

public void setDescription(java.lang.String desc)
Sets the description of this category

Parameters:
desc - The new description of the category

getDescription

public java.lang.String getDescription()
Retrieves the description of this category

Returns:
The description of the category

setMetaData

public void setMetaData(java.util.Map metadata)
Set the meta-data associated with this category

Parameters:
metadata - The map to be associated with the category as meta-data

getMetaData

public java.util.Map getMetaData()
Retrieves the meta-data associated with this category

Returns:
The properties associated with the category as meta-data, or null if no metadata exists

getParentCategory

public Category getParentCategory()
Returns the parent category of this category. Defaults to "/"

Returns:
Category containing the parent category

setParentCategory

public void setParentCategory(Category category)
Sets the parent category of this category