This document describes the implementation and use of the ICEBERG Universal Preference Configurator GUI. This frontend was named preference manager in ICEBERG-v0.
The iUPC resides in the iceberg1/prefcfg directory with dependencies only on the iceberg1/pref files. The input from the frontend GUI is processed and then sent to the backend.
Setting up the iUPC
Compile all the java files in the iceberg1/prefcfg directory.
Make sure a proper configuration file is specified in prefcfg.cfg. This file is parsed by the Configuration class. Here's a sample:
[PrefRegServer] demo6.iceberg [Phases] When receive an incoming call=yourUID1,callingTime0,location0 Your device has picked up the call=callerID1,calleeID1, callingTime0 Device Unavailable=callerID1,calleeID1, callingTime0,devsTried0 [Handlers] CA_IWaitForPRReply_LoadReq_hdlr CA_WaitForDevResp_DevPickedUp_hdlr CA_WaitForDevResp_DevUnavail_hdlr [Primitives] Invite,InviteEndPoint SendMsg,SendMsg
An example configuration file, with explanatory comments is prefcfg.cfg.
The PrefRegServer is where your preference registry server lies. The phases are customizable and are in the format <name=parameter1,parameter2>. The binary digit next to each parameter represent whether the iUPC should ask the user for a uniqID when setting up the preferences. So for callerID, a uniqID is needed thus a 1 bit is set. Otherwise, for callingTime a uniqID is not needed, so the 0 bit is set.
Running the iUPC
The GUI is run as:
Configuration files are stored as Java Object files with the username followed by ".obj". So my object file would be "tsohn.obj". This object file is made from the Pref class.
Using the iUPC
The iUPC begins at the login screen. If a previous .obj file is not found in the directory where the iUPC was run, a new .obj file will be made upon login.
Upon login the main window from which all actions stem is shown. New users may use the wizard to develop their endpoints, parameters, and rules. Advanced users may do each simply by clicking on the respective buttons for the options to personalize.
Note: Check will check the call phase handlers, and Upload will upload your preferences to the backend.
We will show a simple example of setting up a rule through the rule wizard. The first part of the wizard is to setup appropriate endpoints.
After setting up your endpoints, the next step is to select the appropriate phase for which you would like to setup a rule for. In this case we have selected the phase "Your device has picked up the call." Each phase refers to an underlying state in the backend state machine.
For each phase a particular set of parameters is listed, read from the prefcfg.cfg file. At least one of these parameters must be categorized in order for a rule to be setup.
Here is a sample category setup from clicking on the categorize button for the parameter callerID.
After setting up the categories, you must choose which parameters to use in constructing the rule. At least one parameter must be checked. Since I setup callerID and calleeID, I checked both of those boxes.
From the checked parameter, the iUPC will show all the customizable options of a rule. Within each parameter there is an OR relationship, and between different parameters is an AND relationship. So for callerID, if either friends or not family is satisfied AND school in calleeID is satisfied, then the action SendMsg will be taken on the device ericsson t21
The Current Rules button will provide a window listing the current active rules that have been set. Add will add the rule, new rule will take you back to the phase part of the wizard so you can customize a new rule, Done will leave the wizard and save your preferences, Cancel will simply exit the wizard without saving.
ActivityPanel.java - dialog box that lists current set activities
ActivitySetup.java - used in setting up activities
AddDevice.java - deprecated, replaced by DeviceProperties
Callback.java - displays a string in a JFrame (used by backend pref registry)
Categories.java - setup group and members for preferences
CategorizePanel.java - panel used to display categories
CategorySetup.java - deprecated, replaced by Categories class
CheckFrame.java - takes text from the registry and displays it in a JDialog
Choices.java - main window which leads to other areas in the iUPC
Configuration.java - reads the configuration information from the prefcfg.cfg file
DeviceProperties.java - used to add a new device (endpoint)
Devices.java - lists currently set devices
InvalidLoginException - exception thrown upon invalid login attempt
Login.java - login window, has main method to start the iUPC
MissingPasswordException.java - excpetion thrown for missing password
PhaseSetup.java - used to setup a particular phases' categories and rules
PreferenceChoice.java - selection screen to select a phase to configure
PropertyDevice.java - deprecated, replaced by DeviceProperties
RulePanel.java - displays currently setup rules
RuleWizard.java - wizard to setup phases,endpoints, and rules for the iUPC