Open SiteSearch 4.1.1
Final

ORG.oclc.access
Interface AccessClient

All Known Subinterfaces:
IClient
All Known Implementing Classes:
DefaultAccessClient, JaSSIAccessClient, ZBaseAccessClient, DefaultAccessClient

public abstract interface AccessClient

The AccessClient interface defines the methods that must be implemented by all classes designed to perform access control for users in the SiteSearch system.


Field Summary
static int AUTHORIZED_BY_DNS
          integer data type defining an authorization status - User unauthorized by Domain Name.
static int AUTHORIZED_BY_IP
          integer data type defining an authorization status - User unauthorized by IP Address.
static int AUTHORIZED_BY_NAME
          integer data type defining an authorization status - User unauthorized by Name.
static int FAILED_AUTHORIZATION
          Error code for failed authorization
static int FAILED_CONNECTION
          Error code for failed connection
static int INVALID_DNS
          integer data type defining an authorization Error Code - Unauthorized Domain Name - 102.
static int INVALID_IP
          integer data type defining an authorization Error Code - Unauthorized IP - 100.
static int INVALID_NAME
          integer data type defining an authorization Error Code - Unauthorized Name - 101.
static int UNAUTHORIZED
          integer data type defining an authorization status - User unauthorized.
 
Method Summary
 String autho()
          Returns a String containing the authorization associated with the user.
 boolean authorizeByDNS(String IPAddress)
          Performs a Domain Name authorization using the input IP address string.
 boolean authorizeByIP(String IPAddress)
          Performs an IP Address authorization using the input IP address string.
 boolean authorizeByName(String autho, String password)
          Performs an autho/password Authorization using the input authorization and password strings.
 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.
 String authorizeErrorMessage()
          Returns a String containing the error message for failed authorizations.
 boolean authosEquals(String autho, String password)
          Compares the input autho and password to the existing autho/password to see if there is a match.
 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.
 void delete(String resourceName, Object resourceObject)
          Deletes the input resource name from the user's profile data.
 Object get(String resourceName, Object resourceObject)
          Returns an Object containing the value for the input resource name from the user's profile data and optionally uses the resourceObject to locate the data.
 Object getDbList()
          Returns an Object containing the database list for the user.
 Object getMetaData()
          Returns an Object which contains MetaData which describes the available profile data.
 String getRemoteAutho(String resourceName)
          Returns a String containing the remote service authorization for the input resource name.
 String getRemotePassword(String resourceName)
          Returns a String containing the remote service password for the input resource name.
 void initialize(Object serverObj, Object userObject)
          Initializes the Access Client using the input Access server object and the input object containing user state
 String IP()
          Returns a String containing the IP Address associated with the user.
 String password()
          Returns a String containing the password associated with the user.
 void put(String resourceName, Object value, Object resourceObject)
          Stores the input Object for the given resource name in the user's profile data.
 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 using the input Object containing a database list.
 void setLog(Log log)
          Sets the log for logging to the input Log object.
 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.
 

Field Detail

UNAUTHORIZED

public static final int UNAUTHORIZED
integer data type defining an authorization status - User unauthorized.

AUTHORIZED_BY_IP

public static final int AUTHORIZED_BY_IP
integer data type defining an authorization status - User unauthorized by IP Address.

AUTHORIZED_BY_DNS

public static final int AUTHORIZED_BY_DNS
integer data type defining an authorization status - User unauthorized by Domain Name.

AUTHORIZED_BY_NAME

public static final int AUTHORIZED_BY_NAME
integer data type defining an authorization status - User unauthorized by Name.

INVALID_IP

public static final int INVALID_IP
integer data type defining an authorization Error Code - Unauthorized IP - 100.

INVALID_NAME

public static final int INVALID_NAME
integer data type defining an authorization Error Code - Unauthorized Name - 101.

INVALID_DNS

public static final int INVALID_DNS
integer data type defining an authorization Error Code - Unauthorized Domain Name - 102.

FAILED_CONNECTION

public static final int FAILED_CONNECTION
Error code for failed connection

FAILED_AUTHORIZATION

public static final int FAILED_AUTHORIZATION
Error code for failed authorization
Method Detail

initialize

public void initialize(Object serverObj,
                       Object userObject)
Initializes the Access Client using the input Access server object and the input object containing user state
Parameters:
serverObj - the application's Access Server Object
userObj - a user context object

authorizeByName

public boolean authorizeByName(String autho,
                               String password)
Performs an autho/password Authorization using the input authorization and password strings.
Parameters:
autho - the user's authorization
password - the user's password
Returns:
true when the user is authorized, false for invalid authorization

authorizeByIP

public boolean authorizeByIP(String IPAddress)
Performs an IP Address authorization using the input IP address string.
Parameters:
IPAddress - the user IP Address
Returns:
true when the user is authorized, false for invalid authorization.

authorizeByDNS

public boolean authorizeByDNS(String IPAddress)
Performs a Domain Name authorization using the input IP address string.
Parameters:
IPAddress - the user IP Address that can be looked up by the domain name server.
Returns:
true when the user is authorized, false for invalid authorization

getMetaData

public Object getMetaData()
Returns an Object which contains MetaData which describes the available profile data.

getDbList

public Object getDbList()
Returns an Object containing the database list for the user.

setDbList

public void setDbList(Object dbs)
Sets the database list for the user using the input Object containing a database list.
Parameters:
dbs - the Object containing a dblist

authorizeErrorCode

public int authorizeErrorCode()
Returns an integer containing the error code for failed authorizations.
Returns:
int

authorizeErrorMessage

public String authorizeErrorMessage()
Returns a String containing the error message for failed authorizations.

authorizedByName

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

authorizedByIP

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

authorizedByDNS

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

authosEquals

public boolean authosEquals(String autho,
                            String password)
Compares the input autho and password to the existing autho/password to see if there is a match.
Parameters:
autho - the authorization name to compare
password - the password to compare.
Returns:
boolean true for matches/false for mismatch

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.

autho

public String autho()
Returns a String containing the authorization associated with the user.
Returns:
String

password

public String password()
Returns a String containing the password associated with the user.
Returns:
String

IP

public String IP()
Returns a String containing the IP Address associated with the user.
Returns:
String

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 and optionally uses the resourceObject to locate the data.
Parameters:
resourceName - the name of the data to update
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
Returns:
Object the value of the requested resource

put

public void put(String resourceName,
                Object value,
                Object resourceObject)
Stores the input Object for the given resource name in the user's profile data.
Parameters:
resourceName - the name of the data to update
value - the value for the resourceName
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

delete

public void delete(String resourceName,
                   Object resourceObject)
Deletes the input resource name from the user's profile data.
Parameters:
resourceName - the name to delete
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

getRemoteAutho

public String getRemoteAutho(String resourceName)
Returns a String containing the remote service authorization for the input resource name.
Parameters:
resourceName - the name of the resource
Returns:
String

getRemotePassword

public String getRemotePassword(String resourceName)
Returns a String containing the remote service password for the input resource name.
Parameters:
resourceName - the name of the resource
Returns:
String

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

close

public void close()
Cleans up the connection to the AccessServer.

setLog

public void setLog(Log log)
Sets the log for logging to the input Log object.
Parameters:
log - the log to write to

user

public Object user()
Returns an Object containing user information which has been associated with the AccessClient object.
Returns:
Object

toString

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

Open SiteSearch 4.1.1
Final