Esri Geoportal Server
1.0

com.esri.gpt.framework.security.identity.local
Class LocalDao

java.lang.Object
  extended by com.esri.gpt.framework.sql.BaseDao
      extended by com.esri.gpt.framework.security.identity.local.LocalDao

public class LocalDao
extends BaseDao

Super-class for a database access objects associated with local identity tables.


Constructor Summary
protected LocalDao()
          Default constructor.
  LocalDao(RequestContext requestContext)
          Constructs with an associated request context.
 
Method Summary
 void ensureReferenceToRemoteUser(User user)
          Ensures a local reference to a remote user.
protected  String getUserTableName()
          Gets the name of the user table.
 String readDN(int userId)
          Reads the distinguished name associated with a user id.
 String readUsername(int userId)
          Reads the username associated with a user id.
 
Methods inherited from class com.esri.gpt.framework.sql.BaseDao
appendExpression, appendValueFilter, closeResultSet, closeStatement, getApplicationConfiguration, getRequestContext, logExpression, returnConnection, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalDao

protected LocalDao()
Default constructor.


LocalDao

public LocalDao(RequestContext requestContext)
Constructs with an associated request context.

Parameters:
requestContext - the request context
Method Detail

getUserTableName

protected String getUserTableName()
Gets the name of the user table.

Returns:
the table name

ensureReferenceToRemoteUser

public void ensureReferenceToRemoteUser(User user)
                                 throws IdentityException,
                                        SQLException
Ensures a local reference to a remote user.

Parameters:
user - the user (if user id less than zero, a record will be created)
Throws:
IdentityException - if an integrity violation occurs
SQLException - if a database exception occurs

readDN

public String readDN(int userId)
              throws SQLException
Reads the distinguished name associated with a user id.

Parameters:
userId - the subject user id
Returns:
the associated distinguished name (empty if none)
Throws:
SQLException - if a database exception occurs

readUsername

public String readUsername(int userId)
                    throws SQLException
Reads the username associated with a user id.

Parameters:
userId - the subject user id
Returns:
the associated username (empty if none)
Throws:
SQLException - if a database exception occurs

Esri Geoportal Server
1.0

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