|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pebble.domain.Content
net.sourceforge.pebble.domain.PageBasedContent
net.sourceforge.pebble.domain.BlogEntry
public class BlogEntry
Represents a blog entry.
Field Summary | |
---|---|
static java.lang.String |
ATTACHMENT_PROPERTY
|
static java.lang.String |
CATEGORIES_PROPERTY
|
static java.lang.String |
COMMENTS_ENABLED_PROPERTY
|
static java.lang.String |
EXCERPT_PROPERTY
|
static java.lang.String |
TAGS_PROPERTY
|
static java.lang.String |
TRACKBACKS_ENABLED_PROPERTY
|
Fields inherited from class net.sourceforge.pebble.domain.PageBasedContent |
---|
AUTHOR_PROPERTY, BODY_PROPERTY, DATE_PROPERTY, ORIGINAL_PERMALINK_PROPERTY, SUBTITLE_PROPERTY, TITLE_PROPERTY |
Fields inherited from class net.sourceforge.pebble.domain.Content |
---|
propertyChangeSupport |
Constructor Summary | |
---|---|
BlogEntry(Blog blog)
Creates a new blog entry. |
Method Summary | |
---|---|
void |
addCategory(Category category)
Sets the category of this blog entry. |
void |
addComment(Comment comment)
Adds the specified comment. |
void |
addTrackBack(TrackBack trackBack)
Adds the specified trackback. |
void |
clearEvents()
|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
Comment |
createComment(java.lang.String title,
java.lang.String body,
java.lang.String author,
java.lang.String email,
java.lang.String website,
java.lang.String ipAddress)
Creates a new comment for this blog entry, with a creation date of now. |
Comment |
createComment(java.lang.String title,
java.lang.String body,
java.lang.String author,
java.lang.String email,
java.lang.String website,
java.lang.String ipAddress,
java.util.Date date,
State state)
Creates a new comment for this blog entry. |
TrackBack |
createTrackBack(java.lang.String title,
java.lang.String excerpt,
java.lang.String url,
java.lang.String blogName,
java.lang.String ipAddress)
Creates a new trackback for this blog entry with a date of now. |
TrackBack |
createTrackBack(java.lang.String title,
java.lang.String excerpt,
java.lang.String url,
java.lang.String blogName,
java.lang.String ipAddress,
java.util.Date date,
State state)
Creates a new trackback for this blog entry. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
java.util.List<Tag> |
getAllTags()
Gets a list of all tags. |
Attachment |
getAttachment()
Gets the attachment associated with this blog entry. |
java.util.Set<Category> |
getCategories()
Gets the category of this blog entry. |
Comment |
getComment(long id)
Gets the specified comment. |
java.util.List<Comment> |
getComments()
Gets a collection of all comments. |
java.lang.String |
getCommentsLink()
Gets a link to the comments for this blog entry. |
java.lang.String |
getContent()
Gets the content of this response. |
java.lang.String |
getExcerpt()
Gets the excerpt of this blog entry. |
java.lang.String |
getGuid()
|
java.util.Date |
getLastModified()
Gets the date that this blog entry was last updated. |
java.lang.String |
getLocalPermalink()
Gets a permalink for this blog entry that is local to the blog. |
BlogEntry |
getNextBlogEntry()
Returns the blog entry that was posted after this one. |
int |
getNumberOfComments()
Gets the number of comments that have been left for this blog entry. |
int |
getNumberOfResponses()
Gets the number of responses that have been left for this blog entry. |
int |
getNumberOfTrackBacks()
Gets the number of trackbacks that have been left for this blog entry. |
BlogEntry |
getPreviousBlogEntry()
Returns the blog entry that was posted before this one. |
Response |
getResponse(java.lang.String guid)
Gets the response specified by the guid. |
java.util.List<Response> |
getResponses()
Gets a list of all comments and TrackBacks. |
java.lang.String |
getTags()
Gets the tags associated with this category. |
java.util.List<Tag> |
getTagsAsList()
Gets the tags associated with this category, as a List. |
java.util.TimeZone |
getTimeZone()
|
java.lang.String |
getTimeZoneId()
|
TrackBack |
getTrackBack(long id)
Gets the specified TrackBack. |
java.lang.String |
getTrackBackLink()
Gets the link that blogs can send TrackBacks too. |
java.util.List<TrackBack> |
getTrackBacks()
Gets a collection of all trackbacks. |
java.lang.String |
getTrackBacksLink()
Gets a link to the trackbacks for this blog entry. |
int |
hashCode()
|
boolean |
hasTag(java.lang.String s)
Determines whether this blog entry has the specified tag. |
boolean |
inCategory(Category category)
Determines whether this blog entry is in the specified category. |
boolean |
isCommentsEnabled()
Determines whether comments are enabled for this blog entry. |
boolean |
isTrackBacksEnabled()
Determines whether TrackBacks are enabled for this blog entry. |
void |
removeAllCategories()
Removes all categories from this blog entry. |
void |
removeComment(long id)
Removes the specified comment. |
void |
removeResponse(Response response)
Removes the specified comment or TrackBack. |
void |
removeTrackBack(long id)
Removes the specified TrackBack. |
void |
setAttachment(Attachment newAttachment)
Sets the attachment associated with thie blog entry. |
void |
setCategories(java.util.Collection newCategories)
Sets the categories for this blog entry. |
void |
setCommentsEnabled(boolean newCommentsEnabled)
Sets whether comments are enabled for this blog entry. |
void |
setDate(java.util.Date newDate)
Sets the date that this blog entry was created. |
void |
setExcerpt(java.lang.String newExcerpt)
Sets the excerpt of this blog entry. |
void |
setTags(java.lang.String newTags)
Sets the set of tags associated with this category. |
void |
setTimeZoneId(java.lang.String timeZoneId)
|
void |
setTitle(java.lang.String newTitle)
Sets the title of this blog entry. |
void |
setTrackBacksEnabled(boolean newTrackBacksEnabled)
Sets whether TrackBacks are enabled for this blog entry. |
java.lang.String |
toString()
Gets a string representation of this object. |
void |
validate(ValidationContext context)
|
Methods inherited from class net.sourceforge.pebble.domain.PageBasedContent |
---|
getAuthor, getBlog, getBody, getDate, getId, getOriginalPermalink, getPermalink, getSubtitle, getTitle, getUser, isAggregated, isPersistent, isPublished, isUnpublished, setAuthor, setBody, setOriginalPermalink, setPersistent, setPublished, setSubtitle |
Methods inherited from class net.sourceforge.pebble.domain.Content |
---|
clearPropertyChangeEvents, getEvents, getPropertyChangeEvents, getState, getTruncatedContent, hasEvents, isDirty, nextEvent |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXCERPT_PROPERTY
public static final java.lang.String COMMENTS_ENABLED_PROPERTY
public static final java.lang.String TRACKBACKS_ENABLED_PROPERTY
public static final java.lang.String ATTACHMENT_PROPERTY
public static final java.lang.String CATEGORIES_PROPERTY
public static final java.lang.String TAGS_PROPERTY
Constructor Detail |
---|
public BlogEntry(Blog blog)
blog
- the owning BlogMethod Detail |
---|
public void setTitle(java.lang.String newTitle)
setTitle
in class PageBasedContent
newTitle
- the title as a Stringpublic java.util.Set<Category> getCategories()
public java.util.List<Tag> getAllTags()
public void addCategory(Category category)
category
- the category as a Stringpublic void removeAllCategories()
public void setCategories(java.util.Collection newCategories)
newCategories
- a Collection of Category instancespublic boolean inCategory(Category category)
category
- a Category instance
public boolean hasTag(java.lang.String s)
s
- a String
public java.lang.String getTags()
public java.util.List<Tag> getTagsAsList()
public void setTags(java.lang.String newTags)
newTags
- a set of tagspublic java.lang.String getContent()
getContent
in class PageBasedContent
public java.lang.String getExcerpt()
public void setExcerpt(java.lang.String newExcerpt)
newExcerpt
- the excerpt as a Stringpublic java.util.Date getLastModified()
getLastModified
in class PageBasedContent
public void setDate(java.util.Date newDate)
setDate
in class PageBasedContent
newDate
- a java.util.Date instancepublic java.lang.String getLocalPermalink()
getLocalPermalink
in class PageBasedContent
public Attachment getAttachment()
public void setAttachment(Attachment newAttachment)
newAttachment
- an Attachment instancepublic boolean isCommentsEnabled()
public void setCommentsEnabled(boolean newCommentsEnabled)
newCommentsEnabled
- true if comments should be enabled,
false otherwisepublic java.lang.String getCommentsLink()
public boolean isTrackBacksEnabled()
public void setTrackBacksEnabled(boolean newTrackBacksEnabled)
newTrackBacksEnabled
- true if TrackBacks should be enabled,
false otherwisepublic java.lang.String getTrackBacksLink()
public java.lang.String getTrackBackLink()
public java.util.List<Response> getResponses()
public java.util.List<Comment> getComments()
public int getNumberOfComments()
public java.util.List<TrackBack> getTrackBacks()
public int getNumberOfTrackBacks()
public int getNumberOfResponses()
public Comment createComment(java.lang.String title, java.lang.String body, java.lang.String author, java.lang.String email, java.lang.String website, java.lang.String ipAddress, java.util.Date date, State state)
title
- the title of the commentbody
- the body of the commentauthor
- the author of the commentemail
- the author's e-mail addresswebsite
- the author's websiteipAddress
- the IP address of the authordate
- the date that the comment was createdstate
- the state of the comment
public Comment createComment(java.lang.String title, java.lang.String body, java.lang.String author, java.lang.String email, java.lang.String website, java.lang.String ipAddress)
title
- the title of the commentbody
- the body of the commentauthor
- the author of the commentemail
- the author's e-mail addresswebsite
- the author's websiteipAddress
- the IP address of the author
public void addComment(Comment comment)
comment
- a Comment instancepublic TrackBack createTrackBack(java.lang.String title, java.lang.String excerpt, java.lang.String url, java.lang.String blogName, java.lang.String ipAddress, java.util.Date date, State state)
title
- the title of the entryexcerpt
- the excerpt of the entryurl
- the url (permalink) of the entryblogName
- the name of the blogipAddress
- the IP address of the authordate
- the date the trackback was received
public TrackBack createTrackBack(java.lang.String title, java.lang.String excerpt, java.lang.String url, java.lang.String blogName, java.lang.String ipAddress)
title
- the title of the entryexcerpt
- the excerpt of the entryurl
- the url (permalink) of the entryblogName
- the name of the blogipAddress
- the IP address of the author
public void addTrackBack(TrackBack trackBack)
trackBack
- a TrackBack instancepublic void removeComment(long id)
id
- the id of the comment to be removedpublic Comment getComment(long id)
id
- the id of the commentpublic TrackBack getTrackBack(long id)
id
- the id of the TrackBackpublic Response getResponse(java.lang.String guid)
guid
- the response guid
public void removeTrackBack(long id)
id
- the id of the TrackBack to be removedpublic void removeResponse(Response response)
response
- the Response to be removedpublic BlogEntry getPreviousBlogEntry()
public BlogEntry getNextBlogEntry()
public void validate(ValidationContext context)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.hashCode()
,
Hashtable
public java.lang.String getGuid()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
Cloneable
public void clearEvents()
public java.lang.String toString()
PageBasedContent
toString
in class PageBasedContent
public java.util.TimeZone getTimeZone()
public java.lang.String getTimeZoneId()
public void setTimeZoneId(java.lang.String timeZoneId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |