|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pebble.domain.Category
public class Category
Represents a blog category.
Constructor Summary | |
---|---|
Category()
Default, no args constructor. |
|
Category(java.lang.String id,
java.lang.String name)
Creates a new category with the specified properties. |
Method Summary | |
---|---|
void |
addBlogEntry(java.lang.String blogEntry)
Adds a blog entry to this category. |
void |
addSubCategory(Category category)
Adds a sub-category. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Determines whether the specified object is equal to this one. |
java.util.List |
getAllTags()
Gets the tags associated with this category and its parents. |
java.util.List<java.lang.String> |
getBlogEntries()
Gets the blog entries associated with this category. |
java.lang.String |
getId()
Gets the id of this category. |
java.lang.String |
getName()
Gets the name of this category. |
int |
getNumberOfBlogEntries()
Gets the number of blog entries associated with this category. |
int |
getNumberOfParents()
Gets the number of parents that this category has. |
Category |
getParent()
Gets the parent of thie category. |
java.lang.String |
getPermalink()
Gets the permalink for this object. |
java.util.List |
getSubCategories()
Gets the list of sub-categories. |
java.lang.String |
getTags()
Gets the tags associated with this category. |
java.util.List |
getTagsAsList()
Gets the tags associated with this category, as a List. |
int |
hashCode()
Gets the hashcode of this object. |
boolean |
hasParent(Category category)
Determines whether this category has the specified parent. |
boolean |
isRootCategory()
Determines whether this category is a root category. |
void |
removeAllBlogEntries()
Removes all blog entries from this category. |
void |
removeBlogEntry(java.lang.String blogEntry)
Removes a blog entry from this category. |
void |
removeSubCategory(Category category)
Removes a sub-category. |
void |
setBlog(Blog blog)
Sets the owning blog. |
void |
setId(java.lang.String id)
Sets the id of this category. |
void |
setName(java.lang.String name)
Sets the name of this category. |
void |
setParent(Category parent)
Sets the parent of this category. |
void |
setTags(java.lang.String newTags)
Sets the set of tags associated with this category. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Category()
public Category(java.lang.String id, java.lang.String name)
id
- the idname
- the nameMethod Detail |
---|
public java.lang.String getId()
public void setId(java.lang.String id)
id
- the id as a Stringpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the new category namepublic boolean isRootCategory()
public Category getParent()
public boolean hasParent(Category category)
category
- a Category to test for
public void setParent(Category parent)
parent
- a Category instancepublic int getNumberOfParents()
public void addSubCategory(Category category)
category
- a Category instancepublic void removeSubCategory(Category category)
category
- a Category instancepublic java.util.List getSubCategories()
public java.lang.String getTags()
public java.util.List getTagsAsList()
public java.util.List getAllTags()
public void setTags(java.lang.String newTags)
newTags
- a set of tagspublic void setBlog(Blog blog)
blog
- a Blog instancepublic java.lang.String getPermalink()
getPermalink
in interface Permalinkable
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to compare against
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the Object to be compared.
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this Object.public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<java.lang.String> getBlogEntries()
public void addBlogEntry(java.lang.String blogEntry)
blogEntry
- a blog entry idpublic void removeBlogEntry(java.lang.String blogEntry)
blogEntry
- a blog entry idpublic void removeAllBlogEntries()
public int getNumberOfBlogEntries()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |