View Javadoc

1   package net.sourceforge.blogentis.plugins.base;
2   
3   //-----------------------------------------------------------------------
4   //Blogentis - a blog publishing platform.
5   //Copyright (C) 2004 Tassos Bassoukos <abassouk@gmail.com>
6   //
7   //This library is free software; you can redistribute it and/or
8   //modify it under the terms of the GNU Lesser General Public
9   //License as published by the Free Software Foundation; either
10  //version 2.1 of the License, or (at your option) any later version.
11  //
12  //This library is distributed in the hope that it will be useful,
13  //but WITHOUT ANY WARRANTY; without even the implied warranty of
14  //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  //Lesser General Public License for more details.
16  //
17  //You should have received a copy of the GNU Lesser General Public
18  //License along with this library; if not, write to the Free Software
19  //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  //-----------------------------------------------------------------------
21  //
22  //$Id: IPostViewExtensionPoint.java,v 1.1 2004/10/22 17:34:13 tassos Exp $
23  //
24  
25  import java.util.List;
26  
27  import net.sourceforge.blogentis.om.Post;
28  import net.sourceforge.blogentis.plugins.IBlogExtensionPoint;
29  import net.sourceforge.blogentis.turbine.BlogRunData;
30  
31  /***
32   * Plugins that wish to implement functionality that should be performed anytime
33   * a post is about to be viewed, either in HTML or in an RSS feed, should put an
34   * extension here.
35   * 
36   * No methods have been specified here as they are internal.
37   * 
38   * @author abas
39   */
40  public interface IPostViewExtensionPoint
41          extends IBlogExtensionPoint {
42      /***
43       * Invoke the extensions to prepare this post for viewing.
44       * 
45       * @param data
46       *            the RunData of the current request.
47       * @param post
48       *            the post to be prepared.
49       * @return the actual post that will be viewed.
50       */
51      public Post doPostViewExtensions(BlogRunData data, Post post);
52  
53      /***
54       * Apply doPostViewExtensions to a whole List of Posts.
55       * 
56       * @param data
57       *            the RunData of the current request
58       * @param posts
59       *            a List of Posts to which the doPostViewExtensions() should be
60       *            applied.
61       * @return a new List containing the results of the invocations in the same
62       *         order as the original list.
63       */
64      public List doPostViewExtensions(BlogRunData data, List posts);
65  }