01: /*
02: * Lucane - a collaborative platform
03: * Copyright (C) 2004 Jonathan Riboux <jonathan.riboux@wanadoo.Fr>
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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:
20: package org.lucane.applications.todolist;
21:
22: import java.io.Serializable;
23:
24: public class TodolistAction implements Serializable {
25: public static final int GET_TODOLISTS = 0;
26: public static final int GET_TODOLISTITEMS = 2;
27:
28: public static final int ADD_TODOLIST = 4;
29: public static final int MOD_TODOLIST = 5;
30: public static final int DEL_TODOLIST = 6;
31:
32: public static final int ADD_TODOLISTITEM = 7;
33: public static final int MOD_TODOLISTITEM = 8;
34: public static final int DEL_TODOLISTITEM = 9;
35:
36: public static final int GET_ACLS = 10;
37: public static final int GET_GROUPS = 11;
38: public static final int GET_USERS = 12;
39: public static final int ADD_ACL = 13;
40: public static final int REMOVE_ACL = 14;
41:
42: public int action;
43: public Object param;
44: public Object option;
45:
46: public TodolistAction(int action, Object param, Object option) {
47: this .action = action;
48: this .param = param;
49: this .option = option;
50: }
51:
52: public TodolistAction(int action, Object param) {
53: this (action, param, null);
54: }
55:
56: public TodolistAction(int action) {
57: this (action, null);
58: }
59:
60: public String toSignableString() {
61: return "" + action;
62: }
63:
64: public int getAction() {
65: return action;
66: }
67:
68: public Object getParam() {
69: return param;
70: }
71:
72: public Object getOption() {
73: return option;
74: }
75: }
|