01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: UserPrefsService.java,v 1.2 2006/09/29 12:32:11 drmlipp Exp $
21: *
22: * $Log: UserPrefsService.java,v $
23: * Revision 1.2 2006/09/29 12:32:11 drmlipp
24: * Consistently using WfMOpen as projct name now.
25: *
26: * Revision 1.1.1.1 2003/06/30 20:05:12 drmlipp
27: * Initial import
28: *
29: * Revision 1.6 2003/06/27 08:51:46 lipp
30: * Fixed copyright/license information.
31: *
32: * Revision 1.5 2003/04/14 07:17:06 lipp
33: * Added ability to remove preference.
34: *
35: * Revision 1.4 2002/11/26 11:23:30 lipp
36: * Modified RemoteException comment.
37: *
38: * Revision 1.3 2001/11/30 11:43:26 lipp
39: * javadoc fixes.
40: *
41: * Revision 1.2 2001/11/25 13:47:59 lipp
42: * Additional "list" function.
43: *
44: * Revision 1.1 2001/11/20 20:03:22 lipp
45: * New user prefs service, interface design.
46: *
47: */
48: package de.danet.an.util.userprefs;
49:
50: import java.util.Set;
51: import java.rmi.RemoteException;
52:
53: /**
54: * This interface defines the user preferences service.
55: */
56: public interface UserPrefsService {
57:
58: /**
59: * Set a preference. Note that objects passed as values for preferences
60: * must be serializable.
61: *
62: * @param prefName preference name.
63: * @param prefValue preference value.
64: * @throws RemoteException if a system-level error occurs.
65: * @see #getPreference
66: */
67: void setPreference(String prefName, Object prefValue)
68: throws RemoteException;
69:
70: /**
71: * Access a preference. Returns the previously set value or
72: * <code>null</code> if no such preference has been set.
73: *
74: * @param prefName preference name.
75: * @return the value of the preference or <code>null</code>.
76: * @throws RemoteException if a system-level error occurs.
77: * @see #setPreference
78: */
79: Object getPreference(String prefName) throws RemoteException;
80:
81: /**
82: * Remove a preference.
83: *
84: * @param prefName preference name.
85: * @throws RemoteException if a system-level error occurs.
86: * @see #setPreference
87: */
88: void removePreference(String prefName) throws RemoteException;
89:
90: /**
91: * List all defined preferences.
92: * @return the names of all preferences defined.
93: * @throws RemoteException if a system-level error occurs.
94: */
95: Set preferencesSet() throws RemoteException;
96:
97: }
|