|
|||||||
| 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
|
+--arlut.csd.ganymede.GanymedeSession
User-level session object in the Ganymede server. Each client
that logs in to the Ganymede server through the GanymedeServer login() method gets a GanymedeSession object, which oversees that
client's interactions with the server. The client talks to its
GanymedeSession object through the Session RMI interface, making calls to
access schema information and database objects in the server.
The GanymedeSession class provides query and editing services to
the client, tracks the client's status, and manages permissions.
Most of the actual database handling is done through a second,
database-layer session object called a DBSession that GanymedeSession
maintains for each user. GanymedeSession methods like view_db_object() and edit_db_object() make calls on the DBSession to actually access
DBObjects in the Ganymede
database. The client then receives a serialized ReturnVal which may include a remote
db_object reference so that
the client can directly talk to the DBObject or
DBEditObject over RMI.
Once a GanymedeSession is created by the GanymedeServer's login()
method, the client is considered to be authenticated, and may make
as many Session calls as it likes, until the GanymedeSession's
logout() method
is called. If the client dies or loses its network connection to
the Ganymede server for more than 10 minutes, the RMI system will
automatically call GanymedeSession's
unreferenced()
method, which will log the client out from the server.
The Ganymede server is transactional, and the client must call
openTransaction() before making any changes via edit_db_object()
or other editing methods. In turn, changes made by the client
using the edit_db_object() and related methods will not actually be
'locked-in' to the Ganymede database until the commitTransaction() method is called.
Most methods in this class are synchronized to avoid race condition security holes between the persona change logic and the actual operations.
| Field Summary | |
(package private) boolean |
beforeversupergash
GanymedeSessions created for internal operations always operate with supergash privileges. |
(package private) Client |
client
Remote reference to our client |
(package private) java.lang.String |
clienthost
The DNS name for the client's host |
(package private) serverClientProxy |
clientProxy
Async partial proxy for sending messages to the client. |
(package private) java.util.Date |
connecttime
The time that this client initially connected to the server. |
(package private) static boolean |
debug
|
(package private) DBObject |
defaultObj
A reference to the Ganymede DBObject
storing our default permissions,
or the permissions that applies when we are not in supergash mode
and we do not have any ownership over the object in question. |
(package private) PermMatrix |
defaultPerms
This variable stores the permission bits that are applicable to generic objects not specifically owned by this persona. |
(package private) PermMatrix |
delegatableDefaultPerms
This variable stores the permission bits that are applicable to generic objects not specifically owned by this persona and which the current admin has permission to delegate to subordinate roles. |
(package private) PermMatrix |
delegatablePersonaPerms
This variable stores the permission bits that are applicable to objects that the current persona has ownership privilege over and which the current admin has permission to delegate to subordinate roles. |
boolean |
enableOversight
If this variable is set to false, no custom wizard code will ever be invoked, and required fields will not be forced. |
boolean |
enableWizards
This variable tracks whether or not the client desires to have wizards presented. |
(package private) java.lang.Object |
forceLock
A synchronization object to make sure that we don't get confused by multiple threads possible trying to kill the user off. |
(package private) boolean |
forcing_off
A flag to let the forceOff() logic know that another thread has already tried to knock off the user. |
(package private) java.util.Date |
lastActionTime
The time of the user's last top-level operation.. |
(package private) java.lang.String |
lastEvent
Description of the last action recorded for this client. |
(package private) boolean |
logged_in
If true, the user is currently logged in. |
(package private) java.util.Vector |
newObjectOwnerInvids
This variable is a vector of object references ( Invid's) to the owner groups
that the client has requested newly created objects be placed in. |
(package private) int |
objectsCheckedOut
A count of how many objects this session has currently checked out. |
(package private) QueryResult |
ownerList
This variable caches the results of the getOwnerGroups() method. |
(package private) DBObjectBase |
permBase
Convenience persistent reference to the Permission Matrix object base |
(package private) static boolean |
permsdebug
|
(package private) java.util.Date |
permTimeStamp
When did we last update our local cache/summary of permissions records? |
(package private) DBObjectBase |
personaBase
Convenience persistent reference to the adminPersonae object base |
(package private) Invid |
personaInvid
The object reference identifier for the current persona, if any. |
(package private) java.lang.String |
personaName
The name of the current persona, of the form '<username>:<description>', for example, 'broccol:GASH Admin'. |
(package private) DBObject |
personaObj
A reference to our current persona object. |
(package private) PermMatrix |
personaPerms
This variable stores the permission bits that are applicable to objects that the current persona has ownership privilege over. |
(package private) java.util.Date |
personaTimeStamp
When did we last check our persona permissions? |
(package private) boolean |
remotelyAccessible
If true, this GanymedeSession will export its objects and fields for direct access via RMI. |
(package private) boolean |
semaphoreLocked
if this session is on the GanymedeServer's lSemaphore, this boolean will be true. |
(package private) DBSession |
session
Our DBSession object. |
(package private) java.lang.String |
status
The current status message for this client. |
(package private) boolean |
supergashMode
A flag indicating whether the client has supergash priviliges. |
(package private) boolean |
timedout
If true, the user has had a soft timeout and needs to re-authenticate with their password, even for their non-privileged username |
(package private) AdminEntry |
userInfo
This variable caches the AdminEntry
object which is reported to admin consoles connected to the
server when the console is updated. |
(package private) Invid |
userInvid
The object reference identifier for the logged in user, if any. |
(package private) java.lang.String |
username
The unique name that the user is connected to the server under.. |
(package private) java.util.Vector |
visibilityFilterInvids
This variable is a vector of object references (Invid's) to the owner groups that the client has requested the listing of objects be restricted to. |
(package private) GanymediatorWizard |
wizard
A GanymedeSession can have a single wizard active. |
(package private) GanymedeXMLSession |
xSession
If this session is being driven by a GanymedeXMLSession, this reference will be non-null. |
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf |
| Fields inherited from class java.rmi.server.RemoteServer |
log, logname |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
GanymedeSession()
Constructor for a server-internal GanymedeSession. |
|
GanymedeSession(Client client,
java.lang.String loginName,
DBObject userObject,
DBObject personaObject,
boolean exportObjects)
Constructor used to create a server-side attachment for a Ganymede client. |
|
GanymedeSession(java.lang.String sessionLabel)
Constructor for a server-internal GanymedeSession. |
|
| Method Summary | |
ReturnVal |
abortTransaction()
This method causes all changes made by the client to be thrown out by the database, and the transaction is closed. |
private void |
addResultRow(DBObject obj,
Query query,
QueryResult result,
boolean internal,
DBEditObject perspectiveObject)
This private method takes care of adding an object to a query result, checking permissions and what-not as needed. |
void |
checkIn()
This method is used by the server to decrement the admin console's display of the number of objects this user session has checked out and/or created. |
(package private) void |
checklogin()
This private method is called by all methods in GanymedeSession that require the client to be logged in to operate. |
void |
checkOut()
This method is used by the server to increment the admin console's display of the number of objects this user session has checked out and/or created. |
void |
checkpoint(java.lang.String key)
Pass-through method for schema kit code. |
ReturnVal |
clone_db_object(Invid invid)
Clone a new object from object <invid>. |
ReturnVal |
commitTransaction()
This method causes all changes made by the client to be 'locked in' to the database. |
ReturnVal |
commitTransaction(boolean abortOnFail)
This method causes all changes made by the client to be 'locked in' to the database. |
ReturnVal |
create_db_object(short type)
Create a new object of the given type. |
ReturnVal |
create_db_object(short type,
boolean embedded)
Create a new object of the given type. |
java.lang.String |
describe(Invid invid)
This method is intended as a lightweight way of returning a handy description of the type and label of the specified invid. |
DumpResult |
dump(Query query)
This method provides the hook for doing a fast database dump to a string form. |
ReturnVal |
edit_db_object(Invid invid)
Check an object out from the database for editing. |
void |
enableOversight(boolean val)
This method is used to allow local server-side code to request that no oversight be maintained over changes made to the server through this GanymedeSession. |
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. |
private boolean |
filterMatch(DBObject obj)
This method returns true if the visibility filter vector allows visibility of the object in question. |
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. |
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. |
(package private) void |
forceOff(java.lang.String reason)
If the server decides this person needs to get off (if the user times out, is forced off by an admin, or if the server is going down), it will call this method to knock them off. |
AdminEntry |
getAdminEntry()
This method is used to generate a serializable AdminEntry
object summarizing this GanymedeSession's state for
the admin console. |
BaseListTransport |
getBaseList()
Returns a serialized representation of the object types defined on the server. |
CategoryTransport |
getCategoryTree()
Returns a serialized representation of the basic category and base structure on the server. |
CategoryTransport |
getCategoryTree(boolean hideNonEditables)
Returns a serialized representation of the basic category and base structure on the server. |
java.lang.String |
getClientHostName()
This method returns the name of the system that the client is connected from. |
(package private) DBObject |
getContainingObj(DBObject object)
This method finds the ultimate owner of an embedded object |
ReturnVal |
getDataXML(FileReceiver receiver,
boolean logOffOnFailure)
This method is called by the XML client to initiate a dump of the entire data contents of the server. |
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. |
java.util.Vector |
getObjects(short baseid)
This is a method to allow code in the server to quickly and safely get a full list of objects in an object base. |
QueryResult |
getOwnerGroups()
This method returns a QueryResult of owner groups that the current persona has access to. |
PermEntry |
getPerm(DBObject object)
This method takes the administrator's current persona, considers the owner groups the administrator is a member of, checks to see if the object is owned by that group, and determines the appropriate permission bits for the object. |
PermEntry |
getPerm(DBObject object,
short fieldId)
This method takes the administrator's current persona, considers the owner groups the administrator is a member of, checks to see if the object is owned by that group, and determines the appropriate permission bits for the field in the object. |
(package private) PermEntry |
getPerm(short baseID,
boolean includeOwnedPerms)
This method returns the generic permissions for a object type. |
(package private) PermEntry |
getPerm(short baseID,
short fieldID,
boolean includeOwnedPerms)
This method returns the current persona's default permissions for a base and field. |
DBObject |
getPersona()
This method gives access to the DBObject for the administrator's persona record, if any. |
java.util.Vector |
getPersonae()
This method returns a list of personae names available to the user logged in. |
Invid |
getPersonaInvid()
Convenience method to get access to this session's persona invid. |
Category |
getRootCategory()
Deprecated. Superseded by the more efficient getCategoryTree() |
ReturnVal |
getSchemaXML(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. |
DBSession |
getSession()
This method returns a reference to the DBSession object encapsulated
by this GanymedeSession object. |
java.util.Vector |
getTypes()
Deprecated. Superseded by the more efficient getBaseList() |
(package private) DBObject |
getUser()
Convenience method to get access to this session's UserBase instance. |
Invid |
getUserInvid()
Convenience method to get access to this session's user invid. |
GanymediatorWizard |
getWizard()
Returns the active wizard, if any, for this GanymedeSession. |
ReturnVal |
getXMLDump(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. |
ReturnVal |
inactivate_db_object(Invid invid)
Inactivate an object in the database |
java.util.Vector |
internalQuery(Query query)
This method provides the hook for doing all manner of internal object listing for the Ganymede database. |
private QueryResult |
intersectQueries(Query query,
QueryResult temp_result,
DBLock rLock)
This private method takes care of intersecting the result of a query operation against any linked queries to filter a cluster of queries. |
boolean |
isMemberAll(java.util.Vector owners)
This helper method iterates through the owners vector and checks to see if the current personaInvid is a member of all of the groups through either direct membership or through membership of an owning group. |
boolean |
isSuperGash()
|
boolean |
isWizardActive()
Returns true if a wizard is currently interacting with the user. |
boolean |
isWizardActive(GanymediatorWizard wizard)
Returns true if a particular wizard is currently interacting with the user. |
void |
logout()
Log out this session. |
void |
logout(boolean forced_off)
Log out this session. |
ReturnVal |
openTransaction(java.lang.String describe)
This method call initiates a transaction on the server. |
ReturnVal |
openTransaction(java.lang.String describe,
boolean interactive)
This method call initiates a transaction on the server. |
boolean |
personaMatch(DBObject obj)
Returns true if the active persona has some sort of owner/access relationship with the object in question through its list of owner groups. |
QueryResult |
query(Query query)
This method provides the hook for doing all manner of simple object listing for the Ganymede database. |
QueryResult |
query(Query query,
DBEditObject perspectiveObject)
Server-side method for doing object listing with support for DBObject's lookupLabel
method. |
QueryResult |
queryDispatch(Query query,
boolean internal,
boolean forTransport,
DBLock extantLock,
DBEditObject perspectiveObject)
This method is the primary Query engine for the Ganymede databases. |
QueryResult |
queryInvids(java.util.Vector invidVector)
This method allows the client to get a status update on a specific list of invids. |
ReturnVal |
reactivate_db_object(Invid invid)
Reactivates an inactivated object in the database |
private boolean |
recursePersonaMatch(java.util.Vector owners,
java.util.Vector alreadySeen)
Recursive helper method for personaMatch.. |
boolean |
registerWizard(GanymediatorWizard wizard)
This method is used to register a wizard for this GanymedeSession. |
ReturnVal |
remove_db_object(Invid invid)
Remove an object from the database |
private void |
resetDefaultPerms()
This convenience method resets defaultPerms from the default permission object in the Ganymede database. |
boolean |
rollback(java.lang.String key)
Pass-through method for schema kit code. |
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. |
(package private) void |
sendMessage(int type,
java.lang.String message)
This method is used to send an asynchronous message to the client. |
private ReturnVal |
sendXML(FileReceiver receiver,
boolean sendData,
boolean sendSchema,
boolean logOffOnFailure)
|
ReturnVal |
setDefaultOwner(java.util.Vector ownerInvids)
This method may be used to set the owner groups of any objects created hereafter. |
(package private) void |
setLastError(java.lang.String error)
This method used to be used to flag an error condition that the client could then call getLastError() to look up. |
private void |
setLastEvent(java.lang.String text)
|
void |
setXSession(GanymedeXMLSession xSession)
|
(package private) void |
timeCheck()
This method is called by a background thread on the server, and knocks this user off if they are a remote user who has been inactive for a long time. |
java.lang.String |
toString()
This method provides a handy description of this session. |
void |
unreferenced()
This method is called when the Java RMI system detects that this remote object is no longer referenced by any remote objects. |
void |
unregisterWizard(GanymediatorWizard wizard)
Unregisters a wizard from this GanymedeSession. |
void |
updatePerms(boolean forceUpdate)
This non-exported method is used to generate a comprehensive permissions matrix that applies to all objects owned by the active persona for this user. |
ReturnVal |
view_db_object(Invid invid)
View an object from the database. |
java.lang.StringBuffer |
viewAdminHistory(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(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(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(Invid invid)
This method is intended as a lightweight way of returning the current label of the specified invid. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toStub, writeObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
| Field Detail |
static final boolean debug
static final boolean permsdebug
Client client
serverClientProxy clientProxy
boolean semaphoreLocked
boolean logged_in
boolean timedout
java.lang.Object forceLock
boolean forcing_off
boolean supergashMode
boolean beforeversupergash
int objectsCheckedOut
public boolean enableWizards
This variable tracks whether or not the client desires to have
wizards presented. If this is false, custom plug-in code
for the object types stored in the
DBStore may either
refuse certain operations or will resort to taking a default action.
public boolean enableOversight
If this variable is set to false, no custom wizard code will ever be invoked, and required fields will not be forced. This is intended primarily for direct database loading.
This variable is not intended ever to be available to the client, but should only be set by local server code.
java.util.Date connecttime
java.util.Date lastActionTime
java.lang.String username
The unique name that the user is connected to the server under.. this may be <username>[2], <username>[3], etc., if the user is connected to the server multiple times. The username will be unique on the server at any given time.
username should never be null. If a client logs in directly to a persona, username will be that personaname plus an optional session id.
Invid userInvid
java.lang.String clienthost
java.lang.String status
The current status message for this client. The
GanymedeAdmin code
that manages the admin consoles will consult this String when it
updates the admin consoles.
java.lang.String lastEvent
Description of the last action recorded for this client. The
GanymedeAdmin
code that manages the admin consoles will consult
this String when it updates the admin consoles.
DBSession session
Our DBSession object. DBSession is the generic DBStore access layer. A GanymedeSession is layered on top of a DBSession to provide access control and remote access via RMI. The DBSession object is accessible to server-side code only and provides transaction support.
GanymediatorWizard wizard
A GanymedeSession can have a single wizard active. If this variable
is non-null, a custom type-specific
DBEditObject subclass has instantiated
a wizard to interact with the user.
DBObjectBase personaBase
java.util.Date personaTimeStamp
DBObject personaObj
A reference to our current persona object. We save this so we can look up owner groups and what not more quickly. An end-user logged in without any extra privileges will have a null personaObj value.
java.lang.String personaName
Invid personaInvid
DBObjectBase permBase
java.util.Date permTimeStamp
PermMatrix personaPerms
This variable stores the permission bits that are applicable to objects
that the current persona has ownership privilege over. This matrix
is always a permissive superset of
defaultPerms.
PermMatrix defaultPerms
This variable stores the permission bits that are applicable to generic objects not specifically owned by this persona.
Each permission object in the Ganymede database includes permissions as apply to objects owned by the persona and as apply to objects not owned by the persona.
This variable holds the union of the 'as apply to objects not owned by the persona' matrices across all permissions objects that apply to the current persona.
PermMatrix delegatablePersonaPerms
This variable stores the permission bits that are applicable to
objects that the current persona has ownership privilege over and
which the current admin has permission to delegate to subordinate
roles. This matrix is always a permissive superset of
delegatableDefaultPerms.
PermMatrix delegatableDefaultPerms
This variable stores the permission bits that are applicable to generic objects not specifically owned by this persona and which the current admin has permission to delegate to subordinate roles.
Each permission object in the Ganymede database includes permissions as apply to objects owned by the persona and as apply to objects not owned by the persona.
This variable holds the union of the 'as apply to objects not owned by the persona' matrices across all permissions objects that apply to the current persona.
DBObject defaultObj
A reference to the Ganymede DBObject
storing our default permissions,
or the permissions that applies when we are not in supergash mode
and we do not have any ownership over the object in question.
java.util.Vector newObjectOwnerInvids
This variable is a vector of object references
(Invid's) to the owner groups
that the client has requested newly created objects be placed in. While
this vector is not-null, any new objects created will be owned by the list
of ownergroups held here.
java.util.Vector visibilityFilterInvids
This variable is a vector of object references (Invid's) to the owner groups that the client has requested the listing of objects be restricted to. That is, the client has requested that the results of Queries and Dumps only include those objects owned by owner groups in this list. This feature is used primarily for when a client is logged in with supergash privileges, but the user wants to restrict the visibility of objects for convenience.
QueryResult ownerList
This variable caches the results of the getOwnerGroups() method. It stores the list of owner groups
that the current persona has any kind of membership in, either
through direct membership or by being a member of a group that
owns other owner groups.
AdminEntry userInfo
This variable caches the AdminEntry
object which is reported to admin consoles connected to the
server when the console is updated.
boolean remotelyAccessible
If true, this GanymedeSession will export its objects and fields for direct access via RMI.
GanymedeXMLSession xSession
If this session is being driven by a GanymedeXMLSession, this reference will be non-null.
| Constructor Detail |
public GanymedeSession()
throws java.rmi.RemoteException
Note that all internal session activities (queries, etc.) are currently using a single, synchronized GanymedeSession object.. this mean that only one user at a time can currently be processed for login. 8-(
Internal sessions, as created by this constructor, have full privileges to do any possible operation.
public GanymedeSession(java.lang.String sessionLabel)
throws java.rmi.RemoteException
Note that all internal session activities (queries, etc.) are currently using a single, synchronized GanymedeSession object.. this mean that only one user at a time can currently be processed for login. 8-(
Internal sessions, as created by this constructor, have full privileges to do any possible operation.
public GanymedeSession(Client client,
java.lang.String loginName,
DBObject userObject,
DBObject personaObject,
boolean exportObjects)
throws java.rmi.RemoteException
Constructor used to create a server-side attachment for a Ganymede client.
This constructor is called by the
GanymedeServer
login()
method.
A Client can log in either as an end-user or as a admin persona. Typically, a client will log in with their end-user name and password, then use selectPersona to gain admin privileges. The server may allow users to login directly with an admin persona (supergash, say), if so configured.
client - Remote object exported by the client, provides id callbacksuserObject - The user record for this loginpersonaObject - The user's initial admin personaGanymedeServer.login(arlut.csd.ganymede.Client)| Method Detail |
public void setXSession(GanymedeXMLSession xSession)
public boolean isSuperGash()
public void checkpoint(java.lang.String key)
Pass-through method for schema kit code. This method is not
intended to be available to the client over RMI anymore, as
DBSession.checkpoint() now does a thread comparison to make sure
that nothing is attempting to do interleaved checkpoint
operations, and RMI doesn't guarantee that successive remote
method calls from a client will be issued from the same server
thread.
public boolean rollback(java.lang.String key)
Pass-through method for schema kit code. This method is not
intended to be available to the client over RMI anymore, as
DBSession.checkpoint() now does a thread comparison to make sure
that nothing is attempting to do interleaved checkpoint
operations, and RMI doesn't guarantee that successive remote
method calls from a client will be issued from the same server
thread.
public void checkOut()
public void checkIn()
public AdminEntry getAdminEntry()
This method is used to generate a serializable
AdminEntry
object summarizing this GanymedeSession's state for
the admin console.
Used by code in
GanymedeAdmin.
void setLastError(java.lang.String error)
This method used to be used to flag an error condition that the client could then call getLastError() to look up. It has been deprecated from that usage, and now simply logs the error.
void timeCheck()
This method is called by a background thread on the server, and knocks this user off if they are a remote user who has been inactive for a long time.
Note that this method is not synchronized, to avoid nested-monitor deadlock by the timeOutTask between a GanymedeSession object and the GanymedeServer object.
void forceOff(java.lang.String reason)
If the server decides this person needs to get off (if the user times out, is forced off by an admin, or if the server is going down), it will call this method to knock them off.
Note that this method is not synchronized, to avoid the possibility of deadlocking the admin console in the case of a deadlocked GanymedeSession.
void sendMessage(int type,
java.lang.String message)
This method is used to send an asynchronous message to the client. It is used to update the clients so they know when a build is being processed.
See ClientMessage
for the list of acceptable client message types.
public void unreferenced()
This method is called when the Java RMI system detects that this remote object is no longer referenced by any remote objects.
This method handles abnormal logouts and time outs for us. By default, the 1.1 RMI time-out is 10 minutes.
unreferenced in interface java.rmi.server.UnreferencedUnreferencedpublic void logout()
Log out this session. After this method is called, no other methods may be called on this session object.
This method is partially synchronized, to avoid locking up the admin console if this user's session has become deadlocked.
logout in interface SessionSessionpublic void logout(boolean forced_off)
Log out this session. After this method is called, no other methods may be called on this session object.
This method is partially synchronized, to avoid locking up the admin console if this user's session has become deadlocked.
public 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. 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.
enableWizards in interface Sessionval - If true, wizards will be enabled.Sessionpublic void enableOversight(boolean val)
This method is used to allow local server-side code to request that no oversight be maintained over changes made to the server through this GanymedeSession.
This is intended only for trusted code that does its own checking and validation on changes made to the database. If oversight is turned off, no wizard code will be called, and the required field logic will be bypassed. Extreme care must be used in disabling oversight, and oversight should only be turned off for direct loading and other situations where there won't be multi-user use, to avoid breaking constraints that custom plug-ins count on.
Oversight is enabled by default.
val - If true, oversight will be enabled.public java.lang.String getHelpBase()
This method is used to tell the client where to look to access the Ganymede help document tree.
getHelpBase in interface SessionSession
public 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. 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.
getMessage in interface Sessionkey - 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.
public 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. 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.
getMessageHTML in interface Sessionkey - 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.public java.lang.String getMyUserName()
This method returns the identification string that the server has assigned to the user.
getMyUserName in interface SessionSessionpublic java.lang.String getClientHostName()
This method returns the name of the system that the client is connected from.
public java.lang.String toString()
This method provides a handy description of this session.
toString in class java.rmi.server.RemoteObjectpublic java.util.Vector getPersonae()
This method returns a list of personae names available to the user logged in.
getPersonae in interface SessionSession
public 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.
selectPersona in interface SessionSessionpublic QueryResult getOwnerGroups()
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.
Note that getOwnerGroups caches its owner group list in the object
member ownerList
for efficiency.
getOwnerGroups in interface Sessionpublic ReturnVal setDefaultOwner(java.util.Vector ownerInvids)
This method may be used to set the owner groups of any objects created hereafter.
setDefaultOwner in interface SessionownerInvids - a Vector of Invid objects pointing to
ownergroup objects.public 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. 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 not accessible by the client's adminPersona.
Calling this method with ownerInvids set to null will turn off the filtering.
filterQueries in interface SessionownerInvids - a Vector of Invid objects pointing to ownergroup objects.public java.util.Vector getTypes()
This method returns a list of remote references to the Ganymede object type definitions. This method will throws a RuntimeException if it is called when the server is in schemaEditMode.
getTypes in interface SessionSessionpublic Category getRootCategory()
Returns the root of the category tree on the server
getRootCategory in interface SessionCategory,
Sessionpublic CategoryTransport getCategoryTree()
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.
getCategoryTree in interface SessionCategory,
Sessionpublic CategoryTransport getCategoryTree(boolean hideNonEditables)
Returns a serialized representation of the basic category and base structure on the server.
This method is synchronized to avoid any possible deadlock between DBStore and GanymedeSession, as the CategoryTransport constructor calls other synchronized methods on GanymedeSession.
getCategoryTree in interface SessionhideNonEditables - If true, the CategoryTransport returned
will only include those object types that are editable by the
client.Category,
Sessionpublic BaseListTransport getBaseList()
Returns a serialized representation of the object types defined on the server. This BaseListTransport object will not include field information. The client is obliged to call getFieldTemplateVector() on any bases that it needs field information for.
This method is synchronized to avoid any possible deadlock between DBStore and GanymedeSession, as the BaseListTransport constructor calls other synchronized methods on GanymedeSession
getBaseList in interface SessionBaseListTransport,
Sessionpublic java.util.Vector getFieldTemplateVector(short baseId)
Returns a vector of field definition templates, in display order.
This vector may be cached, as it is static for this object type over the lifetime of any GanymedeSession.
getFieldTemplateVector in interface SessionFieldTemplate,
Sessionpublic ReturnVal openTransaction(java.lang.String describe)
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 error dialog will be returned in that case.
openTransaction in interface Sessiondescribe - An optional string containing a comment to be
stored in the modification history for objects modified by this
transaction.Session
public ReturnVal openTransaction(java.lang.String describe,
boolean interactive)
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 error dialog will be returned in that case.
openTransaction in interface Sessiondescribe - An optional string containing a comment to be
stored in the modification history for objects modified by this
transaction.Sessionpublic ReturnVal commitTransaction(boolean abortOnFail)
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().
This method is synchronized to avoid nested-monitor deadlock in
DBSession.commitTransaction()
commitTransaction in interface SessionabortOnFail - If true, the transaction will be aborted if it
could not be committed successfully.Sessionpublic ReturnVal commitTransaction()
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().
commitTransaction in interface SessionSessionpublic ReturnVal abortTransaction()
abortTransaction in interface SessionSession
public 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. 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.
sendMail in interface Sessionaddress - 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.
public 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. 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.
sendHTMLMail in interface Sessionaddress - 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.public QueryResult queryInvids(java.util.Vector invidVector)
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.
queryInvids in interface SessioninvidVector - Vector of Invid's to get the status for.Session
public 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.
If the user does not have permission to view the object, null will be returned even if an object by that name does exist.
This method uses the GanymedeSession query() apparatus, and may not be called from a DBEditObject's commitPhase1/2() methods without risking deadlock.
findLabeledObject in interface Sessionname - Label for an objecttype - Object type id numberpublic DumpResult dump(Query query)
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.
This method uses the GanymedeSession query() apparatus, and may not be called from a DBEditObject's commitPhase1/2() methods without risking deadlock.
dump in interface SessionQuery,
Sessionpublic QueryResult query(Query query)
This method provides the hook for doing all manner of simple object listing for the Ganymede database.
This method may not be called from a DBEditObject's commitPhase1/2() methods without risking deadlock.
query in interface SessionSession
public QueryResult query(Query query,
DBEditObject perspectiveObject)
Server-side method for doing object listing with support for DBObject's
lookupLabel
method.
query - The query to be performedperspectiveObject - There are occasions when the server will want to do internal
querying in which the label of an object matching the query criteria is synthesized
for use in a particular context. If non-null, perspectiveObject's
lookupLabel
method will be used to generate the label for a result entry.public java.util.Vector internalQuery(Query query)
This method provides the hook for doing all manner of internal object listing for the Ganymede database. Unfiltered.
Result objects
public QueryResult queryDispatch(Query query,
boolean internal,
boolean forTransport,
DBLock extantLock,
DBEditObject perspectiveObject)
This method is the primary Query engine for the Ganymede databases. It is used by dump(), query(), and internalQuery().
query - The query to be handledinternal - If true, the query filter setting will not be honoredforTransport - If true, the QueryResult will build a buffer for serializationextantLock - If non-null, queryDispatch will not attempt to establish its
own lock on the relevant base(s) for the duration of the query. The extantLock must
have any bases that the queryDispatch method determines it needs access to locked, or
an IllegalArgumentException will be thrown.perspectiveObject - There are occasions when the server will want to do internal
querying in which the label of an object matching the query criteria is synthesized
for use in a particular context. If non-null, perspectiveObject's
lookupLabel
method will be used to generate the label for a result entry.
private QueryResult intersectQueries(Query query,
QueryResult temp_result,
DBLock rLock)
This private method takes care of intersecting the result of a query operation against any linked queries to filter a cluster of queries. This is only of interest when performing a query on both embedded and non-embedded fields of a given object type.
private void addResultRow(DBObject obj,
Query query,
QueryResult result,
boolean internal,
DBEditObject perspectiveObject)
This private method takes care of adding an object to a query result, checking permissions and what-not as needed.
This method is not synchronized for performance reasons, but is only to be called from methods synchronized on this GanymedeSession.
obj - The object to add to the query resultsquery - The query that we are processing, used to get
the list of fields we're wanting to returnresult - The QueryResult we're building upinternal - If true, we won't check permissionsperspectiveObject - This is an object that can be consulted
to see what its
lookupLabel()
method will return. This can be null without harmful effect, but if
is it not null, a custom DBEditObject subclass can choose to present
the label of obj from its perspective. This is used to simulate
a sort of relational effect for objects linked from the object
being added, by letting different fields in the object take on the
role of the label when seen from different objects.public java.lang.String viewObjectLabel(Invid invid)
This method is intended as a lightweight way of returning the current label of the specified invid. No locking is done, and the label returned will be viewed through the context of the current transaction, if any.
viewObjectLabel in interface SessionSessionpublic java.lang.String describe(Invid invid)
This method is intended as a lightweight way of returning a handy description of the type and label of the specified invid. No locking is done, and the label returned will be viewed through the context of the current transaction, if any.
public java.lang.StringBuffer viewObjectHistory(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>.
viewObjectHistory in interface Sessioninvid - The invid identifier for the object whose history is soughtsince - Report events since this date, or all events if this is null.Session
public java.lang.StringBuffer viewObjectHistory(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>.
viewObjectHistory in interface Sessioninvid - 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.Session
public java.lang.StringBuffer viewAdminHistory(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>.
viewAdminHistory in interface Sessioninvid - The invid identifier for the admin Persona whose history is soughtsince - Report events since this date, or all events if this is null.Sessionpublic ReturnVal view_db_object(Invid invid)
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.
NOTE: It is critical that any code that looks at the values of
fields in a DBObject
go through a view_db_object() method
or else the object will not properly know who owns it, which
is critical for it to be able to properly authenticate field
access. Keep in mind, however, that view_db_object clones the
DBObject in question, so this method is very heavyweight.
view_db_object in interface Sessionpublic ReturnVal edit_db_object(Invid invid)
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 GanymedeSession 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().
edit_db_object in interface Sessionpublic ReturnVal create_db_object(short type)
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 GanymedeSession 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().
create_db_object in interface Sessiontype - The kind of object to create.Session
public ReturnVal create_db_object(short type,
boolean embedded)
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 GanymedeSession 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.embedded - If true, assume the object created is embedded and
does not need to have owners set.public ReturnVal clone_db_object(Invid invid)
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.
clone_db_object in interface SessionSessionpublic ReturnVal inactivate_db_object(Invid invid)
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.
inactivate_db_object in interface SessionSessionpublic ReturnVal reactivate_db_object(Invid invid)
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().
reactivate_db_object in interface SessionSessionpublic ReturnVal remove_db_object(Invid invid)
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().
remove_db_object in interface SessionSession
public ReturnVal getSchemaXML(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. 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.
getSchemaXML in interface Session
public ReturnVal getDataXML(FileReceiver receiver,
boolean logOffOnFailure)
This method is called by the XML client to initiate a dump of the entire data contents of the server. 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.
getDataXML in interface Session
public ReturnVal getXMLDump(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. 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.
getXMLDump in interface Session
private ReturnVal sendXML(FileReceiver receiver,
boolean sendData,
boolean sendSchema,
boolean logOffOnFailure)
DBObject getUser()
public java.util.Vector getObjects(short baseid)
This is a method to allow code in the server to quickly and safely get a full list of objects in an object base.
This is only a server-side method. getObjects() does not do anything to check access permissions.
It is the responsiblity of the code that gets a Vector back from this method not to modify the Vector returned in any way, as it may be shared by other threads.
Any objects returned by getObjects() will reflect the state of that object in this session's transaction, if a transaction is open.
public Invid getUserInvid()
public Invid getPersonaInvid()
DBObject getContainingObj(DBObject object)
public PermEntry getPerm(DBObject object)
This method takes the administrator's current persona, considers the owner groups the administrator is a member of, checks to see if the object is owned by that group, and determines the appropriate permission bits for the object. getPerm() will OR any proprietary ownership bits with the default permissions to give an appopriate result.
public PermEntry getPerm(DBObject object,
short fieldId)
This method takes the administrator's current persona, considers the owner groups the administrator is a member of, checks to see if the object is owned by that group, and determines the appropriate permission bits for the field in the object.
This method duplicates the logic of getPerm(object) internally for efficiency. This method is
called quite a lot in the server, and has been tuned
to use the pre-calculated GanymedeSession
defaultPerms
and personaPerms
objects which cache the effective permissions for fields in the
Ganymede DBStore for the current
persona.
PermEntry getPerm(short baseID,
boolean includeOwnedPerms)
This method returns the generic permissions for a object type. This is currently used primarily to check to see whether a user has privileges to create an object of a specific type.
This method takes the administrator's current persona's set of appropriate permission matrices, does a binary OR'ing of the permission bits for the given base, and returns the effective permission entry.
includeOwnedPerms - If true, this method will return the
permission that the current persona would have for an object that
was owned by the current persona. If false, this method will
return the default permissions that apply to objects not owned by
the persona.
PermEntry getPerm(short baseID,
short fieldID,
boolean includeOwnedPerms)
This method returns the current persona's default permissions for a base and field. This permission applies generically to objects that are not owned by this persona and to objects that are owned.
This is used by the
dump()
code to determine whether a field should
be added to the set of possible fields to be returned at the
time that the dump results are being prepared.
includeOwnedPerms - If true, this method will return the permission
that the current persona would have for an object that was owned
by the current persona. If false, this method will return the default
permissions that apply to objects not owned by the persona.private void resetDefaultPerms()
This convenience method resets defaultPerms from the default permission object in the Ganymede database.
public void updatePerms(boolean forceUpdate)
This non-exported method is used to generate a comprehensive permissions matrix that applies to all objects owned by the active persona for this user.
This method is synchronized, and a whole lot of operations in the server need to pass through here to ensure that the effective permissions for this session haven't changed. This method is designed to return very quickly if permissions have not changed and forceUpdate is false.
forceUpdate - If false, updatePerms() will do nothing if the Ganymede
permissions database has not been changed since updatePerms() was last
called in this GanymedeSession.public DBObject getPersona()
This method gives access to the DBObject for the administrator's
persona record, if any. This is used by
DBSession to get the
label for the administrator for record keeping.
public DBSession getSession()
This method returns a reference to the
DBSession object encapsulated
by this GanymedeSession object. This is intended to be used by
subclasses of DBEditObject
that might not necessarily be in the arlut.csd.ganymede package.
public boolean isWizardActive()
Returns true if a wizard is currently interacting with the user.
GanymediatorWizardpublic boolean isWizardActive(GanymediatorWizard wizard)
Returns true if a particular wizard is currently interacting with the user.
GanymediatorWizardpublic GanymediatorWizard getWizard()
Returns the active wizard, if any, for this GanymedeSession.
GanymediatorWizardpublic boolean registerWizard(GanymediatorWizard wizard)
This method is used to register a wizard for this GanymedeSession.
If an active wizard is already registered, this method will return false.
GanymediatorWizardpublic void unregisterWizard(GanymediatorWizard wizard)
Unregisters a wizard from this GanymedeSession.
If there is no active wizard registered, or if the registered wizard is not equal to the wizard parameter, an IllegalArgumentException will be thrown.
GanymediatorWizardpublic boolean personaMatch(DBObject obj)
Returns true if the active persona has some sort of owner/access relationship with the object in question through its list of owner groups.
private boolean recursePersonaMatch(java.util.Vector owners,
java.util.Vector alreadySeen)
owners - A vector of invids pointing to OwnerBase objectsalreadySeen - A vector of owner group Invid's that have
already been checked. (For infinite loop avoidance).public boolean isMemberAll(java.util.Vector owners)
private boolean filterMatch(DBObject obj)
private void setLastEvent(java.lang.String text)
void checklogin()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||