|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.blog.BlogCategory
BlogCategory
Field Summary | |
protected BlogEntry |
_blogEntry
|
protected java.lang.String |
_category
|
protected java.lang.String |
_categoryURL
|
protected java.lang.String |
_description
|
protected org.apache.commons.logging.Log |
_logger
|
protected java.util.Map |
_metadata
|
protected java.lang.String |
_name
|
protected BlogCategory |
_parentCategory
|
protected java.util.List |
_subcategories
|
Constructor Summary | |
BlogCategory()
Create a new BlogCategory. |
|
BlogCategory(java.lang.String category,
java.lang.String categoryURL)
Create a new BlogCategory. |
Method Summary | |
int |
compareTo(java.lang.Object o)
Compare the current category to the input category |
abstract int |
countBlogEntries(Blog blog,
boolean recursive)
Count the number of blog entries in this category. |
abstract void |
delete(Blog blog)
Deprecated. |
abstract void |
delete(BlogUser blogUser)
Delete the blog category. |
boolean |
equals(java.lang.Object obj)
Checks to see if this category is equal to the input category |
java.lang.String |
getCategory()
Return the category name |
java.lang.String |
getCategoryURL()
Return the URL for this category |
java.lang.String |
getDescription()
Retrieves the description of this category |
java.lang.String |
getEncodedCategory()
Return the category name encoded for a link |
java.lang.String |
getEncodedCategoryURL()
Return the category URL encoded for a link |
java.util.Map |
getMetaData()
Retrieves the meta-data associated with this category |
java.lang.String |
getName()
Retrieves the name of this category |
BlogCategory |
getParentCategory()
Returns the parent category of this category. |
java.util.List |
getSubcategories()
Return a list of sub-categories under the current category |
java.util.List |
getSubcategories(int depth)
Retrieve a list of sub-categories under the current category up to a certain depth |
abstract void |
load(Blog blog)
Deprecated. |
abstract void |
load(BlogUser blogUser)
Load a blog category. |
abstract void |
save(Blog blog)
Deprecated. |
abstract void |
save(BlogUser blogUser)
Save the blog category. |
void |
setAttributes(java.util.Map attributeMap)
Set any attributes of the blog category using data from the map. |
void |
setCategory(java.lang.String category)
Set a new name for this category |
void |
setCategoryURL(java.lang.String categoryURL)
Set a new URL for this category |
void |
setDescription(java.lang.String desc)
Sets the description of this category |
void |
setMetaData(java.util.Map metadata)
Set the meta-data associated with this category |
void |
setMetaData(java.util.Properties data)
Sets the meta-data associated with this category. |
void |
setName(java.lang.String name)
Sets the name of this category |
void |
setParentCategory(BlogCategory cateogory)
Sets the parent category of this category |
void |
setSubcategories(java.util.List subcategories)
Set the sub-categories for this category |
java.lang.String |
toString()
Returns the category name |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected org.apache.commons.logging.Log _logger
protected java.lang.String _categoryURL
protected java.lang.String _category
protected java.util.Map _metadata
protected java.lang.String _description
protected java.lang.String _name
protected java.util.List _subcategories
protected BlogEntry _blogEntry
protected BlogCategory _parentCategory
Constructor Detail |
public BlogCategory()
public BlogCategory(java.lang.String category, java.lang.String categoryURL)
category
- Category namecategoryURL
- Category URLMethod Detail |
public java.lang.String getCategoryURL()
public void setCategoryURL(java.lang.String categoryURL)
categoryURL
- Category URLpublic java.lang.String getCategory()
public java.lang.String getEncodedCategory()
public java.lang.String getEncodedCategoryURL()
{@link BlojsomUtils#urlEncodeForLink(java.lang.String)}
public void setCategory(java.lang.String category)
category
- Category namepublic boolean equals(java.lang.Object obj)
obj
- Input category
true
if the category name and category URL are equal, false
otherwisepublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- Input category
public java.lang.String toString()
getCategory()
public void setDescription(java.lang.String desc)
desc
- The new description of the categorypublic java.lang.String getDescription()
public void setName(java.lang.String name)
name
- The new name of the categorypublic java.lang.String getName()
public void setMetaData(java.util.Map metadata)
metadata
- The map to be associated with the category as meta-datapublic void setMetaData(java.util.Properties data)
data
- The properties to be associated with the category as meta-datapublic java.util.Map getMetaData()
public void setAttributes(java.util.Map attributeMap)
attributeMap
- Attributespublic abstract void load(Blog blog) throws BlojsomException
blog
- Blog
BlojsomException
- If there is an error loading the categorypublic abstract void save(Blog blog) throws BlojsomException
blog
- Blog
BlojsomException
- If there is an error saving the categorypublic abstract void delete(Blog blog) throws BlojsomException
blog
- Blog
BlojsomException
- If there is an error deleting the categorypublic abstract void load(BlogUser blogUser) throws BlojsomException
blogUser
- BlogUser
BlojsomException
- If there is an error loading the categorypublic abstract void save(BlogUser blogUser) throws BlojsomException
blogUser
- BlogUser
BlojsomException
- If there is an error saving the categorypublic abstract void delete(BlogUser blogUser) throws BlojsomException
blogUser
- BlogUser
BlojsomException
- If there is an error deleting the categorypublic abstract int countBlogEntries(Blog blog, boolean recursive)
recursive
is true, the method
will also count entries in all sub-categories.
blog
- Blog
recursive
- Set to true
if entries in sub-categories should be counted
public java.util.List getSubcategories()
List
of sub-categories as BlogCategory
objectspublic java.util.List getSubcategories(int depth)
depth
- Depth of sub-categories to retrieve, use -1 for all sub-categories
BlogCategory
objectspublic void setSubcategories(java.util.List subcategories)
subcategories
- List
of BlogCategory
objectspublic BlogCategory getParentCategory()
BlogCategory
containing the parent categorypublic void setParentCategory(BlogCategory cateogory)
cateogory
- BlogCategory
that represents the parent category
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |