01: /*
02: * (C) Copyright 2000 - 2005 Nabh Information Systems, Inc.
03: *
04: * All copyright notices regarding Nabh's products MUST remain
05: * intact in the scripts and in the outputted HTML.
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (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 Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser 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: */
21: package com.nabhinc.spi;
22:
23: import java.rmi.RemoteException;
24: import java.util.List;
25: import java.util.Map;
26:
27: /**
28: * Stores user data
29: *
30: * @author Padmanabh Dabke
31: * (c) 2005 Nabh Information Systems, Inc. All Rights Reserved.
32: */
33: public interface UserAdminService {
34: public static final String[] STRING_USER_ATTRIBUTES = { "utitle",
35: "mname", "suffix", "address1", "address2", "city", "state",
36: "country", "zipcode", "ophone", "hphone", "cphone",
37: "hemail", "ofax", "hfax", "pager", "website", "sig", "aim",
38: "yim", "msnm", "icq" };
39: // public static final String[] BOOLEAN_USER_ATTRIBUTES = {"showemail", "showname" };
40: public static final String[] INTEGER_USER_ATTRIBUTES = { "gender" };
41: public static final String[] DATE_USER_ATTRIBUTES = { "bdate" };
42:
43: int getUserCount() throws RemoteException;
44:
45: User getUser(int userID) throws NoSuchEntityException,
46: RemoteException;
47:
48: User getUser(String userName) throws NoSuchEntityException,
49: RemoteException;
50:
51: void updateLastLogin(String userName) throws RemoteException;
52:
53: void setPassword(String userName, String password)
54: throws RemoteException;
55:
56: void deleteUsers(int[] userID) throws RemoteException;
57:
58: void deleteUsers(String[] userNames) throws RemoteException;
59:
60: Map getUserInfo(String userName) throws RemoteException,
61: NoSuchEntityException;
62:
63: List getUsers(int offset, int maxUsers, String orderby,
64: boolean isDescending) throws RemoteException;
65:
66: String getUserNameFromEmail(String email)
67: throws NoSuchEntityException, RemoteException;
68:
69: //void setIcon(String userName, byte[] icon) throws RemoteException;
70: //byte[] getIcon(String userName) throws RemoteException;
71:
72: void createUser(User usr, String password, int[] roleIDs)
73: throws EntityExistsException, EntityUniqueException,
74: MissingRequiredAttributeException, RemoteException;
75:
76: void updateUser(User usr, int[] roleIDs)
77: throws EntityExistsException, EntityUniqueException,
78: MissingRequiredAttributeException, RemoteException;
79:
80: void updateUserProfile(User usr) throws EntityExistsException,
81: EntityUniqueException, MissingRequiredAttributeException,
82: RemoteException;
83:
84: }
|