1 package net.sourceforge.blogentis.plugins.base;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 }