Source code: org/lucane/plugins/notes/NotesAction.java
1 /*
2 * Lucane - a collaborative platform
3 * Copyright (C) 2003 Vincent Fiack <vincent@lucane.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 package org.lucane.plugins.notes;
20
21 import java.io.Serializable;
22
23 /**
24 * This class represents an action transiting between the plugin and the service
25 */
26 class NotesAction
27 implements Serializable
28 {
29 //-- actions
30 public static final int SAVE_NOTE = 0;
31 public static final int DELETE_NOTE = 1;
32 public static final int GET_PERSONNAL_NOTES = 2;
33 public static final int GET_PUBLISHED_AUTHORS = 3;
34 public static final int GET_RECENT_PUBLISHED_NOTES = 4;
35 public static final int GET_PUBLISHED_NOTES_BY_AUTHOR = 5;
36 public static final int SAVE_COMMENT = 6;
37 public static final int GET_COMMENTS_FOR_NOTE = 7;
38
39 //-- attributes
40 private int action;
41 private Object param;
42
43 public NotesAction(int action, Object param)
44 {
45 this.action = action;
46 this.param = param;
47 }
48
49 public NotesAction(int action)
50 {
51 this.action = action;
52 this.param = null;
53 }
54
55 public int getAction()
56 {
57 return this.action;
58 }
59
60 public Object getParam()
61 {
62 return this.param;
63 }
64 }