|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--cscie160.project.security.SecurityImpl
By David Cheung
CSCIE160 Project
DUE 05-16-2001
This class Implements the Security class. This is suppose to reside on the server side. It contains a private class "authorizeClass" to encapsulate the information for different types of permissions.
Also contains a private hashtable to store account permissions and such.
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
SecurityImpl()
Constructor: |
Method Summary | |
void |
createSec(AccountInfo acct,
boolean depPermission,
boolean withPermission,
boolean balPermission)
this function creates an authorize class and stores it into the hash table. |
boolean |
getBalPermission(AccountInfo acct)
This function returns a boolean to determine if getBalance permission of an AccountInfo is permissible. |
boolean |
getDepPermission(AccountInfo acct)
This function returns a boolean to determine if deposit permission of an AccountInfo is permissible. |
boolean |
getWithPermission(AccountInfo acct)
This function returns a boolean to determine if withdraw permission of an AccountInfo is permissible. |
boolean |
verifyAccount(AccountInfo acct)
Returns true if an account with the accountInfo exists, otherwise return false. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SecurityImpl() throws java.rmi.RemoteException
1) calls super
2) initialize database
3) create 3 accounts base on spec.
Method Detail |
public void createSec(AccountInfo acct, boolean depPermission, boolean withPermission, boolean balPermission) throws java.rmi.RemoteException
createSec
in interface Security
public boolean getDepPermission(AccountInfo acct) throws java.rmi.RemoteException
getDepPermission
in interface Security
public boolean getWithPermission(AccountInfo acct) throws java.rmi.RemoteException
getWithPermission
in interface Security
public boolean getBalPermission(AccountInfo acct) throws java.rmi.RemoteException
getBalPermission
in interface Security
public boolean verifyAccount(AccountInfo acct) throws java.rmi.RemoteException
This is use to verify if the pin and the accountnumber match.
verifyAccount
in interface Security
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |