Esri Geoportal Server
1.0

com.esri.gpt.framework.security.identity
Class IdentityAdapter

java.lang.Object
  extended by com.esri.gpt.framework.security.identity.IdentityAdapter
Direct Known Subclasses:
LdapIdentityAdapter, SimpleIdentityAdapter, UnconfiguredIdentityAdapter

public class IdentityAdapter
extends Object

Super class for an identity adapter.

An identity adapter provides the basic interface to an underlying identity store.

Currently, an adapter based upon local identity tables (LocalIdentityAdapter) and an adapter based upon remote LDAP identities (LdapIdentityAdapter) are supported.


Constructor Summary
IdentityAdapter()
          Default constructor.
 
Method Summary
 void addUserToRole(User user, String role)
          Adds user to role.
 void authenticate(User user)
          Authenticates credentials.
 void changePassword(User user, ChangePasswordCriteria criteria)
          Changes the password for a user.
 ApplicationConfiguration getApplicationConfiguration()
          Gets the application configuration.
 RequestContext getRequestContext()
          Gets the associated request context.
 Users readGroupMembers(String groupKey)
          Reads the members of a group.
 void readUserGroups(User user)
          Reads the groups to which a user belongs.
 void readUserProfile(User user)
          Reads the profile attributes for a user.
 User recoverPassword(RecoverPasswordCriteria criteria)
          Recovers a user password.
 void registerUser(User user)
          Registers a new user.
 void setApplicationConfiguration(ApplicationConfiguration appConfig)
          Sets the application configuration.
 void setRequestContext(RequestContext requestContext)
          Sets the associated request context.
 void throwNotSupportedException(String method)
          Throws an exception.
 void updateUserProfile(User user)
          Updates the profile attributes for a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityAdapter

public IdentityAdapter()
Default constructor.

Method Detail

getApplicationConfiguration

public ApplicationConfiguration getApplicationConfiguration()
Gets the application configuration.

Returns:
the application configuration

setApplicationConfiguration

public void setApplicationConfiguration(ApplicationConfiguration appConfig)
Sets the application configuration.

Parameters:
appConfig - the application configuration

getRequestContext

public RequestContext getRequestContext()
Gets the associated request context.

Returns:
the request context

setRequestContext

public void setRequestContext(RequestContext requestContext)
Sets the associated request context.

Parameters:
requestContext - the request context

authenticate

public void authenticate(User user)
                  throws CredentialsDeniedException,
                         IdentityException,
                         SQLException
Authenticates credentials.

Parameters:
user - the subject user
Throws:
CredentialsDeniedException - if credentials are denied
IdentityException - if a system error occurs preventing authentication
SQLException - if a database communication exception occurs

changePassword

public void changePassword(User user,
                           ChangePasswordCriteria criteria)
                    throws CredentialsDeniedException,
                           CredentialPolicyException,
                           IdentityException,
                           NamingException,
                           SQLException
Changes the password for a user.

Parameters:
user - the subject user
criteria - the criteria associated with the password change
Throws:
CredentialPolicyException - if the credentials are invalid
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs
CredentialsDeniedException

readGroupMembers

public Users readGroupMembers(String groupKey)
                       throws IdentityException,
                              NamingException,
                              SQLException
Reads the members of a group.

Parameters:
groupKey - the key for the group
Returns:
the collection of users belonging to the group
Throws:
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

readUserGroups

public void readUserGroups(User user)
                    throws IdentityException,
                           NamingException,
                           SQLException
Reads the groups to which a user belongs.

Parameters:
user - the subject user
Throws:
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

readUserProfile

public void readUserProfile(User user)
                     throws IdentityException,
                            NamingException,
                            SQLException
Reads the profile attributes for a user.

Parameters:
user - the subject user
Throws:
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

recoverPassword

public User recoverPassword(RecoverPasswordCriteria criteria)
                     throws IdentityException,
                            NamingException,
                            SQLException
Recovers a user password.

Parameters:
criteria - the criteria associated with the password recovery
Returns:
the user associated with the recovered credentials (null if no match)
Throws:
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

registerUser

public void registerUser(User user)
                  throws CredentialPolicyException,
                         IdentityException,
                         NamingException,
                         SQLException
Registers a new user.

Parameters:
user - the subject user
Throws:
CredentialPolicyException - if the credentials are invalid
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

addUserToRole

public void addUserToRole(User user,
                          String role)
                   throws CredentialPolicyException,
                          IdentityException,
                          NamingException,
                          SQLException
Adds user to role.

Parameters:
user - the subject user
role -
Throws:
CredentialPolicyException - if the credentials are invalid
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

throwNotSupportedException

public void throwNotSupportedException(String method)
                                throws IdentityException
Throws an exception.
This is intended to be used if a unsupported method call is sent to an adapter

Parameters:
method - the name of the method that is not supported
Throws:
IdentityException - the thrown exception

updateUserProfile

public void updateUserProfile(User user)
                       throws CredentialPolicyException,
                              IdentityException,
                              NamingException,
                              SQLException
Updates the profile attributes for a user.

Parameters:
user - the subject user
Throws:
CredentialPolicyException - if the credentials are invalid
IdentityException - if a system error occurs preventing the action
NamingException - if an LDAP naming exception occurs
SQLException - if a database communication exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.