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