Conrol Application for CIV Collaborative System

Requirements and Design

Tomasz Jurga

09/07/96
v. 1.0



Table of contents:

0. Introduction

1. Control Application in the whole system

2. Control Application requirements

2.1. Purpose of Control Application

2.2. Algorithm of operation

2.3. Loading of Java classes

2.4. Structure of the program

2.5. Functions of Control Application

3. Communication: Conrol Application - Local Demon




0. Introduction


This document describes the Control Application for CIV Collaborative System. This application provides each authorized user with a graphical interface to the system and allows him to control other applications according to the kind of privileges he possesses. In general it allows the user to log into the system, to launch other applications like GIS, Chat, Whiteboard remotely or locally and to start and manage sessions of the same applications running on different hosts. The rights to perform each of the functions depend only on the user privileges and the type of the application that she/he wants to use.


1. Control Application in the whole system


Conrol Application is an Java applet loaded from HTTP server to each host being a part of the whole system. A special program called Applet Viewer is used to run the applet. Applet Viewer has one very important feature on the contrary to Netscape browser: it allows Control Application to communicate with Local Demon directly without using Applet Demon as an interface. This simplifies and speeds up the procedure of exchanging messages CA - LD. For a graphical presentation of the place of CA in the system see:CIV Collaboration System Specification par. 4.2.






2. Control Application requirements



2.1. Purpose of the Control Application


The main purpose of the Conrol Application is to provide a user with a graphical interface to the system. In this way each user can control other applications being parts of the system. In general Control Application allows the user to:

- log into the system (the user privileges are verified in the database during this process)
- log out of the system
- launch applications locally
- launch applications remotely
- close local or remote applications
- change parameters of already running applications (switching between Master and Slave mode)
- create a session of the same type of applications
- display all virtual connections user has rights to see
- connect to existing sessions

The particular set of functions each user is provided with depends on his privileges and the type of each application. There are 4 kinds of user privileges for each application:

1. PRIV_1 - Launching particular application in single user mode (creating a session).

In this mode user can use application without any collaboration with other participants. It is possible however for other participant with sufficient rights to launch another application of the same type and connect to the user to monitor his activities.

2. PRIV_2 - Joining the session.

This property allows User to connect local version of the application to an existing session.

3. PRIV_3 - Launching an application on another computer.

This property allows to launch application on a remote computer with another Participant. The remote application joins the session. The local application runs in master mode.

4. PRIV_4 - Using application in master mode.

When applications runs in master-slave mode (see CIV Collaboration System Specification par. 4.6) this property allows to dynamically switch to become the master of the session.

The detailed specification of functions that are available for each kind of privileges and each kind of application will be presented later in this document.


2.2. Algorithm of operation


The algorithm of operation of Control Application is following:

START

1. CA is launched.

2. CA displays "Login Window" with login and password prompts.

3. The user data are sent to LD which forwards them to CS. CS verifies the user privileges in DB

4. CA receives a message with the user privileges.

5. If the user is not authorized: CA displays "login incorrect" and goes to 2.

6. If the user is authorized:

7. Login prompt window is destroyed.

8. CA displays a "Control Window". Class loader loads from HTTP server one class for each application that can be launched (see 2.3.)

9. Now the user can control all availables functions provided by each application (this will be discussed later in par. 2.5.).

10. When the user press "Exit" button - CA stops.

STOP

2.3. Loading of Java classes



For each CIV system application one appropriate class, according to the user privileges, must be loaded from HTTP server. It is done when an instantiation of the class is created in the program.
In order to choose only one class a special class name is given using Java class Class expression:

Object 'appl_name' = Class.forName(" 'appl_name'_'privileges' ").newInstance();

where:

'appl_name'   stands for  CIV system application name, e.g. GIS, Chat, etc.
'privileges'     stands for  User privileges in the following format (see 2.1.):
                                           PRIV_1 PRIV_2 PRIV_3 PRIV_4
                                             1/0         1/0        1/0          1/0
                                           1- means user has this privilege, 0- doesn't have it.
  
e.g. GIS_1101 which means: form GIS application the user has PRIV_1, PRIV_2, PRIV_4.

At that moment the Class Loader knows that it must load certain stream of bytes and create an object. It notifies a CGI script that is installed on HTTP server and handles it this special class name. CGI script chooses the proper class, i.e. a class whose name equals the special name, Then it simply sends back to CA the class, i.e. the stream of bytes. Thanks to that, the process of choosing an appropriate class is transparent for CA. It gets what it needs, i.e. a class that refers to the user privileges, and doesn't bother about the others.



2.4. Structure of the program


In this paragraph the outline of primary classes creating CA will be described.




NAME

public Control_Application extends Applet or CApplet ?

DESCRIPTION

This is main class of the application. It launches first "Login Window" and then "Control Window". It also sends (hashed?) data - password and login name - to LD and collects the message concerning user privileges.




NAME

Login_Window extends Frame implements Runnable

DESCRIPTION

This class is responsible for all operations connected with logging into the CIV system. It displays a frame called "Login Window" with login and password prompts. There are methods reading data from standard input and returning user login name and password to the main class. It should also be able to display an info about user authorization (User authorized, User not authorized).






NAME

Control_Window extends Frame implements Runnable

DESCRIPTION

This class is initialized after user has been authorized. It displays a frame called "Control Window" which contains all graphic components that create the main graphical user interface for CIV system. There will be following components:

- Panel Main_Menu containing:

1. Button "Exit"

2. Menu "Applications" containing the names of the applications whose Control Platform may be displayed within Main_Panel.


- Panel Main_Panel containing:

1.  Panel Control_Platform which is in fact a CIV application class loaded via CGI script.
It contains all components , e.g. Buttons, Choices, necessary to control given application (see 2.5. for detailed list of all components for each application). Each application Panel is a separate thread thus one can switch to the other thread and suspend the others.When an  application is chosen for the first time from the menu "Applications", an appropriate class is loaded from HTTP   server (see 2.3).

2.  TextField Appl_active displaying whose application Control_Platform is active at the moment.


- TextArea Commentary containing all messages concerning CIV system applications.





2.5. Functions of Control Application


Here the particular set of functions and corresponding interface components will be described for each mode of operation. Modes correspond to user privileges. It will be also available to see which application can work in each mode.


1. Launching local application

Necessary privileges :
- PRIV_1


Available for:
- GIS
- Search system


Functions:
- Open application - component: Button("OPEN").
- Close application - component: Button("CLOSE").
Also available: a list of existing local applications of the same type - components:
Button("List") displays List "Existing Local Applications".


2. Joining existing session

Necessary privileges :
- PRIV_1


Available for:
- GIS
- Chat
- Whiteboard
- Videoconferencing
- Visible Human?


Functions:
- Join a session with new application or existing application:
- Quit a session
   Components:
   1. MenuBar("Join Session", "Quit Session")
   1.1. Menu "Join Session" contains MenuItems: "Join Session with new application" and "Join    session with existing application". Also available: List or Choice "Existing Sessions" and List or    Choice "Existing Applications".
   


3. Launching remote applications


Necessary privileges :
- PRIV_2
- PRIV_3
- PRIV_4

Available for:
- GIS
- Chat
- Whiteboard
- Videoconferencing
- Visible Human?


Functions:
- Open application remotely - component: Button("OPEN REMOTE").
- Close application remotely - component: Button("CLOSE REMOTE").
also available:
List or Choice "Remote Hosts running" to choose a remote host.


4. Switching to Master mode

Necessary privileges :
- PRIV_2
- PRIV_4

Available for:
- GIS
- Chat
- Whiteboard
- Videoconferencing
- Visible Human?


Functions:
- Switch to master mode - component: Button("SWITCH to MASTER").
- Switch to slave mode - component: Button("SWITCH to SLAVE").
Only one of these buttons is enabled at a moment. User must also choose a session from:
     List or Choice "Existing Sessions".

Attention: What about rights to play recorded sessions from database? Any special right?
What mean of notifying the DB to play?




3. Communication Control Application-Local Demon


Konrad's working on it.