KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > action > ForumAction


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under GPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.action;
12
13 import java.util.List JavaDoc;
14
15 import org.jboss.portlet.forums.ForumsModule;
16 import org.jboss.portlet.forums.model.Forum;
17 import org.jboss.portlet.forums.model.Message;
18 import org.jboss.portlet.forums.model.Poster;
19
20 /**
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @author <a HREF="mailto:theute@jboss.org">Thomas Heute</a>
23  * @version $Revision: 1.2 $
24  */

25 public abstract class ForumAction
26    extends Action
27 {
28    /** DOCUMENT_ME */
29    protected ForumsModule module;
30
31    /** DOCUMENT_ME */
32    public static final int INIT = 0;
33
34    /** DOCUMENT_ME */
35    public static final int REFRESH = 1;
36    private final int mode;
37
38    /**
39     * DOCUMENT_ME
40     *
41     * @param module DOCUMENT_ME
42     */

43    public void setModule(ForumsModule module)
44    {
45       this.module = module;
46    }
47
48    /**
49     * Creates a new {@link ForumAction} object.
50     *
51     * @param mode DOCUMENT_ME
52     */

53    protected ForumAction(int mode)
54    {
55       if ((mode < 0) || (mode > 1))
56       {
57          throw new IllegalArgumentException JavaDoc("mode not accepted");
58       }
59
60       this.mode = mode;
61    }
62
63    /**
64     * DOCUMENT_ME
65     *
66     * @return DOCUMENT_ME
67     */

68    public int getMode()
69    {
70       return mode;
71    }
72
73    /**
74     * DOCUMENT_ME
75     *
76     * @return DOCUMENT_ME
77     */

78    public abstract Poster getPoster();
79
80    /**
81     * DOCUMENT_ME
82     *
83     * @return DOCUMENT_ME
84     */

85    public abstract Forum getForum();
86
87    /**
88     * DOCUMENT_ME
89     *
90     * @return DOCUMENT_ME
91     */

92    public abstract Message getMessage();
93
94    /**
95     * DOCUMENT_ME
96     */

97    public abstract void init();
98
99    /**
100     * DOCUMENT_ME
101     *
102     * @return DOCUMENT_ME
103     */

104    public abstract List JavaDoc getAttachments();
105 }
Popular Tags