edu.vt.marian.WebGate
Class preference

java.lang.Object
  |
  +--edu.vt.marian.WebGate.preference

public class preference
extends java.lang.Object

Class name: preference Class description: this class represent the preferences of this user, there may be many preferences in the future, the design of this class make it easy to add new preferences. Author: Jianxin Zhao Finished time: ????, 1998 Known bugs: none Platform: jdk1.1.5 under UNIX


Constructor Summary
preference(java.io.BufferedReader br, edu.vt.marian.common.Debug debug)
          this constructor will create a preference object from the specified directory
preference(java.io.DataInputStream dis, edu.vt.marian.common.Debug debug)
          this constructor will create a preference object from a stream, this might be helpful for remote manage in the future.
preference(edu.vt.marian.common.Debug debug)
          this constructor will create a preference object, the object is empty upon creation
preference(java.lang.String dir, edu.vt.marian.common.Debug debug)
          this constructor will create a preference object from the specified directory
 
Method Summary
 java.lang.String add(java.lang.String name, java.lang.String value)
          this method will add the preference with the specified value to this object
 java.lang.String delete(java.lang.String name)
          this method will delete the specified preference
 java.util.Vector get_names()
          this method will return all the preference names currently in this object
 java.lang.String get_value(java.lang.String name)
          this method will return the value of the specified preference
 java.lang.String save(java.io.PrintWriter pw)
          this method will save the content of this object to the specified directory
 java.lang.String save(java.lang.String dir)
          this method will save the content of this object to the specified directory
 java.lang.String set(java.lang.String name, java.lang.String value)
          this method will set the specified preference to the specified value
 java.lang.String to_stream(java.io.DataOutputStream dos)
          this method will print the content of this object to the stream, this might be helpful for remote management in the future.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

preference

public preference(edu.vt.marian.common.Debug debug)
this constructor will create a preference object, the object is empty upon creation

preference

public preference(java.lang.String dir,
                  edu.vt.marian.common.Debug debug)
this constructor will create a preference object from the specified directory

preference

public preference(java.io.BufferedReader br,
                  edu.vt.marian.common.Debug debug)
this constructor will create a preference object from the specified directory

preference

public preference(java.io.DataInputStream dis,
                  edu.vt.marian.common.Debug debug)
this constructor will create a preference object from a stream, this might be helpful for remote manage in the future. (not implemented yet)
Method Detail

get_value

public java.lang.String get_value(java.lang.String name)
this method will return the value of the specified preference

get_names

public java.util.Vector get_names()
this method will return all the preference names currently in this object

add

public java.lang.String add(java.lang.String name,
                            java.lang.String value)
this method will add the preference with the specified value to this object

set

public java.lang.String set(java.lang.String name,
                            java.lang.String value)
this method will set the specified preference to the specified value

delete

public java.lang.String delete(java.lang.String name)
this method will delete the specified preference

to_stream

public java.lang.String to_stream(java.io.DataOutputStream dos)
this method will print the content of this object to the stream, this might be helpful for remote management in the future. (not implemented yet)

save

public java.lang.String save(java.lang.String dir)
this method will save the content of this object to the specified directory

save

public java.lang.String save(java.io.PrintWriter pw)
this method will save the content of this object to the specified directory