|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.blojsom.blog.BlogEntry
org.blojsom.blog.FileBackedBlogEntry
FileBackedBlogEntry
| Field Summary | |
protected java.lang.String |
_blogFileEncoding
|
protected java.lang.String |
_commentsDirectory
|
protected org.apache.commons.logging.Log |
_logger
|
protected java.lang.String |
_pingbacksDirectory
|
protected java.io.File |
_source
|
protected java.lang.String |
_trackbacksDirectory
|
| Fields inherited from class org.blojsom.blog.BlogEntry |
_blogCategory, _category, _comments, _description, _entryDate, _filename, _lastModified, _link, _metaData, _pingbacks, _title, _trackbacks |
| Fields inherited from interface org.blojsom.util.BlojsomMetaDataConstants |
BLOG_ENTRY_METADATA_AUTHOR, BLOG_ENTRY_METADATA_AUTHOR_EXT, BLOG_ENTRY_METADATA_TIMESTAMP, BLOG_METADATA_COMMENTS_DISABLED, BLOG_METADATA_HEADER, BLOG_METADATA_PINGBACKS_DISABLED, BLOG_METADATA_TRACKBACKS_DISABLED, SOURCE_ATTRIBUTE |
| Constructor Summary | |
FileBackedBlogEntry()
Create a new blog entry with no data |
|
FileBackedBlogEntry(java.lang.String title,
java.lang.String link,
java.lang.String description,
java.io.File source)
Create a new blog entry |
|
| Method Summary | |
void |
delete(BlogUser blogUser)
Delete the blog entry. |
java.lang.String |
getId()
Returns the BlogId for this entry |
java.lang.String |
getPermalink()
Return the permalink name for this blog entry |
java.io.File |
getSource()
File containing the blog entry |
void |
load(BlogUser blogUser)
Load a blog entry. |
protected void |
loadBlogCategory(BlogUser blogUser)
Load the blog category information for this entry |
protected BlogComment |
loadComment(java.io.File commentFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
Load a comment for this blog entry from disk Comments must always have the form: author author e-mail address author url everything else after is the comment |
protected void |
loadComments(BlogUser blogUser)
Convenience method to load the comments for this blog entry. |
protected void |
loadMetaData(Blog blog)
Load the meta data for the entry |
protected Pingback |
loadPingback(java.io.File pingbackFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
Load a pingback for this blog entry from disk Pingbacks must always have the form: title url blog_name excerpt |
protected void |
loadPingbacks(BlogUser blogUser)
Convenience method to load the pingbacks for this blog entry. |
protected Trackback |
loadTrackback(java.io.File trackbackFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
Load a trackback for this blog entry from disk Trackbacks must always have the form: title excerpt url blog_name |
protected void |
loadTrackbacks(BlogUser blogUser)
Convenience method to load the trackbacks for this blog entry. |
protected void |
reloadSource(Blog blog)
Reload the blog entry from disk The first line of the blog entry will be used as the title of the blog |
void |
save(BlogUser blogUser)
Save the blog entry. |
protected void |
saveMetaData(Blog blog)
Store the meta data for the entry |
void |
setAttributes(java.util.Map attributeMap)
Set any attributes of the blog entry using data from the map. |
void |
setBlogFileEncoding(java.lang.String blogFileEncoding)
Set the file encoding to use when loading the blog entry |
void |
setCommentsDirectory(java.lang.String commentsDirectory)
Set the directory for comments |
void |
setPingbacksDirectory(java.lang.String pingbacksDirectory)
Set the directory for pingbacks |
void |
setSource(java.io.File source)
Set the file of the blog entry |
void |
setTrackbacksDirectory(java.lang.String trackbacksDirectory)
Set the directory for trackbacks |
boolean |
supportsComments()
Determines whether or not this blog entry supports comments by testing to see if the blog entry is writable. |
boolean |
supportsPingbacks()
Determines whether or not this blog entry supports pingbacks. |
boolean |
supportsTrackbacks()
Determines whether or not this blog entry supports trackbacks. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected transient org.apache.commons.logging.Log _logger
protected transient java.io.File _source
protected transient java.lang.String _commentsDirectory
protected transient java.lang.String _trackbacksDirectory
protected transient java.lang.String _pingbacksDirectory
protected transient java.lang.String _blogFileEncoding
| Constructor Detail |
public FileBackedBlogEntry()
public FileBackedBlogEntry(java.lang.String title,
java.lang.String link,
java.lang.String description,
java.io.File source)
title - Entry titlelink - Permalink to the entrydescription - Entry descriptionsource - File containing the blog entry| Method Detail |
public void setBlogFileEncoding(java.lang.String blogFileEncoding)
blogFileEncoding - File encodingpublic java.io.File getSource()
public void setSource(java.io.File source)
source - File for the blog entrypublic java.lang.String getId()
getId in class BlogEntrypublic java.lang.String getPermalink()
getPermalink in class BlogEntry
protected void reloadSource(Blog blog)
throws java.io.IOException
blog - Blog information
java.io.IOException - If there is an error loading the blog entrypublic boolean supportsComments()
supportsComments in class BlogEntrytrue if the blog entry is writable, false otherwisepublic boolean supportsTrackbacks()
supportsTrackbacks in class BlogEntrytrue if the blog entry supports trackbacks, false otherwisepublic boolean supportsPingbacks()
supportsPingbacks in class BlogEntrytrue if the blog entry supports pingbacks, false otherwisepublic void setCommentsDirectory(java.lang.String commentsDirectory)
commentsDirectory - Comments directoryprotected void loadComments(BlogUser blogUser)
blogUser - BlogUser information
protected BlogComment loadComment(java.io.File commentFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
throws BlojsomException
commentFile - Comment fileblogFileEncoding - Encoding for blog filesblogUser - BlogUser
BlojsomExceptionpublic void setTrackbacksDirectory(java.lang.String trackbacksDirectory)
trackbacksDirectory - Trackbacks directoryprotected void loadTrackbacks(BlogUser blogUser)
blogUser - BlogUser information
protected Trackback loadTrackback(java.io.File trackbackFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
throws BlojsomException
trackbackFile - Trackback fileblogFileEncoding - Encoding for blog filesblogUser - BlogUser information
BlojsomExceptionpublic void setPingbacksDirectory(java.lang.String pingbacksDirectory)
pingbacksDirectory - Pingbacks directoryprotected void loadPingbacks(BlogUser blogUser)
blogUser - BlogUser information
protected Pingback loadPingback(java.io.File pingbackFile,
java.lang.String blogFileEncoding,
BlogUser blogUser)
throws BlojsomException
pingbackFile - Pingback fileblogFileEncoding - Encoding for blog filesblogUser - BlogUser
Pingback loaded from disk
BlojsomExceptionprotected void loadMetaData(Blog blog)
blog - Blog informationprotected void saveMetaData(Blog blog)
blog - Blog informationprotected void loadBlogCategory(BlogUser blogUser)
blogUser - BlogUser information
public void load(BlogUser blogUser)
throws BlojsomException
load in class BlogEntryblogUser - User information
BlojsomException - If there is an error loading the entry
public void save(BlogUser blogUser)
throws BlojsomException
save in class BlogEntryblogUser - User information
BlojsomException - If there is an error saving the entry
public void delete(BlogUser blogUser)
throws BlojsomException
delete in class BlogEntryblogUser - User information
BlojsomException - If there is an error deleting the entrypublic void setAttributes(java.util.Map attributeMap)
setAttributes in class BlogEntryattributeMap - Attributes
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||