All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.dorm4.fls.IRemoteLibrary

public interface IRemoteLibrary
extends Remote
Remote iterface for Library. This is the interface a client gets when it connects to the library through the RMI registry.


Method Index

 o add(StdLibraryObject)
Adds the object to the database
 o createLibraryObject(String)
Creates a new library object for this id, but doesn't make a database record
 o find(StdLibraryObject, Vector)
Does a lookup in all fields for the specified text and returns the hits as a Vector of the itemType.
 o getAltName()
Gives the alternate name of this library
 o getBorrower(Item)
Checks if the item is on loan and if so returns the Borrower, otherwise null.
 o getDueDate(Item)
Checks if the item is on loan and if so returns the due date, otherwise null.
 o getLibraryObject(String)
Gets a StdLibraryObject in the database.
 o getLoanPeriod(Item)
Gets the default loan period for this item.
 o getLoans(Borrower)
Gets the Items this Borrower has on loan.
 o getName()
Gives the name of this library
 o getRegisteredTypes()
Gets an array of classes for all registered types
 o loanTo(Item, Borrower, Date)
Adds a record to the loans table in the database.
 o receive(Item)
Checks if the book is overdue then removes the loan record from the database.
 o remove(StdLibraryObject)
Removes the object from the database
 o renumber(StdLibraryObject, String)
Gives the object a new number in the database
 o update(StdLibraryObject)
Updates the object in the database
 o validate(StdLibraryObject)
Verifies that the object is in the database and sets its properties to the values in the database.

Methods

 o getName
 public abstract String getName() throws RemoteException
Gives the name of this library

 o getAltName
 public abstract String getAltName() throws RemoteException
Gives the alternate name of this library

 o getLibraryObject
 public abstract StdLibraryObject getLibraryObject(String id) throws RemoteException
Gets a StdLibraryObject in the database. Returns null if it can't be found.

 o createLibraryObject
 public abstract StdLibraryObject createLibraryObject(String id) throws CannotAllowException, RemoteException
Creates a new library object for this id, but doesn't make a database record

Throws: CannotAllowException
Thrown if access is denied.
 o getRegisteredTypes
 public abstract Class[] getRegisteredTypes() throws RemoteException
Gets an array of classes for all registered types

 o find
 public abstract Vector find(StdLibraryObject itemType,
                             Vector includeStrings) throws IllegalArgumentException, RemoteException
Does a lookup in all fields for the specified text and returns the hits as a Vector of the itemType.

Parameters:
itemType - Child of StdLibraryObject.
includeStrings - Strings that must be included in the results.
Returns:
A Vector of ids as String objects.
 o add
 public abstract void add(StdLibraryObject obj) throws CannotAllowException, RemoteException
Adds the object to the database

Parameters:
obj - The object to be added
Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
 o remove
 public abstract void remove(StdLibraryObject obj) throws CannotAllowException, RecordNotFoundException, RemoteException
Removes the object from the database

Parameters:
obj - The object to be removed
Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o update
 public abstract void update(StdLibraryObject obj) throws CannotAllowException, RecordNotFoundException, RemoteException
Updates the object in the database

Parameters:
obj - The object to be update
Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o renumber
 public abstract void renumber(StdLibraryObject obj,
                               String newid) throws CannotAllowException, RecordNotFoundException, RemoteException
Gives the object a new number in the database

Parameters:
obj - The object to be update
newid - The new id for the object
Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o validate
 public abstract StdLibraryObject validate(StdLibraryObject obj) throws RecordNotFoundException, RemoteException
Verifies that the object is in the database and sets its properties to the values in the database.

Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o loanTo
 public abstract void loanTo(Item item,
                             Borrower borrower,
                             Date dueDate) throws CannotAllowException, RecordNotFoundException, RemoteException
Adds a record to the loans table in the database.

Parameters:
item - The item to be checked out.
borrower - The person checking the item out.
dueDate - The date the item is due.
Throws: CannotAllowException
Thrown if the item is already checked out or if the borrower doesn't have permission.
Throws: RecordNotFoundException
Thrown if the item or borrower is not valid
Throws: RuntimeException
Thrown if the item and borrower objects do not match their database records
 o receive
 public abstract Borrower receive(Item item) throws OverdueException, RecordNotFoundException, RemoteException
Checks if the book is overdue then removes the loan record from the database.

Parameters:
item - The item to be received.
Returns:
The Borrower the item is on loan to or null if it's not on loan.
Throws: OverdueException
Thrown if the book is overdue.
Throws: RecordNotFoundException
Thrown if the item is not valid
Throws: RuntimeException
Thrown if the item object does not match its database record
 o getDueDate
 public abstract Date getDueDate(Item item) throws RemoteException
Checks if the item is on loan and if so returns the due date, otherwise null.

Returns:
The due date of the item on loan or null if it's not on loan.
Throws: RuntimeException
Thrown if the item object does not match its database record
 o getLoanPeriod
 public abstract int getLoanPeriod(Item item) throws RemoteException
Gets the default loan period for this item.

Returns:
The default loan period in days or 0 if there is none.
 o getBorrower
 public abstract Borrower getBorrower(Item item) throws RemoteException
Checks if the item is on loan and if so returns the Borrower, otherwise null.

Returns:
The Borrower of the item on loan or null if it's not on loan.
 o getLoans
 public abstract Vector getLoans(Borrower borrower) throws RemoteException
Gets the Items this Borrower has on loan.

Returns:
The Borrower of the item on loan or null if it's not on loan.

All Packages  Class Hierarchy  This Package  Previous  Next  Index