Open SiteSearch 4.1.1
Final

ORG.oclc.zbase.access
Class DefaultAccessClient

java.lang.Object
  |
  +--ORG.oclc.zbase.access.DefaultAccessClient

public class DefaultAccessClient
extends Object
implements AccessClient

The DefaultAccessClient is a placeholder access client to use when the system is not connected to an access server to control user access.


Constructor Summary
DefaultAccessClient()
          Construct a DefaultAccessClient object.
 
Method Summary
 String autho()
          Get the authorization associated with the user.
 boolean authorizeByDNS(String DNS)
          Perform a Domain Name authorization.
 boolean authorizeByIP(String IPAddress)
          Perform an IP Address authorization.
 boolean authorizeByName(String autho, String password)
          Perform an autho/password Authorization.
 boolean authorizedByDNS()
          Determine whether the user is authorized by DNS address.
 boolean authorizedByIP()
          Determine whether the user is authorized by IP address.
 boolean authorizedByName()
          Determine whether the user is authorized by Name.
 int authorizeErrorCode()
          Get the error code for failed authorizations.
 String authorizeErrorMessage()
          Get the error message for failed authorizations - return empty string("") always, no authorizations fail.
 boolean authosEquals(String autho, String password)
          Compare the input autho and password to the existing autho/password
 void close()
          Clean-up the the client.
 boolean dbAccessAllowed(String dbname)
          Determine whether access to the database is allowed.
 void delete(String resourceName, Object resourceObject)
          Stub method to Delete the resource name from the user's profile data.
 Object get(String resourceName, Object resourceObject)
          Stub methos to get the value for the resource name from the user's profile data.
 Object getDbList()
          Get the database list for the user.
 Object getMetaData()
          Get the MetaData object which describes the available profile data.
 String getRemoteAutho(String resourceName)
          Return null so that server default autho used.
 String getRemotePassword(String resourceName)
          Return null so that server default password used.
 void initialize(Object serverObj, Object user)
          Initialze the Access Client.
 String IP()
          Get the IP Address associated with the user.
 String password()
          Get the password associated with the user.
 void put(String resourceName, Object value, Object resourceObject)
          Stub method to put the value for the resource name from the user's profile data.
 void setAuthoPassword(String authorization, String password)
          Set the authorization/password associated with the user.
 void setDbList(Object dbs)
          Set the database list for the user.
 void setLog(Log log)
          Set the log object for logging within the class.
 String toString()
          Generate a String representation of the Object.
 Object user()
          Get the ZBaseUser object for the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultAccessClient

public DefaultAccessClient()
Construct a DefaultAccessClient object.
Method Detail

initialize

public void initialize(Object serverObj,
                       Object user)
Initialze the Access Client.
Specified by:
initialize in interface AccessClient
Parameters:
serverObj - the application's Access Server Object
userObj - a user context object

setLog

public void setLog(Log log)
Set the log object for logging within the class.
Specified by:
setLog in interface AccessClient

authorizeByName

public boolean authorizeByName(String autho,
                               String password)
Perform an autho/password Authorization.
Specified by:
authorizeByName in interface AccessClient
Parameters:
autho - the user's authorization
password - the user's password
Returns:
true always.

authorizeByIP

public boolean authorizeByIP(String IPAddress)
Perform an IP Address authorization.
Specified by:
authorizeByIP in interface AccessClient
Parameters:
IPAddress - the input IP
Returns:
true always

authorizeByDNS

public boolean authorizeByDNS(String DNS)
Perform a Domain Name authorization.
Specified by:
authorizeByDNS in interface AccessClient
Parameters:
IPAddress - the IP address to look upt the Domain Name
Returns:
true always.

getMetaData

public Object getMetaData()
Get the MetaData object which describes the available profile data.
Specified by:
getMetaData in interface AccessClient
Returns:
null

getDbList

public Object getDbList()
Get the database list for the user.
Specified by:
getDbList in interface AccessClient

setDbList

public void setDbList(Object dbs)
Set the database list for the user.
Specified by:
setDbList in interface AccessClient

getRemoteAutho

public String getRemoteAutho(String resourceName)
Return null so that server default autho used.
Specified by:
getRemoteAutho in interface AccessClient

getRemotePassword

public String getRemotePassword(String resourceName)
Return null so that server default password used.
Specified by:
getRemotePassword in interface AccessClient

dbAccessAllowed

public boolean dbAccessAllowed(String dbname)
Determine whether access to the database is allowed.
Specified by:
dbAccessAllowed in interface AccessClient
Returns:
true always

authorizeErrorCode

public int authorizeErrorCode()
Get the error code for failed authorizations.
Specified by:
authorizeErrorCode in interface AccessClient

authorizeErrorMessage

public String authorizeErrorMessage()
Get the error message for failed authorizations - return empty string("") always, no authorizations fail.
Specified by:
authorizeErrorMessage in interface AccessClient

authorizedByName

public boolean authorizedByName()
Determine whether the user is authorized by Name.
Specified by:
authorizedByName in interface AccessClient
Returns:
true;

authorizedByIP

public boolean authorizedByIP()
Determine whether the user is authorized by IP address.
Specified by:
authorizedByIP in interface AccessClient
Returns:
true;

authorizedByDNS

public boolean authorizedByDNS()
Determine whether the user is authorized by DNS address.
Specified by:
authorizedByDNS in interface AccessClient
Returns:
true

setAuthoPassword

public void setAuthoPassword(String authorization,
                             String password)
Set the authorization/password associated with the user.
Specified by:
setAuthoPassword in interface AccessClient

autho

public String autho()
Get the authorization associated with the user.
Specified by:
autho in interface AccessClient

password

public String password()
Get the password associated with the user.
Specified by:
password in interface AccessClient

IP

public String IP()
Get the IP Address associated with the user.
Specified by:
IP in interface AccessClient
Returns:
null always

user

public Object user()
Get the ZBaseUser object for the user.
Specified by:
user in interface AccessClient

authosEquals

public boolean authosEquals(String autho,
                            String password)
Compare the input autho and password to the existing autho/password
Specified by:
authosEquals in interface AccessClient
Returns:
true

get

public Object get(String resourceName,
                  Object resourceObject)
Stub methos to get the value for the resource name from the user's profile data.
Specified by:
get in interface AccessClient
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:
the value of the requested resource

put

public void put(String resourceName,
                Object value,
                Object resourceObject)
Stub method to put the value for the resource name from the user's profile data.
Specified by:
put in interface AccessClient
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)
Stub method to Delete the resource name from the user's profile data.
Specified by:
delete in interface AccessClient
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.

close

public void close()
Clean-up the the client.
Specified by:
close in interface AccessClient

toString

public String toString()
Generate a String representation of the Object.
Specified by:
toString in interface AccessClient
Overrides:
toString in class Object

Open SiteSearch 4.1.1
Final