org.blojsom.blog
Class Trackback

java.lang.Object
  extended byorg.blojsom.blog.Trackback
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FileBackedTrackback, Pingback

public abstract class Trackback
extends java.lang.Object
implements java.io.Serializable

Trackback

Version:
$Id: Trackback.java,v 1.13 2006/03/02 16:59:55 czarneckid Exp $
Author:
David Czarnecki
See Also:
Serialized Form

Field Summary
protected  BlogEntry _blogEntry
           
protected  java.lang.String _blogName
           
protected  java.lang.String _excerpt
           
protected  java.lang.String _id
           
protected  java.util.Map _metaData
           
protected  java.lang.String _title
           
protected  java.util.Date _trackbackDate
           
protected  long _trackbackDateLong
           
protected  java.lang.String _url
           
 
Constructor Summary
Trackback()
          Default constructor
Trackback(java.lang.String title, java.lang.String excerpt, java.lang.String url, java.lang.String blogName)
          Trackback constructor to take a title, excerpt, url, and blog name
 
Method Summary
abstract  void delete(BlogUser blogUser)
          Delete the trackback
 BlogEntry getBlogEntry()
          Retrieve the BlogEntry associated with this trackback
 java.lang.String getBlogName()
          Get the blog name of the trackback
 java.lang.String getDateAsFormat(java.lang.String format)
          Return the trackback date formatted with a specified date format
 java.lang.String getDateAsFormat(java.lang.String format, java.util.Locale locale)
          Return the trackback date formatted with a specified date format
 java.lang.String getExcerpt()
          Get the excerpt of the trackback
 java.lang.String getId()
          Get the id of this blog comments
 java.util.Map getMetaData()
          Get the trackback meta-data
 java.lang.String getTitle()
          Get the title of the trackback
 java.util.Date getTrackbackDate()
          Retrieve the date this trackback was created
 long getTrackbackDateLong()
          Get the date of the trackback
 java.lang.String getUrl()
          Get the url of the trackback
abstract  void load(BlogUser blogUser)
          Load the trackback
abstract  void save(BlogUser blogUser)
          Save the trackback
 void setBlogEntry(BlogEntry blogEntry)
          Set the BlogEntry associated with this trackback
 void setBlogName(java.lang.String blogName)
          Set the blog name of the trackback
 void setExcerpt(java.lang.String excerpt)
          Set the excerpt of the trackback
 void setId(java.lang.String id)
          Set the id of this blog comment.
 void setMetaData(java.util.Map metaData)
          Set the trackback meta-data
 void setTitle(java.lang.String title)
          Set the title of the trackback
 void setTrackbackDate(java.util.Date trackbackDate)
          Set the trackback date
 void setTrackbackDateLong(long trackbackDateLong)
          Set the date for the trackback
 void setUrl(java.lang.String url)
          Set the url of the trackback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_title

protected java.lang.String _title

_excerpt

protected java.lang.String _excerpt

_url

protected java.lang.String _url

_blogName

protected java.lang.String _blogName

_trackbackDate

protected java.util.Date _trackbackDate

_trackbackDateLong

protected long _trackbackDateLong

_id

protected java.lang.String _id

_metaData

protected java.util.Map _metaData

_blogEntry

protected BlogEntry _blogEntry
Constructor Detail

Trackback

public Trackback()
Default constructor


Trackback

public Trackback(java.lang.String title,
                 java.lang.String excerpt,
                 java.lang.String url,
                 java.lang.String blogName)
Trackback constructor to take a title, excerpt, url, and blog name

Parameters:
title - Title of the trackback
excerpt - Excerpt from the trackback
url - Url for the trackback
blogName - Blog name of the trackback
Method Detail

getTitle

public java.lang.String getTitle()
Get the title of the trackback

Returns:
Trackback title

setTitle

public void setTitle(java.lang.String title)
Set the title of the trackback

Parameters:
title - Trackback title

getExcerpt

public java.lang.String getExcerpt()
Get the excerpt of the trackback

Returns:
Trackback excerpt

setExcerpt

public void setExcerpt(java.lang.String excerpt)
Set the excerpt of the trackback

Parameters:
excerpt - Trackback excerpt

getUrl

public java.lang.String getUrl()
Get the url of the trackback

Returns:
Trackback url

setUrl

public void setUrl(java.lang.String url)
Set the url of the trackback

Parameters:
url - Trackback url

getBlogName

public java.lang.String getBlogName()
Get the blog name of the trackback

Returns:
Trackback blog name

getMetaData

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

Returns:
Meta-data as a Map
Since:
blojsom 2.14

setBlogName

public void setBlogName(java.lang.String blogName)
Set the blog name of the trackback

Parameters:
blogName - Trackback blog name

setTrackbackDateLong

public void setTrackbackDateLong(long trackbackDateLong)
Set the date for the trackback

Parameters:
trackbackDateLong - Trackback date as a long value

getTrackbackDateLong

public long getTrackbackDateLong()
Get the date of the trackback

Returns:
Date of the trackback as a long

getId

public java.lang.String getId()
Get the id of this blog comments

Returns:
Id
Since:
blojsom 2.07

setId

public void setId(java.lang.String id)
Set the id of this blog comment. This method can only be called if the id has not been set.

Parameters:
id - New id
Since:
blojsom 2.07

setMetaData

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

Parameters:
metaData - Map containing meta-data for this trackback
Since:
blojsom 2.14

getDateAsFormat

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

Parameters:
format - Date format
Returns:
null if the format is null, otherwise returns the trackback date formatted to the specified format. If the format is invalid, returns trackbackDate.toString()
Since:
blojsom 2.19

getDateAsFormat

public java.lang.String getDateAsFormat(java.lang.String format,
                                        java.util.Locale locale)
Return the trackback 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 trackbackDate.toString()
Since:
blojsom 2.30

getBlogEntry

public BlogEntry getBlogEntry()
Retrieve the BlogEntry associated with this trackback

Returns:
BlogEntry
Since:
blojsom 2.23

setBlogEntry

public void setBlogEntry(BlogEntry blogEntry)
Set the BlogEntry associated with this trackback

Parameters:
blogEntry - BlogEntry
Since:
blojsom 2.23

getTrackbackDate

public java.util.Date getTrackbackDate()
Retrieve the date this trackback was created

Returns:
Date trackback was created
Since:
blojsom 2.30

setTrackbackDate

public void setTrackbackDate(java.util.Date trackbackDate)
Set the trackback date

Parameters:
trackbackDate - Trackback date
Since:
blojsom 2.30

load

public abstract void load(BlogUser blogUser)
                   throws BlojsomException
Load the trackback

Parameters:
blogUser - BlogUser
Throws:
BlojsomException
Since:
blojsom 2.26

save

public abstract void save(BlogUser blogUser)
                   throws BlojsomException
Save the trackback

Parameters:
blogUser - BlogUser
Throws:
BlojsomException
Since:
blojsom 2.26

delete

public abstract void delete(BlogUser blogUser)
                     throws BlojsomException
Delete the trackback

Parameters:
blogUser - BlogUser
Throws:
BlojsomException
Since:
blojsom 2.26