Open SiteSearch 4.1.1
Final

ORG.oclc.access.api
Class AuthoResults

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--ORG.oclc.access.api.AuthoResults

public class AuthoResults
extends Hashtable
implements AccessBerApi

The AuthoResults class contains the profiling information retrieved from a user authorization. It is created in the AccessServer to return database information, BER encoded in order to return it to the AccessClient, and then recreated from the BER information.

See Also:
Serialized Form

Constructor Summary
AuthoResults()
          Constructs an empty AuthoResults object.
AuthoResults(DataDir resultsDir, MetaData tableMetaData)
          Constructs an AuthosResults object from the BER-encoded data returned from the AccessServer and the MetaData object.
AuthoResults(MetaData tableMetaData)
          Constructs an AuthoResults object and initializes the MetaData object which contains information about the database table.
 
Method Summary
 Hashtable getAuthoRow()
          Returns a Hashtable object containing the row in the "authos" table for this user There should only be one
 Vector getDBList()
          Returns a Vector containing the list of database names for which this user is authorized.
 Integer getMaxSessions()
          Returns an Integer containing the "sessions" value from the "autho" table row
 Hashtable getRow(String tableName, String colName, Object cellValue)
          Returns a Hashtable object containing a row from the user's authoResults
 Vector getTable(String tableName)
          Returns a Vector object containing rows from a table
 String getUserAutho()
          Returns a String containing the "autho" from the "authos" table
 Object getUserDBKey()
          Returns a string containing the "userdbkey" from the "authos" table This is the key into the "userdb" table (the authorized databases).
 Object getValue(String tableName, String columnName)
          Returns column(s) found in a row in a table If there is more than one row, the values are returned in a Vector
 void setAuthoTable(Vector rows)
          Inserts the "authos" table into AuthoResults
 void setDBTable(Vector rows)
          Inserts the "dbs" tables into AuthoResults
 void setTable(String tableName, Vector rows)
          Inserts this table in authoResults
 void setUserDBTable(Vector rows)
          Inserts the "userdb" table into AuthoResults
 DataDir toDataDir()
          Returns a BER encoded AuthoResults so that it may be sent from the AccessServer to the AccessClient.
 String toString()
          Returns a String containing the string representation of the object.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthoResults

public AuthoResults()
Constructs an empty AuthoResults object.

AuthoResults

public AuthoResults(MetaData tableMetaData)
Constructs an AuthoResults object and initializes the MetaData object which contains information about the database table. The tables are then filled in with the set methods below.
Parameters:
tableMetaData - information about the database tables

AuthoResults

public AuthoResults(DataDir resultsDir,
                    MetaData tableMetaData)
Constructs an AuthosResults object from the BER-encoded data returned from the AccessServer and the MetaData object.
Parameters:
resultsDir - ber object returned from the AccessServer
tableMetaData - information about the database tables
Method Detail

getMaxSessions

public Integer getMaxSessions()
Returns an Integer containing the "sessions" value from the "autho" table row
Returns:
maximum number of sessions this autho may have

getUserAutho

public String getUserAutho()
Returns a String containing the "autho" from the "authos" table
Returns:
userAutho the "autho" column in the "authos" table

getTable

public Vector getTable(String tableName)
Returns a Vector object containing rows from a table
Parameters:
tableName - name of the table to look for
Returns:
the rows in the table

getAuthoRow

public Hashtable getAuthoRow()
Returns a Hashtable object containing the row in the "authos" table for this user There should only be one
Returns:
the row in the table

getValue

public Object getValue(String tableName,
                       String columnName)
Returns column(s) found in a row in a table If there is more than one row, the values are returned in a Vector
Parameters:
tableName - name of the table to look in
columnName - name of the column to look in
Returns:
Integer, String, or Vector

getDBList

public Vector getDBList()
Returns a Vector containing the list of database names for which this user is authorized.
Returns:
Vector of Strings the list of db names

getUserDBKey

public Object getUserDBKey()
Returns a string containing the "userdbkey" from the "authos" table This is the key into the "userdb" table (the authorized databases).
Returns:
the value in the "userdbkey" column

getRow

public Hashtable getRow(String tableName,
                        String colName,
                        Object cellValue)
Returns a Hashtable object containing a row from the user's authoResults
Parameters:
tableName - the name of the table
colName - the name of the column
cellValue - the value in that column
Returns:
column name/column value pairs

setTable

public void setTable(String tableName,
                     Vector rows)
Inserts this table in authoResults
Parameters:
tableName - the name of the table
rows - one or more rows to insert

setAuthoTable

public void setAuthoTable(Vector rows)
Inserts the "authos" table into AuthoResults
Parameters:
one - or more rows

setUserDBTable

public void setUserDBTable(Vector rows)
Inserts the "userdb" table into AuthoResults
Parameters:
one - or more rows of authorized dbs

setDBTable

public void setDBTable(Vector rows)
Inserts the "dbs" tables into AuthoResults
Parameters:
one - or more rows of database names

toDataDir

public DataDir toDataDir()
Returns a BER encoded AuthoResults so that it may be sent from the AccessServer to the AccessClient.
Returns:
the DataDir with all info attached

toString

public String toString()
Returns a String containing the string representation of the object.
Returns:
the string
Overrides:
toString in class Hashtable

Open SiteSearch 4.1.1
Final