01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: import org.jasig.portal.security.IPerson;
09:
10: /**
11: * Interface for managing creation and removal of User Portal Data
12: * @author Susan Bramhall
13: * @version $Revision: 36677 $ $Date: 2006-08-22 12:29:27 -0700 (Tue, 22 Aug 2006) $
14: */
15: public interface IUserIdentityStore {
16: /**
17: * Returns a unique uPortal key for a user.
18: * @param person the person object
19: * @return uPortalUID number
20: * @throws Exception exception if an error occurs.
21: */
22: public int getPortalUID(IPerson person) throws Exception;
23:
24: /**
25: * Returns a unique uPortal key for a user. A boolean flag
26: * determines whether or not to auto-create data for a new user.
27: * @param person person whose portalUID will be returned
28: * @param createPortalData indicates whether to try to create all uPortal data for a new user.
29: * @return uPortalUID number or -1 if no user found and unable to create user.
30: * @throws AuthorizationException if createPortalData is false and no user is found
31: * or if a sql error is encountered
32: */
33: public int getPortalUID(IPerson person, boolean createPortalData)
34: throws AuthorizationException;
35:
36: public void removePortalUID(int uPortalUID) throws Exception;
37:
38: /**
39: * Return the username to be used for authorization (exit hook)
40: * @param person
41: * @return usernmae
42: */
43: public String getUsername(IPerson person);
44:
45: }
|