org.gxos
Class RootContext

java.lang.Object
  |
  +--org.gxos.gndi.context.GxContext
        |
        +--org.gxos.RootContext
All Implemented Interfaces:
javax.naming.Context, XMLObject

public class RootContext
extends GxContext

A root object for Garnet Collaboration System. This object contains top level services. These are Admin, Capabilities, Devices, Documents, Events, Multimedia, Users and mega meetings.

$Id: RootContext.java,v 1.21 2001/09/27 19:31:43 balsoy Exp $


Field Summary
static java.lang.String ARCHIVE
           
static java.lang.String RECYCLE
           
static java.lang.String TOP
           
 
Fields inherited from class org.gxos.gndi.context.GxContext
CURRENT, NULL, SELF, SELF_NAME, UNDEFINED
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Constructor Summary
RootContext(java.lang.String root, javax.naming.Context initial)
          RootContext constructor.
 
Method Summary
 void constructDevice(java.lang.String deviceAddr, DeviceTypeType type)
          Adds a new device to repository.
 void constructDevice(java.lang.String deviceAddr, java.lang.String deviceType)
          Adds a new device to repository.
 void constructEvent()
          Creates an empty event object under the current root, i.e.
 void constructEvent(int seqno, java.lang.String stream)
          Creates an event object under the current root, i.e.
 void constructMeeting(java.lang.String megaMeetingURL, Meeting meeting)
          Adds a meeting under a megameeting, i.e.
 void constructMeeting(java.lang.String megaMeetingURL, java.lang.String meetingName, java.lang.String ownerID, java.lang.String type)
          Creates an empty meeting under a megameeting, i.e.
 void constructMegaMeeting(java.lang.String megaMeetingName)
          Creates a megameeting under the current root, i.e.
 void constructUser(java.lang.String login, java.lang.String password, java.lang.String name, java.lang.String pre, java.lang.String suf, java.lang.String email)
          Creates a user object with given parameters, sets other values to defaults, and adds it to the current context.
 void constructUser(UserObject user)
          Adds a user object to the user repository.
 GxContext getAdmin()
          Returns context object for the top level Admin context.
 GxContext getCapabilities()
          Returns context object for the top level Capabilities context.
 GxContext getDevices()
          Returns context object for the top level Devices context.
 GxContext getDocuments()
          Returns context object for the top level Documents context.
 GxContext getEvents()
          Returns context object for the top level Events context.
 MeetingObject getMeeting(java.lang.String meeting)
          Returns a meeting object.
 GxContext getMultimedia()
          Returns context object for the top level Multimedia context.
 UserObject getUser(java.lang.String user)
          Returns user object in the Users repository of this root context.
 GxContext getUsers()
          Returns context object for the top level Users context.
 
Methods inherited from class org.gxos.gndi.context.GxContext
addNamespace, addObject, addToEnvironment, bind, bind, bind, bindMemory, close, composeName, composeName, constructRootContext, createContext, createSubcontext, createSubcontext, createSubcontext, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, destroySubcontextAll, destroySubcontextPhysically, destroySubcontextPhysically, enumerateChildren, getChild, getChildren, getEnvironment, getFSContext, getGxosName, getGxosObject, getName, getNameInNamespace, getNameInNamespace, getNameParser, getNameParser, getNamespace, getObject, getObject, getParameter, getParameters, getParent, getParentXMLObject, getPrefix, getURI, getXML, getXMLFile, init, link, link, list, list, listBindings, listBindings, lookup, lookup, lookup, lookup, lookupAll, lookupLink, lookupLink, lookupLink, rebind, rebind, rebind, relink, removeFromEnvironment, removeNamespace, removeObject, rename, rename, renameOld, report, setEnvironment, setGxosName, setGxosName, setParameter, translateName, unbind, unbind, unbindMemory, unbindObject, updateObject, updateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECYCLE

public static final java.lang.String RECYCLE

TOP

public static final java.lang.String TOP

ARCHIVE

public static final java.lang.String ARCHIVE
Constructor Detail

RootContext

public RootContext(java.lang.String root,
                   javax.naming.Context initial)
            throws javax.naming.NamingException
RootContext constructor.
Parameters:
root - Root name for context.
initial - Context returned by InitialContext function.
Throws:
javax.naming.NamingException -  
Method Detail

getCapabilities

public GxContext getCapabilities()
                          throws javax.naming.NamingException
Returns context object for the top level Capabilities context.
Returns:
Current context.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getAdmin

public GxContext getAdmin()
                   throws javax.naming.NamingException
Returns context object for the top level Admin context.
Returns:
Current context.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getDevices

public GxContext getDevices()
                     throws javax.naming.NamingException
Returns context object for the top level Devices context.
Returns:
GxContext for devices.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getDocuments

public GxContext getDocuments()
                       throws javax.naming.NamingException
Returns context object for the top level Documents context.
Returns:
GxContext for documents.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getEvents

public GxContext getEvents()
                    throws javax.naming.NamingException
Returns context object for the top level Events context.
Returns:
GxContext for devices.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getMultimedia

public GxContext getMultimedia()
                        throws javax.naming.NamingException
Returns context object for the top level Multimedia context.
Returns:
GxContext for devices.
Throws:
javax.naming.NamingException - if a naming error is encountered.

getUsers

public GxContext getUsers()
                   throws javax.naming.NamingException
Returns context object for the top level Users context.
Returns:
GxContext for devices.
Throws:
javax.naming.NamingException - if a naming error is encountered.

constructDevice

public void constructDevice(java.lang.String deviceAddr,
                            java.lang.String deviceType)
                     throws GxException
Adds a new device to repository.
Parameters:
deviceAddr - Device's IP name, i.e. foo.bar.com.
deviceType - Device type can be one of UNIX, Windows, Mac, or PDA.
Throws:
GxException -  
See Also:
Device, DeviceTypeType

constructDevice

public void constructDevice(java.lang.String deviceAddr,
                            DeviceTypeType type)
                     throws GxException
Adds a new device to repository.
Parameters:
deviceAddr - Device's IP name, i.e. foo.bar.com.
deviceType - Device type can be one of UNIX, WINDOWS, MAC, or PDA.
Throws:
GxException -  
See Also:
Device, DeviceTypeType

constructEvent

public void constructEvent()
                    throws GxException
Creates an empty event object under the current root, i.e. //University/Events/232123
Throws:
GxException -  
See Also:
Events

constructEvent

public void constructEvent(int seqno,
                           java.lang.String stream)
                    throws GxException
Creates an event object under the current root, i.e. //University/Events/232123 with given sequence number and stream.
Parameters:
seqno - Sequence number of the event
stream - Name of the stream this event belongs to.
Throws:
GxException -  
See Also:
Events

constructMegaMeeting

public void constructMegaMeeting(java.lang.String megaMeetingName)
                          throws GxException
Creates a megameeting under the current root, i.e. //University/Course1
Parameters:
megaMeetingName - Name of the mega meeting, i.e. Course1
Throws:
GxException -  
See Also:
Meetings, Collection

constructMeeting

public void constructMeeting(java.lang.String megaMeetingURL,
                             Meeting meeting)
                      throws GxException
Adds a meeting under a megameeting, i.e. //University/Course1/Lecture1
Parameters:
megaMeetingURL - GXOS name of the mega meeting this meeting will be added into.
meeting - meeting object that will be added into a parenting mega meeting.
Throws:
GxException -  
See Also:
Meetings, Collection

constructMeeting

public void constructMeeting(java.lang.String megaMeetingURL,
                             java.lang.String meetingName,
                             java.lang.String ownerID,
                             java.lang.String type)
                      throws GxException
Creates an empty meeting under a megameeting, i.e. //University/Course1/Lecture1
Parameters:
megaMeetingURL - GXOS name of the megameeting this meeting will be created under.
meetingName - name of the meeting.
ownerID - identification information of the host user of this meeting.
type - type of this meeting.
Throws:
GxException -  
See Also:
Meetings, Collection

getMeeting

public MeetingObject getMeeting(java.lang.String meeting)
Returns a meeting object.
Parameters:
meetingURI - meeting id must include megameetings as well.
Returns:
a meeting object if found; otherwise null.

constructUser

public void constructUser(UserObject user)
                   throws GxException
Adds a user object to the user repository.
Parameters:
user - new user
Throws:
GxException -  
See Also:
UserObject, Users

constructUser

public void constructUser(java.lang.String login,
                          java.lang.String password,
                          java.lang.String name,
                          java.lang.String pre,
                          java.lang.String suf,
                          java.lang.String email)
                   throws GxException
Creates a user object with given parameters, sets other values to defaults, and adds it to the current context.
Parameters:
login - login name of this user
password - password for this user
name - full name of this user, i.e. James J Smith, John Doe
pre - name prefixes for the name if any, i.e. Prof.
suf - name suffixes the name if any, i.e. Jr.
email - email address of this user
Throws:
GxException -  
See Also:
UserObject, Users

getUser

public UserObject getUser(java.lang.String user)
Returns user object in the Users repository of this root context.
Parameters:
user - user ID as String.
Returns:
a user object if found; otherwise null.