Open SiteSearch 4.1.1
Final

ORG.oclc.jassi.access
Class RBAccessClient

java.lang.Object
  |
  +--ORG.oclc.jassi.access.DefaultAccessClient
        |
        +--ORG.oclc.jassi.access.RBAccessClient

public class RBAccessClient
extends DefaultAccessClient
implements IClient

The RBAccessClient class provides access to the SiteSearch AccessServer for authentication and profiling. It also serves as a container for authorization and profiling information.

The RBAccessClient class is initialized with information from a server object and a user object.

See Also:
AccessConnectInfo, UserStateObject

Fields inherited from class ORG.oclc.jassi.access.DefaultAccessClient
autho, authorizationStatus, authorized, authorizedDbs, errorCode, errorMessage, initted, IP, log, password, user
 
Constructor Summary
RBAccessClient()
          Constructs an RBAccessClient object.
 
Method Summary
protected  void addRow(String tableName, Hashtable row)
          Adds a row to the input table the database.
 String autho()
          Returns a String containing the authorization associated with the user.
 int authorizationStatus()
          Returns an integer containing the Authorization status for the user.
 boolean authorizeByName(String autho, String password)
          Performs an authorization by name using the input authorization and password and returns a boolean indicating success or failure.
 boolean authorizeByName(String autho, String system, String password)
          Performs an authorization by name using the input authorization and password and returns a boolean indicating success or failure.
 boolean authorizedByDNS()
          Returns a boolean indicating whether the user is authorized by DNS address.
 boolean authorizedByIP()
          Returns a boolean indicating whether the user is authorized by IP address.
 boolean authorizedByName()
          Returns a boolean indicating whether this user is authorized by Name.
 int authorizeErrorCode()
          Returns an integer containing the error code for failed authorizations which is an error Code from AccessClient.
 String authorizeErrorMessage()
          Returns a String containing the error message for failed authorizations which is the error Message from AccessClient or empty string("").
 boolean authosEquals(String autho, String password)
          Compares the input autho and password to the existing autho/password.
 boolean checkAutho(int authLevel)
          Checks to see if the user is authorized for this action
 boolean checkAutho(String accessType, String objectName, String objectType)
          Checks to see if the user is authorized for this action for this object type
 void close()
          Cleans up the connection to the AccessServer.
 boolean dbAccessAllowed(String dbname)
          Returns a boolean indicating whether access to the input database is allowed.
protected  void deleteRow(String tableName, String colName, Object cellValue)
          Deletes a row from a table in the database for the input table name, column, and cell.
 Object get(String resourceName, Object resourceObject)
          Returns an Object containing the value for the input resource name from the user's profile data from the category defined in the input resourceObject.
 Object getDbList()
          Gets the authorized database list for the user where the Object returned is a Vector object containing a list of database names.
 Vector getList(String uid, String accessType, String objectType)
           
 Object getMetaData()
          Gets the MetaData object which describes the available profile data.
protected  Vector getRows(String tableName, String colName, Object cellValue)
          Returns a Vector containing a row or rows from a table in the database for the input database table, column and cell.
 void initialize(Object serverObj, Object user)
          Initializes the SiteSearch Access Client for the JaSSI using the configuration information held in the input AccessConnectInfo object and the UserStateObject.
 String IP()
          Returns a String containing the IP Address associated with the user.
 Vector loadPersistentUserProfile()
          Retrieves persistent user profile information from the database
 String password()
          Returns a String containing the password associated with the user.
protected  void replaceRow(String tableName, Hashtable changes, String colName, Object cellValue)
          Replaces a row in a table in the database for the input database table, column, and cell.
 boolean same(String grp, String rdgrp)
           
 void savePersistentUserProfile(Vector pups)
          Saves persistent user profile information to the database
 void setAuthoPassword(String authorization, String password)
          Sets the authorization/password associated with the user to the input authorization and password.
 void setDbList(Object dbs)
          Sets the database list for the user.
 void setLog(Log log)
          Sets the log that logging will write to.
 String toString()
          Generates a String representation of the Object.
 Object user()
          Returns an Object containing user information which has been associated with the AccessClient object - in this client, a UserStateObject.
 
Methods inherited from class ORG.oclc.jassi.access.DefaultAccessClient
authorizeByDNS, authorizeByIP, delete, getRemoteAutho, getRemotePassword, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RBAccessClient

public RBAccessClient()
Constructs an RBAccessClient object.
Method Detail

checkAutho

public boolean checkAutho(int authLevel)
Checks to see if the user is authorized for this action
Specified by:
checkAutho in interface IClient

checkAutho

public boolean checkAutho(String accessType,
                          String objectName,
                          String objectType)
Checks to see if the user is authorized for this action for this object type
Specified by:
checkAutho in interface IClient

initialize

public void initialize(Object serverObj,
                       Object user)
Initializes the SiteSearch Access Client for the JaSSI using the configuration information held in the input AccessConnectInfo object and the UserStateObject.
Parameters:
serverObj - the application's Access Server Information Object
userObj - a user context object
Overrides:
initialize in class DefaultAccessClient

setLog

public void setLog(Log log)
Sets the log that logging will write to. If not reset, defaults to the System log.
Parameters:
log - the log to write to
Overrides:
setLog in class DefaultAccessClient

authorizeByName

public boolean authorizeByName(String autho,
                               String password)
Performs an authorization by name using the input authorization and password and returns a boolean indicating success or failure.
Parameters:
autho - the user's authorization
password - the user's password
Returns:
true when the user is authorized, false for invalid authorization
Overrides:
authorizeByName in class DefaultAccessClient

authorizeByName

public boolean authorizeByName(String autho,
                               String system,
                               String password)
Performs an authorization by name using the input authorization and password and returns a boolean indicating success or failure.
Specified by:
authorizeByName in interface IClient
Parameters:
autho - the user's authorization
system - the system to log in to
password - the user's password
Returns:
true when the user is authorized, false for invalid authorization

getMetaData

public Object getMetaData()
Gets the MetaData object which describes the available profile data.
Returns:
null always
Overrides:
getMetaData in class DefaultAccessClient

getDbList

public Object getDbList()
Gets the authorized database list for the user where the Object returned is a Vector object containing a list of database names. return Object a Vector of database names.
Overrides:
getDbList in class DefaultAccessClient

getList

public Vector getList(String uid,
                      String accessType,
                      String objectType)
Specified by:
getList in interface IClient

setDbList

public void setDbList(Object dbs)
Sets the database list for the user.
Parameters:
dbs - the Object containing a dblist
Overrides:
setDbList in class DefaultAccessClient

dbAccessAllowed

public boolean dbAccessAllowed(String dbname)
Returns a boolean indicating whether access to the input database is allowed.
Parameters:
dbname - the name of the database.
Returns:
boolean
Overrides:
dbAccessAllowed in class DefaultAccessClient

authorizedByName

public boolean authorizedByName()
Returns a boolean indicating whether this user is authorized by Name.
Returns:
boolean
Overrides:
authorizedByName in class DefaultAccessClient

authorizedByIP

public boolean authorizedByIP()
Returns a boolean indicating whether the user is authorized by IP address.
Returns:
boolean
Overrides:
authorizedByIP in class DefaultAccessClient

authorizedByDNS

public boolean authorizedByDNS()
Returns a boolean indicating whether the user is authorized by DNS address.
Returns:
boolean
Overrides:
authorizedByDNS in class DefaultAccessClient

authosEquals

public boolean authosEquals(String autho,
                            String password)
Compares the input autho and password to the existing autho/password.
Parameters:
autho - the authorization name to compare
password - the password to compare.
Overrides:
authosEquals in class DefaultAccessClient

authorizeErrorCode

public int authorizeErrorCode()
Returns an integer containing the error code for failed authorizations which is an error Code from AccessClient.
Returns:
int
Overrides:
authorizeErrorCode in class DefaultAccessClient
See Also:
AccessClient

authorizeErrorMessage

public String authorizeErrorMessage()
Returns a String containing the error message for failed authorizations which is the error Message from AccessClient or empty string("").
Overrides:
authorizeErrorMessage in class DefaultAccessClient
See Also:
AccessClient

setAuthoPassword

public void setAuthoPassword(String authorization,
                             String password)
Sets the authorization/password associated with the user to the input authorization and password.
Parameters:
authorization - the name used to authorize.
password - the password used to authorize.
Overrides:
setAuthoPassword in class DefaultAccessClient

autho

public String autho()
Returns a String containing the authorization associated with the user.
Returns:
autho
Overrides:
autho in class DefaultAccessClient

password

public String password()
Returns a String containing the password associated with the user.
Returns:
password
Overrides:
password in class DefaultAccessClient

IP

public String IP()
Returns a String containing the IP Address associated with the user.
Returns:
IP
Overrides:
IP in class DefaultAccessClient

authorizationStatus

public int authorizationStatus()
Returns an integer containing the Authorization status for the user.
Returns:
authorizationStatus
See Also:
AccessClient

user

public Object user()
Returns an Object containing user information which has been associated with the AccessClient object - in this client, a UserStateObject.
Returns:
Object - a UserStateObject
Overrides:
user in class DefaultAccessClient
See Also:
UserStateObject

get

public Object get(String resourceName,
                  Object resourceObject)
Returns an Object containing the value for the input resource name from the user's profile data from the category defined in the input resourceObject.
Parameters:
resourceName - the name of the data to retrieve
resourceObject - the name of the category or the category object itself where the resource can be located. null can be passed in; this is here for extensibility purposes. Defaults to the "authos" table.
Returns:
Object the value of the requested resource
Overrides:
get in class DefaultAccessClient

getRows

protected Vector getRows(String tableName,
                         String colName,
                         Object cellValue)
Returns a Vector containing a row or rows from a table in the database for the input database table, column and cell. For authorization information already retrieved, use AuthoResults.getRow().
Parameters:
tableName - the name of the database table
colName - the name of the column in which to look for the cellValue
cellValue - the value to look for the the colName
Returns:
Vector

replaceRow

protected void replaceRow(String tableName,
                          Hashtable changes,
                          String colName,
                          Object cellValue)
Replaces a row in a table in the database for the input database table, column, and cell.
Parameters:
tableName - the name of the database table
changes - the column names and values
colName - the name of the column in which to look for the cellValue
cellValue - the value to look for the the colName

addRow

protected void addRow(String tableName,
                      Hashtable row)
Adds a row to the input table the database.
Parameters:
tableName - the name of the database table
row - the column names and values

deleteRow

protected void deleteRow(String tableName,
                         String colName,
                         Object cellValue)
Deletes a row from a table in the database for the input table name, column, and cell.
Parameters:
tableName - the name of the database table
colName - the name of the column in which to look for the cellValue
cellValue - the value to look for the the colName

close

public void close()
Cleans up the connection to the AccessServer.
Overrides:
close in class DefaultAccessClient

toString

public String toString()
Generates a String representation of the Object.
Overrides:
toString in class DefaultAccessClient

same

public boolean same(String grp,
                    String rdgrp)
Specified by:
same in interface IClient

loadPersistentUserProfile

public Vector loadPersistentUserProfile()
Retrieves persistent user profile information from the database
Specified by:
loadPersistentUserProfile in interface IClient
Returns:
Vector

savePersistentUserProfile

public void savePersistentUserProfile(Vector pups)
Saves persistent user profile information to the database
Specified by:
savePersistentUserProfile in interface IClient
Parameters:
Vector - pupi user profile inforamtion

Open SiteSearch 4.1.1
Final