net.sourceforge.blogentis.plugins.base
Class AbstractPostEditExtension

java.lang.Object
  extended bynet.sourceforge.blogentis.plugins.AbstractExtension
      extended bynet.sourceforge.blogentis.plugins.AbstractBlogExtension
          extended bynet.sourceforge.blogentis.plugins.base.AbstractPostEditExtension
All Implemented Interfaces:
IBlogExtension, IExtension, IPostEditExtension
Direct Known Subclasses:
TrackbackPostEditExtension

public abstract class AbstractPostEditExtension
extends AbstractBlogExtension
implements IPostEditExtension

Author:
abas

Nested Class Summary
 
Nested classes inherited from class net.sourceforge.blogentis.plugins.base.IPostEditExtension
IPostEditExtension.IPostAction
 
Field Summary
 
Fields inherited from class net.sourceforge.blogentis.plugins.AbstractBlogExtension
blog, preferences
 
Constructor Summary
AbstractPostEditExtension(IPlugin plugin, Blog blog)
           
 
Method Summary
 java.lang.String buildOptionsHTML(BlogRunData data, Post post)
          Get extra HTML that should be inserted in the post edit screen.
 void postDeleted(BlogRunData data, Post post)
          The user is about to delete a post.
 void postModified(BlogRunData data, Post post)
          When a post's text or content has been changed by the user, this method will be called.
 void postNew(BlogRunData data, Post post)
          This method will be called for the creation of a new post.
 void postPublicationStatusChanged(BlogRunData data, Post post, int oldState)
          This method will be called whenever a publication change has been requested by the user.
 
Methods inherited from class net.sourceforge.blogentis.plugins.AbstractBlogExtension
getPreferences, setPreferences
 
Methods inherited from class net.sourceforge.blogentis.plugins.AbstractExtension
getPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IBlogExtension
getPreferences, setPreferences
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IExtension
getName, getPlugin
 

Constructor Detail

AbstractPostEditExtension

public AbstractPostEditExtension(IPlugin plugin,
                                 Blog blog)
Method Detail

postNew

public void postNew(BlogRunData data,
                    Post post)
Description copied from interface: IPostEditExtension
This method will be called for the creation of a new post. The post is complete and only lacks saving to disk, which will happen right after this method. Note that on a new post that will be published immediately, postPublicationStatusChanged() will be called imediately afterwards.

Specified by:
postNew in interface IPostEditExtension
Parameters:
data -
post - the new Post.

postModified

public void postModified(BlogRunData data,
                         Post post)
Description copied from interface: IPostEditExtension
When a post's text or content has been changed by the user, this method will be called. The old text has been thrown away by this point, and the new post is about to be saved to disk.

Specified by:
postModified in interface IPostEditExtension
Parameters:
data - the current rundata
post - the post that has been modified.

postPublicationStatusChanged

public void postPublicationStatusChanged(BlogRunData data,
                                         Post post,
                                         int oldState)
Description copied from interface: IPostEditExtension
This method will be called whenever a publication change has been requested by the user. The current publication changes are defined as:

Specified by:
postPublicationStatusChanged in interface IPostEditExtension
Parameters:
data - the rundata of the request.
post - the post that will have its publication type changed.
oldState - the old post type, from the PostPeer constants.

postDeleted

public void postDeleted(BlogRunData data,
                        Post post)
Description copied from interface: IPostEditExtension
The user is about to delete a post. This method will be called before the actual deletion from the database.

Specified by:
postDeleted in interface IPostEditExtension
Parameters:
data - The current RunData object.
post - The post that the user has requested to delete.

buildOptionsHTML

public java.lang.String buildOptionsHTML(BlogRunData data,
                                         Post post)
Description copied from interface: IPostEditExtension
Get extra HTML that should be inserted in the post edit screen.

Specified by:
buildOptionsHTML in interface IPostEditExtension
Parameters:
data - the RunData of the current request
post - the current post, may be null if the post is new.
Returns:
an HTML fragment that should be inserted the final page.


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.