package edu.vt.marian.server; import edu.vt.marian.common.*; /** class name: user_message_table class description: this class contains all the showable message to end users, put all these messages together will ease the implementing of language independentability. uses the services of class(es): designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Ning Chai (nchai@csgrad.cs.vt.edu) finished time: Nov 30th, 1998 known bugs: JDK version: 1.1.5 side effects: */ public class user_message_table { public final static int OK = 0; private String dir; private String current_language; /** this is just used for debugging */ Debug debug; /** method description: this constructor will create a user message table object from the specified directory. uses the services of class(es): input parameter(s): dir -- this directory contains all the information about user message table table debug -- used for debugging output parameter(s): none return value: none sychronization: none */ public user_message_table(String dir, Debug debug) { this.debug = debug; if (dir == null) { debug.dumpTrace("Class:user_message_table Method:constructor Dir name is null or empty."); return; } this.dir = dir; return; } /** method description: this method will return the current language this object is using. uses the services of class(es): input parameter(s): none output parameter(s): none return value: the current language used as a string sychronization: none */ public String get_current_language() { return null; } /** method description: this method will set the language this object will use. uses the services of class(es): input parameter(s): language -- this will become the new language used by this object, that means the method get_message_by_id() will return a string in this language output parameter(s): none return value: OK -- the new language has been set correctly 1 -- the new language is not supported currently sychronization: none */ public int set_language(String language) { // this.debug = debug; return OK; } /** method description: this method will return the message in this table corresponds to the specified id uses the services of class(es): input parameter(s): message_id -- the id of the message in the table, each message has a uniq id in the table output parameter(s): none return value: A string -- the message identified by the id, the message is in the current language null -- no message was found with the specified id in the table sychronization: none */ public String get_message_by_id(int message_id) { return null; } /** method description: this method will add the specified message into the table the message is in the specified language, a uniq id will be returned which can be used later to retrive the language uses the services of class(es): input parameter(s): message -- the message user want to add to the table language -- this specifies the language of the message output parameter(s): none return value: positive integer -- the message has been added into the table correctly, this is the id of the message 1 -- duplicated message identified 2 -- the language is not supported currently sychronization: none */ public int add_message(String message, String language) { //return null; return OK; } /** method description: this method will save the content of this object to the specified directory uses the services of class(es): input parameter(s): dir -- all the information about this user message table object will be written to this directory output parameter(s): none return value: OK -- the information has been written to the directory correctly 1 -- error happened when writting the information sychronization: none */ public int save(String dir) { //return null; return OK; } /** method description: this method will save the content of this object to the directory from which it's created uses the services of class(es): session, session_table, session-manage input parameter(s): condition -- specify the condition under which this object exit, not used currently output parameter(s): none return value: OK -- the exit is smooth other -- sychronization: none */ public int exit(String condition) { return OK; } }