org.blojsom.blog
Interface Comment

All Superinterfaces:
Response
All Known Implementing Classes:
DatabaseComment

public interface Comment
extends Response

Comment

Since:
blojsom 3.0
Version:
$Id: Comment.java,v 1.8 2007/01/17 02:35:16 czarneckid Exp $
Author:
David Czarnecki

Field Summary
 
Fields inherited from interface org.blojsom.blog.Response
COMMENT_TYPE, PINGBACK_TYPE, TRACKBACK_TYPE
 
Method Summary
 java.lang.String getAuthor()
          Get the author of the comment
 java.lang.String getAuthorEmail()
          Get the e-mail of the author of the comment
 java.lang.String getAuthorURL()
          Get the URL of the author
 java.lang.Integer getBlogEntryId()
          Get the blog entry ID
 java.lang.Integer getBlogId()
          Get the blog ID
 java.lang.String getComment()
          Get the comment
 java.util.Date getCommentDate()
          Get the date the comment was entered
 java.lang.String getDateAsFormat(java.lang.String format)
          Return the comment date formatted with a specified date format
 java.lang.String getDateAsFormat(java.lang.String format, java.util.Locale locale)
          Return the comment date formatted with a specified date format
 Entry getEntry()
          Retrieve the Entry associated with this comment
 java.lang.String getEscapedAuthor()
          Get the author as an escaped string
 java.lang.String getEscapedAuthorEmail()
          Get the escaped e-mail of the author of the comment
 java.lang.String getEscapedAuthorURL()
          Get the escaped URL of the author
 java.lang.String getEscapedComment()
          Get the comment as a escaped string
 java.lang.Integer getId()
          Get the comment ID
 java.lang.String getISO8601Date()
          Return an ISO 8601 style date http://www.w3.org/TR/NOTE-datetime
 java.util.Map getMetaData()
          Get the comment meta-data
 java.lang.Integer getParentId()
          Get the comment parent ID
 java.lang.String getRFC822Date()
          Return an RFC 822 style date
 void setAuthor(java.lang.String author)
          Set the author of the comment
 void setAuthorEmail(java.lang.String authorEmail)
          Set the e-mail of the author of the comment
 void setAuthorURL(java.lang.String authorURL)
          Set the URL for the author
 void setBlogEntryId(java.lang.Integer blogEntryId)
          Set the blog entry ID
 void setBlogId(java.lang.Integer blogId)
          Set the blog ID
 void setComment(java.lang.String comment)
          Set the new comment
 void setCommentDate(java.util.Date commentDate)
          Set the date for the comment
 void setEntry(Entry entry)
          Set the Entry associated with this comment
 void setId(java.lang.Integer id)
          Set the comment ID
 void setMetaData(java.util.Map metaData)
          Set the comment meta-data
 void setParentId(java.lang.Integer parentId)
          Set the comment parent ID
 
Methods inherited from interface org.blojsom.blog.Response
getDate, getIp, getStatus, getType, setIp, setStatus
 

Method Detail

setId

public void setId(java.lang.Integer id)
Set the comment ID

Parameters:
id - Comment ID

getId

public java.lang.Integer getId()
Get the comment ID

Returns:
Comment ID

setBlogId

public void setBlogId(java.lang.Integer blogId)
Set the blog ID

Parameters:
blogId - Blog ID

getBlogId

public java.lang.Integer getBlogId()
Get the blog ID

Returns:
Blog ID

getBlogEntryId

public java.lang.Integer getBlogEntryId()
Get the blog entry ID

Returns:
Blog entry ID

setBlogEntryId

public void setBlogEntryId(java.lang.Integer blogEntryId)
Set the blog entry ID

Parameters:
blogEntryId - Blog entry ID

getAuthor

public java.lang.String getAuthor()
Get the author of the comment

Returns:
Comment author

getEscapedAuthor

public java.lang.String getEscapedAuthor()
Get the author as an escaped string

Returns:
Escaped author

setAuthor

public void setAuthor(java.lang.String author)
Set the author of the comment

Parameters:
author - Comment's new author

getAuthorEmail

public java.lang.String getAuthorEmail()
Get the e-mail of the author of the comment

Returns:
Author's e-mail

getEscapedAuthorEmail

public java.lang.String getEscapedAuthorEmail()
Get the escaped e-mail of the author of the comment

Returns:
Escaped author e-mail

setAuthorEmail

public void setAuthorEmail(java.lang.String authorEmail)
Set the e-mail of the author of the comment

Parameters:
authorEmail - Author's new e-mail

getAuthorURL

public java.lang.String getAuthorURL()
Get the URL of the author

Returns:
Author's URL

getEscapedAuthorURL

public java.lang.String getEscapedAuthorURL()
Get the escaped URL of the author

Returns:
Escaped URL

setAuthorURL

public void setAuthorURL(java.lang.String authorURL)
Set the URL for the author

Parameters:
authorURL - New URL for the author

getEscapedComment

public java.lang.String getEscapedComment()
Get the comment as a escaped string

Returns:
Escaped Comment

getComment

public java.lang.String getComment()
Get the comment

Returns:
Comment

setComment

public void setComment(java.lang.String comment)
Set the new comment

Parameters:
comment - New comment

getCommentDate

public java.util.Date getCommentDate()
Get the date the comment was entered

Returns:
Comment date

getISO8601Date

public java.lang.String getISO8601Date()
Return an ISO 8601 style date http://www.w3.org/TR/NOTE-datetime

Returns:
Date formatted in ISO 8601 format

getRFC822Date

public java.lang.String getRFC822Date()
Return an RFC 822 style date

Returns:
Date formatted in RFC 822 format

getMetaData

public java.util.Map getMetaData()
Get the comment meta-data

Returns:
Meta-data as a Map

setCommentDate

public void setCommentDate(java.util.Date commentDate)
Set the date for the comment

Parameters:
commentDate - Comment date

setMetaData

public void setMetaData(java.util.Map metaData)
Set the comment meta-data

Parameters:
metaData - Map containing meta-data for this comment

getDateAsFormat

public java.lang.String getDateAsFormat(java.lang.String format)
Return the comment date formatted with a specified date format

Parameters:
format - Date format
Returns:
null if the comment date or format is null, otherwise returns the comment date formatted to the specified format. If the format is invalid, returns commentDate.toString()

getDateAsFormat

public java.lang.String getDateAsFormat(java.lang.String format,
                                        java.util.Locale locale)
Return the comment date formatted with a specified date format

Parameters:
format - Date format
locale - Locale for date formatting
Returns:
null if the entry date or format is null, otherwise returns the entry date formatted to the specified format. If the format is invalid, returns commentDate.toString()

getEntry

public Entry getEntry()
Retrieve the Entry associated with this comment

Returns:
Entry entry

setEntry

public void setEntry(Entry entry)
Set the Entry associated with this comment

Parameters:
entry - Entry

getParentId

public java.lang.Integer getParentId()
Get the comment parent ID

Returns:
Comment parent ID

setParentId

public void setParentId(java.lang.Integer parentId)
Set the comment parent ID

Parameters:
parentId - Comment parent ID