|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Client side interface definition for the
GanymedeSession class. The Session
interface is provided to the client by the
GanymedeServer's
login()
method, and provides the client with an RMI reference that can be used
to communicate with the Ganymede server.
Many of the methods in this interface, when called, will return
remote object references that the client can in turn interact with
to perform operations on the server. These include the
db_object reference that can
be returned as part of a ReturnVal
return value, and the db_field
references that are obtained from the db_object references.
DBSession| Method Summary | |
arlut.csd.ganymede.ReturnVal |
abortTransaction()
This method causes all changes made by the client to be thrown out by the database, and the transaction is closed. |
arlut.csd.ganymede.ReturnVal |
clone_db_object(arlut.csd.ganymede.Invid invid)
Clone a new object from object <invid>. |
arlut.csd.ganymede.ReturnVal |
commitTransaction()
This method causes all changes made by the client to be 'locked in' to the database. |
arlut.csd.ganymede.ReturnVal |
commitTransaction(boolean abortOnFail)
This method causes all changes made by the client to be 'locked in' to the database. |
arlut.csd.ganymede.ReturnVal |
create_db_object(short type)
Create a new object of the given type. |
arlut.csd.ganymede.DumpResult |
dump(arlut.csd.ganymede.Query query)
This method provides the hook for doing a fast database dump to a string form. |
arlut.csd.ganymede.ReturnVal |
edit_db_object(arlut.csd.ganymede.Invid invid)
Check an object out from the database for editing. |
void |
enableWizards(boolean val)
This method is used to allow a client to request that wizards not be provided in response to actions by the client. |
arlut.csd.ganymede.ReturnVal |
filterQueries(java.util.Vector ownerInvids)
This method may be used to cause the server to pre-filter any object listing to only show those objects directly owned by owner groups referenced in the ownerInvids list. |
arlut.csd.ganymede.Invid |
findLabeledObject(java.lang.String name,
short type)
Returns an Invid for an object of a specified type and name, or null if no such object could be found. |
arlut.csd.ganymede.BaseListTransport |
getBaseList()
Returns a serialized representation of the object types defined on the server. |
arlut.csd.ganymede.CategoryTransport |
getCategoryTree()
Returns a serialized representation of the basic category and base structure on the server. |
arlut.csd.ganymede.CategoryTransport |
getCategoryTree(boolean hideNonEditables)
Returns a serialized representation of the basic category and base structure on the server. |
arlut.csd.ganymede.ReturnVal |
getDataXML(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
This method is called by the XML client to initiate a dump of the server's entire database in XML format. |
java.util.Vector |
getFieldTemplateVector(short baseId)
Returns a vector of field definition templates, in display order. |
java.lang.String |
getHelpBase()
This method is used to tell the client where to look to access the Ganymede help document tree. |
java.lang.StringBuffer |
getMessage(java.lang.String key,
boolean onlyShowIfNew)
This method is used to allow the client to retrieve messages like the motd from the server. |
java.lang.StringBuffer |
getMessageHTML(java.lang.String key,
boolean onlyShowIfNew)
This method is used to allow the client to retrieve messages like the motd from the server. |
java.lang.String |
getMyUserName()
This method returns the identification string that the server has assigned to the user. |
arlut.csd.ganymede.QueryResult |
getOwnerGroups()
This method returns a QueryResult of owner groups that the current persona has access to. |
java.util.Vector |
getPersonae()
This method returns a list of personae names available to the user logged in. |
arlut.csd.ganymede.Category |
getRootCategory()
Deprecated. Superseded by the more efficient getCategoryTree() |
arlut.csd.ganymede.ReturnVal |
getSchemaXML(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
This method is called by the XML client to initiate a dump of the server's schema definition in XML format. |
java.util.Vector |
getTypes()
Deprecated. Superseded by the more efficient getBaseList() |
arlut.csd.ganymede.ReturnVal |
getXMLDump(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
This method is called by the XML client to initiate a dump of the server's entire database, schema and data, in XML format. |
arlut.csd.ganymede.ReturnVal |
inactivate_db_object(arlut.csd.ganymede.Invid invid)
Inactivate an object in the database |
void |
logout()
This method logs a client out and closes up any resources used by the client on the server. |
arlut.csd.ganymede.ReturnVal |
openTransaction(java.lang.String description)
This method call initiates a transaction on the server. |
arlut.csd.ganymede.ReturnVal |
openTransaction(java.lang.String description,
boolean interactive)
This method call initiates a transaction on the server. |
arlut.csd.ganymede.QueryResult |
query(arlut.csd.ganymede.Query query)
List objects in the database meeting the given query criteria. |
arlut.csd.ganymede.QueryResult |
queryInvids(java.util.Vector invidVector)
This method allows the client to get a status update on a specific list of invids. |
arlut.csd.ganymede.ReturnVal |
reactivate_db_object(arlut.csd.ganymede.Invid invid)
Reactivates an inactivated object in the database |
arlut.csd.ganymede.ReturnVal |
remove_db_object(arlut.csd.ganymede.Invid invid)
Remove an object from the database |
boolean |
selectPersona(java.lang.String persona,
java.lang.String password)
This method is used to select an admin persona, changing the permissions that the user has and the objects that are accessible in the database. |
void |
sendHTMLMail(java.lang.String address,
java.lang.String subject,
java.lang.StringBuffer body,
java.lang.StringBuffer HTMLbody)
This method allows clients to cause mail to be sent from the Ganymede server when they can't do it themselves. |
void |
sendMail(java.lang.String address,
java.lang.String subject,
java.lang.StringBuffer body)
This method allows clients to cause mail to be sent from the Ganymede server when they can't do it themselves. |
arlut.csd.ganymede.ReturnVal |
setDefaultOwner(java.util.Vector ownerInvids)
This method may be used to set the owner groups of any objects created hereafter. |
arlut.csd.ganymede.ReturnVal |
view_db_object(arlut.csd.ganymede.Invid invid)
View an object from the database. |
java.lang.StringBuffer |
viewAdminHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since)
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>. |
java.lang.StringBuffer |
viewObjectHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since)
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>. |
java.lang.StringBuffer |
viewObjectHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since,
boolean fullTransactions)
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>. |
java.lang.String |
viewObjectLabel(arlut.csd.ganymede.Invid invid)
This method returns the label for a specific invid. |
| Method Detail |
public void logout()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void enableWizards(boolean val)
throws java.rmi.RemoteException
This method is used to allow a client to request that wizards not be provided in response to actions by the client. This is intended to allow non-interactive or non-gui clients to do work without having to go through a wizard interaction sequence.
Wizards are enabled by default.
val - If true, wizards will be enabled.
java.rmi.RemoteException
public java.lang.String getHelpBase()
throws java.rmi.RemoteException
This method is used to tell the client where to look to access the Ganymede help document tree. The String returned is a URL for the root of the Ganymede help web.
java.rmi.RemoteException
public java.lang.StringBuffer getMessage(java.lang.String key,
boolean onlyShowIfNew)
throws java.rmi.RemoteException
This method is used to allow the client to retrieve messages like the motd from the server. The client can specify that it only wants to see a message if it has changed since the user last logged out. This is intended to support a message of the day type functionality. The server will not necessarily remember the last log out across server restart.
key - A string, like "motd", indicating what message to retrieve.onlyShowIfNew - If true, the message will only be returned if
it has changed since the user last logged out.
java.rmi.RemoteException
public java.lang.StringBuffer getMessageHTML(java.lang.String key,
boolean onlyShowIfNew)
throws java.rmi.RemoteException
This method is used to allow the client to retrieve messages like the motd from the server. The client can specify that it only wants to see a message if it has changed since the user last logged out. This is intended to support a message of the day type functionality. The server will not necessarily remember the last log out across server restart.
key - A string, like "motd", indicating what message to retrieve.onlyShowIfNew - If true, the message will only be returned if
it has changed since the user last logged out.
java.rmi.RemoteException
public java.lang.String getMyUserName()
throws java.rmi.RemoteException
This method returns the identification string that the server has assigned to the user.
java.rmi.RemoteException
public java.util.Vector getPersonae()
throws java.rmi.RemoteException
This method returns a list of personae names available to the user logged in.
java.rmi.RemoteException
public boolean selectPersona(java.lang.String persona,
java.lang.String password)
throws java.rmi.RemoteException
This method is used to select an admin persona, changing the permissions that the user has and the objects that are accessible in the database.
java.rmi.RemoteException
public arlut.csd.ganymede.QueryResult getOwnerGroups()
throws java.rmi.RemoteException
This method returns a QueryResult of owner groups that the current persona has access to. This list is the transitive closure of the list of owner groups in the current persona. That is, the list includes all the owner groups in the current persona along with all of the owner groups those owner groups own, and so on.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal setDefaultOwner(java.util.Vector ownerInvids)
throws java.rmi.RemoteException
This method may be used to set the owner groups of any objects created hereafter.
ownerInvids - a Vector of Invid objects pointing to
ownergroup objects.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal filterQueries(java.util.Vector ownerInvids)
throws java.rmi.RemoteException
This method may be used to cause the server to pre-filter any object listing to only show those objects directly owned by owner groups referenced in the ownerInvids list. This filtering will not restrict the ability of the client to directly view any object that the client's persona would normally have access to, but will reduce clutter and allow the client to present the world as would be seen by administrator personas with just the listed ownerGroups accessible.
This method cannot be used to grant access to objects that are accessible by the client's adminPersona.
Calling this method with ownerInvids set to null will turn off the filtering.
ownerInvids - a Vector of Invid objects pointing to ownergroup objects.
java.rmi.RemoteException
public java.util.Vector getTypes()
throws java.rmi.RemoteException
List types of objects stored and manipulated through the Ganymede server.
This method returns a vector of Base remote references.
java.rmi.RemoteExceptionBase
public arlut.csd.ganymede.Category getRootCategory()
throws java.rmi.RemoteException
Returns the root of the category tree on the server
java.rmi.RemoteExceptionCategory
public arlut.csd.ganymede.CategoryTransport getCategoryTree()
throws java.rmi.RemoteException
Returns a serialized representation of the basic category and base structure on the server. The returned CategoryTransport will include only object types that are editable by the user.
java.rmi.RemoteExceptionCategoryTransport
public arlut.csd.ganymede.CategoryTransport getCategoryTree(boolean hideNonEditables)
throws java.rmi.RemoteException
Returns a serialized representation of the basic category and base structure on the server.
hideNonEditables - If true, the CategoryTransport returned
will only include those object types that are editable by the
client.
java.rmi.RemoteExceptionCategoryTransport
public arlut.csd.ganymede.BaseListTransport getBaseList()
throws java.rmi.RemoteException
Returns a serialized representation of the object types defined on the server.
java.rmi.RemoteExceptionBaseListTransport
public java.util.Vector getFieldTemplateVector(short baseId)
throws java.rmi.RemoteException
Returns a vector of field definition templates, in display order.
This vector may be cached, as it is static for this object type.
java.rmi.RemoteExceptionFieldTemplate
public arlut.csd.ganymede.ReturnVal openTransaction(java.lang.String description)
throws java.rmi.RemoteException
This method call initiates a transaction on the server. This call must be executed before any objects are modified (created, edited, inactivated, removed).
Currently each client can only have one transaction open. It is an error to call openTransaction() while another transaction is still open, and an exception will be thrown in this case.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal openTransaction(java.lang.String description,
boolean interactive)
throws java.rmi.RemoteException
This method call initiates a transaction on the server. This call must be executed before any objects are modified (created, edited, inactivated, removed).
Currently each client can only have one transaction open. It is an error to call openTransaction() while another transaction is still open, and an exception will be thrown in this case.
If interactive is false, processing of the transaction will take certain shortcuts. Invid linking will not be checkpointed.. any failure that cannot be safely handled without Invid link checkpointing will cause the transaction to refuse to commit when commitTransaction() is called.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal commitTransaction(boolean abortOnFail)
throws java.rmi.RemoteException
This method causes all changes made by the client to be 'locked in' to the database. When commitTransaction() is called, the changes made by the client during this transaction is logged to a journal file on the server, and the changes will become visible to other clients.
If the transaction cannot be committed for some reason, commitTransaction() will abort the transaction if abortOnFail is true. In any case, commitTransaction() will return a ReturnVal indicating whether or not the transaction could be committed, and whether or not the transaction remains open for further attempts at commit. If ReturnVal.doNormalProcessing is set to true, the transaction remains open and it is up to the client to decide whether to abort the transaction by calling abortTransaction(), or to attempt to fix the reported problem and try another call to commitTransaction().
abortOnFail - If true, the transaction will be aborted if it
could not be committed successfully.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal commitTransaction()
throws java.rmi.RemoteException
This method causes all changes made by the client to be 'locked in' to the database. When commitTransaction() is called, the changes made by the client during this transaction is logged to a journal file on the server, and the changes will become visible to other clients.
commitTransaction() will return a ReturnVal indicating whether or not the transaction could be committed, and whether or not the transaction remains open for further attempts at commit. If ReturnVal.doNormalProcessing is set to true, the transaction remains open and it is up to the client to decide whether to abort the transaction by calling abortTransaction(), or to attempt to fix the reported problem and try another call to commitTransaction().
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal abortTransaction()
throws java.rmi.RemoteException
This method causes all changes made by the client to be thrown out by the database, and the transaction is closed.
java.rmi.RemoteException
public void sendMail(java.lang.String address,
java.lang.String subject,
java.lang.StringBuffer body)
throws java.rmi.RemoteException
This method allows clients to cause mail to be sent from the Ganymede server when they can't do it themselves. The mail will have a From: header indicating the identity of the sender.
body is a StringBuffer instead of a String because RMI has a 64k serialization limit on the String class.
address - The addresses to mail to, may have more than one
address separated by commas or spaces.subject - The subject of this mail, will have 'Ganymede:' prepended
by the server.body - The content of the message.
java.rmi.RemoteException
public void sendHTMLMail(java.lang.String address,
java.lang.String subject,
java.lang.StringBuffer body,
java.lang.StringBuffer HTMLbody)
throws java.rmi.RemoteException
This method allows clients to cause mail to be sent from the Ganymede server when they can't do it themselves. The mail will have a From: header indicating the identity of the sender.
body and HTMLbody are StringBuffer's instead of Strings because RMI has a 64k serialization limit on the String class.
address - The addresses to mail to, may have more than one
address separated by commas or spaces.subject - The subject of this mail, will have 'Ganymede:' prepended
by the server.body - The plain-ASCII content of the message, or null if none.HTMLbody - The HTML content of the message, or null if none.
java.rmi.RemoteException
public arlut.csd.ganymede.DumpResult dump(arlut.csd.ganymede.Query query)
throws java.rmi.RemoteException
This method provides the hook for doing a
fast database dump to a string form. The
DumpResult
returned comprises a formatted dump of all visible
fields and objects that match the given query.
java.rmi.RemoteExceptionQuery
public arlut.csd.ganymede.QueryResult queryInvids(java.util.Vector invidVector)
throws java.rmi.RemoteException
This method allows the client to get a status update on a specific list of invids.
If any of the invids are not currently defined in the server, or if the client doesn't have permission to view any of the invids, those invids' status will not be included in the returned QueryResult.
invidVector - Vector of Invid's to get the status for.
java.rmi.RemoteException
public arlut.csd.ganymede.Invid findLabeledObject(java.lang.String name,
short type)
throws java.rmi.RemoteException
Returns an Invid for an object of a specified type and name, or null if no such object could be found.
If the user does not have permission to view the object, null will be returned even if an object by that name does exist.
name - Label for an objecttype - Object type id number
java.rmi.RemoteException
public arlut.csd.ganymede.QueryResult query(arlut.csd.ganymede.Query query)
throws java.rmi.RemoteException
List objects in the database meeting the given query criteria.
The database will be read-locked during the query, assuring a transaction-consistent view of the database. The QueryResult returned comprises a formatted dump of the invid's and labels of the viewable objects matching the provided query.
java.rmi.RemoteException
public java.lang.String viewObjectLabel(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
This method returns the label for a specific invid.
java.rmi.RemoteException
public java.lang.StringBuffer viewObjectHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since)
throws java.rmi.RemoteException
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>.
invid - The invid identifier for the object whose history is soughtsince - Report events since this date, or all events if this is null.
java.rmi.RemoteException
public java.lang.StringBuffer viewObjectHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since,
boolean fullTransactions)
throws java.rmi.RemoteException
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>.
invid - The invid identifier for the object whose history is soughtsince - Report events since this date, or all events if this is null.fullTransactions - If false, only events directly involving the requested
object will be included in the result buffer.
java.rmi.RemoteException
public java.lang.StringBuffer viewAdminHistory(arlut.csd.ganymede.Invid invid,
java.util.Date since)
throws java.rmi.RemoteException
This method returns a multi-line string containing excerpts from the Ganymede log relating to <invid>, since time <since>.
invid - The invid identifier for the admin Persona whose history is soughtsince - Report events since this date, or all events if this is null.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal view_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
View an object from the database. The ReturnVal returned will
carry a db_object reference,
which can be obtained by the client
calling ReturnVal.getObject().
If the object could not be
viewed for some reason, the ReturnVal will carry an encoded error
dialog for the client to display.
view_db_object() can be done at any time, outside of the bounds of any transaction. view_db_object() returns a snapshot of the object's state at the time the view_db_object() call is processed, and will be transaction-consistent internally.
If view_db_object() is called during a transaction, the object will be returned as it stands during the transaction.. that is, if the object has been changed during the transaction, that changed object will be returned, even if the transaction has not yet been committed, and other clients would not be able to see that version of the object.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal edit_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
Check an object out from the database for editing. The ReturnVal
returned will carry a db_object reference, which can be obtained
by the client calling
ReturnVal.getObject().
If the object could not be checked out for editing for some
reason, the ReturnVal will carry an encoded error dialog for the
client to display.
Keep in mind that only one Session can have a particular
DBEditObject checked out for
editing at a time. Once checked out, the object will be unavailable
to any other sessions until this session calls
commitTransaction()
or abortTransaction().
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal create_db_object(short type)
throws java.rmi.RemoteException
Create a new object of the given type. The ReturnVal returned will carry a db_object reference, which can be obtained by the client calling ReturnVal.getObject(). If the object could not be checked out for editing for some reason, the ReturnVal will carry an encoded error dialog for the client to display.
Keep in mind that only one Session can have a particular
DBEditObject checked out for
editing at a time. Once created, the object will be unavailable
to any other sessions until this session calls
commitTransaction().
type - The kind of object to create.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal clone_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
Clone a new object from object <invid>. The ReturnVal returned will carry a db_object reference, which can be obtained by the client calling ReturnVal.getObject(). If the object could not be checked out for editing for some reason, the ReturnVal will carry an encoded error dialog for the client to display.
This method must be called within a transactional context.
Typically, only certain values will be cloned. What values are retained is up to the specific code module provided for the invid type of object.
java.rmi.RemoteExceptionSession
public arlut.csd.ganymede.ReturnVal inactivate_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
Inactivate an object in the database
This method must be called within a transactional context. The object's
change in status will not be visible to other sessions until this session calls
commitTransaction().
Objects inactivated will typically be altered to reflect their inactive status, but the object itself might not be purged from the Ganymede server for a defined period of time, to allow other network systems to have time to do accounting, clean up, etc., before a user id or network address is re-used.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal reactivate_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
Reactivates an inactivated object in the database
This method is only applicable to inactivated objects. For such, the object will be reactivated if possible, and the removal date will be cleared. The object may retain an expiration date, however.
The client should check the returned ReturnVal's
getObjectStatus()
method to see whether the re-activated object has an expiration date set.
This method must be called within a transactional context. The object's
change in status will not be visible to other sessions until this session calls
commitTransaction().
java.rmi.RemoteExceptionSession
public arlut.csd.ganymede.ReturnVal remove_db_object(arlut.csd.ganymede.Invid invid)
throws java.rmi.RemoteException
Remove an object from the database
This method must be called within a transactional context.
Certain objects cannot be inactivated, but must instead be simply removed on demand. The active permissions for the client may determine whether a particular type of object may be removed. Any problems with permissions to remove this object will result in a dialog being returned in the ReturnVal.
This method must be called within a transactional context. The object's
removal will not be visible to other sessions until this session calls
commitTransaction().
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal getSchemaXML(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
throws java.rmi.RemoteException
This method is called by the XML client to initiate a dump of the server's schema definition in XML format. The FileReceiver referenced passed as a parameter to this method will be used to send the data to the client.
This method will not return until the complete schema definition in XML form has been sent to the receiver, or until an exception is caught from the receiver. The returned ReturnVal indicates the success of the file transmission.
This method is only available to a supergash-privileged GanymedeSession.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal getDataXML(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
throws java.rmi.RemoteException
This method is called by the XML client to initiate a dump of the server's entire database in XML format. The FileReceiver referenced passed as a parameter to this method will be used to send the data to the client.
This method will not return until the complete server data dump in XML form has been sent to the receiver, or until an exception is caught from the receiver. The returned ReturnVal indicates the success of the file transmission.
This method is only available to a supergash-privileged GanymedeSession.
java.rmi.RemoteException
public arlut.csd.ganymede.ReturnVal getXMLDump(arlut.csd.ganymede.FileReceiver receiver,
boolean logOffOnFailure)
throws java.rmi.RemoteException
This method is called by the XML client to initiate a dump of the server's entire database, schema and data, in XML format. The FileReceiver referenced passed as a parameter to this method will be used to send the data to the client.
This method will not return until the complete server data dump in XML form has been sent to the receiver, or until an exception is caught from the receiver. The returned ReturnVal indicates the success of the file transmission.
This method is only available to a supergash-privileged GanymedeSession.
java.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||