com.kpro.ui
Class UserIO

java.lang.Object
  extended by com.kpro.ui.UserIO
Direct Known Subclasses:
PrivacyAdvisorGUI, UserIO_Simple

public abstract class UserIO
extends java.lang.Object

The UserIO provides an abstract model of all the methods a user interface method must implement. There are five essential portions: construction of the user interface if necessary, via the object constructor; user reconfiguration (of the same options found in configuration file or on the commandline); the ability to display the database and all loaded policies; user revision, in which the suggested solution is provided to the user so the user can accept or reject it; and shutdown/deconstruction of any resources needed for the interface.


Constructor Summary
UserIO()
           
 
Method Summary
abstract  void closeResources()
          closes all resources used by UserIO - windows, files, streams, etc
abstract  java.util.ArrayList<PolicyObject> loadHistory()
          Deprecated.  
abstract  void showDatabase(PolicyDatabase pdb)
          display the contents of the database
abstract  void user_init(java.util.Properties genProps)
          returns a modified Properties to use init on.
abstract  PolicyObject userResponse(PolicyObject n)
          Displays recommended action for policyObject, and returns used accept verion- same thing if no change, or altered if user disagrees.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserIO

public UserIO()
Method Detail

user_init

public abstract void user_init(java.util.Properties genProps)
returns a modified Properties to use init on.

Parameters:
genProps - the default values for all commandline arguments

showDatabase

public abstract void showDatabase(PolicyDatabase pdb)
display the contents of the database

Parameters:
pdb - the database to display

loadHistory

public abstract java.util.ArrayList<PolicyObject> loadHistory()
Deprecated. 

gets any policies not already provided for the history

Returns:
an arraylist of policy objects to be added to history prior to the CBR run.

userResponse

public abstract PolicyObject userResponse(PolicyObject n)
Displays recommended action for policyObject, and returns used accept verion- same thing if no change, or altered if user disagrees.

Parameters:
n - the policy display
Returns:
the policy given

closeResources

public abstract void closeResources()
closes all resources used by UserIO - windows, files, streams, etc