/*
* (C) Copyright 2000 - 2005 Nabh Information Systems, Inc.
*
* All copyright notices regarding Nabh's products MUST remain
* intact in the scripts and in the outputted HTML.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
package com.nabhinc.spi;
import java.rmi.RemoteException;
import java.util.List;
import java.util.Map;
/**
* Stores user data
*
* @author Padmanabh Dabke
* (c) 2005 Nabh Information Systems, Inc. All Rights Reserved.
*/
public interface UserAdminService {
public static final String[] STRING_USER_ATTRIBUTES = { "utitle", "mname", "suffix", "address1", "address2", "city",
"state", "country", "zipcode", "ophone", "hphone", "cphone", "hemail", "ofax",
"hfax", "pager", "website", "sig", "aim", "yim", "msnm",
"icq" };
// public static final String[] BOOLEAN_USER_ATTRIBUTES = {"showemail", "showname" };
public static final String[] INTEGER_USER_ATTRIBUTES = {"gender"};
public static final String[] DATE_USER_ATTRIBUTES = {"bdate"};
int getUserCount() throws RemoteException;
User getUser(int userID) throws NoSuchEntityException, RemoteException;
User getUser(String userName) throws NoSuchEntityException, RemoteException;
void updateLastLogin(String userName) throws RemoteException;
void setPassword(String userName, String password) throws RemoteException;
void deleteUsers(int[] userID) throws RemoteException;
void deleteUsers(String[] userNames) throws RemoteException;
Map getUserInfo(String userName) throws RemoteException, NoSuchEntityException;
List getUsers (int offset, int maxUsers, String orderby, boolean isDescending) throws RemoteException;
String getUserNameFromEmail(String email) throws NoSuchEntityException, RemoteException;
//void setIcon(String userName, byte[] icon) throws RemoteException;
//byte[] getIcon(String userName) throws RemoteException;
void createUser(User usr, String password, int[] roleIDs) throws EntityExistsException, EntityUniqueException,
MissingRequiredAttributeException, RemoteException;
void updateUser(User usr, int[] roleIDs) throws EntityExistsException, EntityUniqueException,
MissingRequiredAttributeException, RemoteException;
void updateUserProfile(User usr) throws EntityExistsException, EntityUniqueException,
MissingRequiredAttributeException, RemoteException;
}
|