|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.blog.BlogCategory org.blojsom.blog.FileBackedBlogCategory
FileBackedBlogCategory
Field Summary | |
protected BlogUser |
_blogUser
|
Fields inherited from class org.blojsom.blog.BlogCategory |
_blogEntry, _category, _categoryURL, _description, _metadata, _name, _parentCategory, _subcategories |
Constructor Summary | |
FileBackedBlogCategory()
Create a new FileBackedBlogCategory. |
|
FileBackedBlogCategory(java.lang.String category,
java.lang.String categoryURL)
Create a new FileBackedBlogCategory. |
Method Summary | |
int |
countBlogEntries(Blog blog,
boolean recursive)
Count the number of blog entries in this category. |
void |
delete(Blog blog)
Deprecated. |
void |
delete(BlogUser blogUser)
Delete the blog 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 |
void |
load(Blog blog)
Deprecated. |
void |
load(BlogUser blogUser)
Load a blog category. |
protected void |
loadMetaData(java.lang.String blogHome,
java.lang.String[] propertiesExtensions)
Load the meta data for the category |
protected int |
recursiveBlogEntriesCounter(Blog blog,
boolean recursive,
java.lang.String rootDirectory)
Recursively count the blog entries in a blog directory |
protected void |
recursiveCategoryBuilder(BlogUser blogUser,
int blogDepth,
int blogDirectoryDepth,
java.lang.String blogDirectory,
java.util.List categoryList)
Build a list of blog categories recursively |
void |
save(Blog blog)
Deprecated. |
void |
save(BlogUser blogUser)
Save the blog category. |
Methods inherited from class org.blojsom.blog.BlogCategory |
compareTo, equals, getCategory, getCategoryURL, getDescription, getEncodedCategory, getEncodedCategoryURL, getMetaData, getName, getParentCategory, setAttributes, setCategory, setCategoryURL, setDescription, setMetaData, setMetaData, setName, setParentCategory, setSubcategories, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient BlogUser _blogUser
Constructor Detail |
public FileBackedBlogCategory()
public FileBackedBlogCategory(java.lang.String category, java.lang.String categoryURL)
category
- Category namecategoryURL
- Category URLMethod Detail |
protected void loadMetaData(java.lang.String blogHome, java.lang.String[] propertiesExtensions)
blogHome
- Directory where blog entries are storedpropertiesExtensions
- List of file extensions to use when looking for category propertiespublic void load(Blog blog) throws BlojsomException
load
in class BlogCategory
blog
- Blog
BlojsomException
- If there is an error loading the categorypublic void save(Blog blog) throws BlojsomException
save
in class BlogCategory
blog
- Blog
BlojsomException
- If there is an error saving the categorypublic void delete(Blog blog) throws BlojsomException
delete
in class BlogCategory
blog
- Blog
BlojsomException
- If there is an error deleting the categorypublic void load(BlogUser blogUser) throws BlojsomException
load
in class BlogCategory
blogUser
- BlogUser
BlojsomException
- If there is an error loading the categorypublic void save(BlogUser blogUser) throws BlojsomException
save
in class BlogCategory
blogUser
- BlogUser
BlojsomException
- If there is an error saving the categorypublic void delete(BlogUser blogUser) throws BlojsomException
delete
in class BlogCategory
blogUser
- BlogUser
BlojsomException
- If there is an error deleting the categoryprotected int recursiveBlogEntriesCounter(Blog blog, boolean recursive, java.lang.String rootDirectory)
blog
- Blog
recursive
- Set to true
if entries in sub-categories should be countedrootDirectory
-
public int countBlogEntries(Blog blog, boolean recursive)
recursive
is true, the method
will also count entries in all sub-categories.
countBlogEntries
in class BlogCategory
blog
- Blog
recursive
- Set to true
if entries in sub-categories should be counted
protected void recursiveCategoryBuilder(BlogUser blogUser, int blogDepth, int blogDirectoryDepth, java.lang.String blogDirectory, java.util.List categoryList)
blogUser
- BlogUser
blogDepth
- Depth at which the current iteration is runningblogDirectoryDepth
- Depth to which the fetcher should stop looking for categoriesblogDirectory
- Directory in which the current iteration is runningcategoryList
- Dynamic list of categories that gets added to as it explores directoriespublic java.util.List getSubcategories()
getSubcategories
in class BlogCategory
List
of sub-categories as BlogCategory
objectspublic java.util.List getSubcategories(int depth)
getSubcategories
in class BlogCategory
depth
- Depth of sub-categories to retrieve, use -1 for all sub-categories
BlogCategory
objects
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |