MAIL BOX SYSTEM (Pure JDBC Solution ) Table of Content 1.0 User Specification and Requirement Document2.0 A Brief Description of Mail Box3.0 Design of Mailbox System4.0 A Brief Description of the First Tier4.01 Forms4.02 Main Applet Screens4.03 Info Dialog5.0 A Brief Description of the Middle Tier6.0 A Brief Description of the Third Tier6.01 Referential Integrity7.0 Error Checking
1.0 User specification and Requirement Document
At the outset, the mail message system awaits the input of a extension. Some extensions belong to active extensions, others do not. We will see below how active extensions are created. If an inactive extension has been dialed, an error message is generated, and the system reverts to its initial state. If an active extension has been reached, the mailbox greeting is played. Unless changed by the owner, the greeting is You have reached extension xxxx. Please leave a message now. At this point, the caller can type in a message, by entering the message text from the keyboard To restrict access to the owner of the mailbox, the system prompts for a passcode. After the mailbox owner has entered the correct passcode, it is possible to retrieve messages from the mailbox, or to change mailbox settings. The user options menu is displayed: Retrieve your messages. Change your greeting. Change your passcode. There is an Restriction access to the Owner of the mailbox. Once the system authenticate the user, the user has full right to change its password, greeting and review messages. To review message there is a new message list and an old message list. You can interchanges the messages between the old and the new message list. Administrator has got all the privilege to add mailboxes, delete mailboxes and change the password for the mailbox. The administrator access is being protected by the passcode.
2.0 A Brief Description of Mail Box Mail Box is based on Three Tier Client Server Architecture. The first tier is Graphical User Interface written in java, the middle Tier is dbANYWHERE Server and the third tier is the database. All Data is stored and retrieve from the database. Mail Box is using the JDBC classes of dbANYWHERE to connect, retrieve, stores and modify the database. When the applet is downloaded from the server, In it init Process it ask dbANYWHERE Server to get the connection to the database. Once the connection is established it uses different types of SQL statement to retrieve results set from different tables and display it to the user. As soon as applet is downloaded an authentication form came up in which you can login as the Administrator or Login as the User or Leave an Message for an extension. Every thing is password protected. If user want to Login then he/she has to enter its login id and password and press OK button. This data is validated from the database, if it is a valid data then an other form Open as a User Profile. Now user can review its messages (Delete or Save messages), change its password and change its Greeting. In case user want to leave a message for an active extension then he/she has to entered the mailbox id and Press OK. If the mail box does not exist it will give an error message other wise a new form (LEAVE MESSAGE ) will come with the extension greeting and now the user can entered the message through keyboard and press OK button. All this data is save into the database. The new message saved by the user can be retrieved by the mailbox owner in his/her review form. If administrator want to login, then he has to enter his password. If this password is a not a valid password then he /she will get an error message otherwise a new Form for the administrator (ADMINISTRATOR FORM) is open. Administrator can add a new extension, delete an extension or change password of the mailbox. In case of deleting and modifying the user password, if the mailbox box does not exist it will give error message. In case of adding new extension, if the extension already exist it will give an error message. Deletion of mailbox is cascading delete. If you delete the mail box, the corresponding old and new message will be automatically deleted. If you add new mail box then an automatic greeting ("You have reached an Extension XXX ,please leave an Message") is added to that mailbox database where XXX is Extension ID.
3.0 Design of the Mailbox System
Mailbox system is virtually three Tier System. The first tier is using Java and dbANYWHERE custom classes, middle tier is using dbANYWHERE server to connect to the third tier which is the database. This application is an Applet so you can download from anywhere and get connected to the database.
First Tier the first tier is the custom Java and dbANYWHERE classes. Java classes is basically the used for developing Graphical User Interface. The dbANYWHERE classes is used to connect dbANYWHERE sever to the database and helps in doing various operations on the database. Second Tier The second tier is the dbANYWHERE server which process the request coming from the client machine. dbANYWHERE Server listen to the port 8889. The request coming from the Applet is proceed to the database and result in from of result set is sent back to the applet by the dbANYWHERE Server. Third Tier The Tier tier is the database. This database is presently running on the same machine but we can configure it on the other machine.
4.0 A Brief Description of First Tier (GUI in Java) Different Forms used in GUI There are basically four forms (Dialog classes) ,one Applet and one error Info Dialog Box used to built the GUI
INFO Dialog(In this we pass three parameter to built this Dialog box i.e. Frame, Error Message, Heading)
Administrator Form SCREEN SHOT of ADMINISTRATOR FORM It provides the basic functionality of the mailbox administrator such adding mailboxes, deleting mailboxes, changing the mailbox box password. There is error checking for various operation such as deleting the mailbox which does not exit, adding the mail box which already exit, leaving the fields blanks, changing the password of the user which does not exist etc.
Review Message Form This form is used to review the messages. It consists of two lists(java classes) one showing new and other showing old messages. You can shift the new messages to the old message and old message to the new one. In order to increase the efficiency of the application all database transactions are done at the commit button. There is no database transaction when you are moving the messages or deleting the messages, It is all happening in the Vector classes at the client site. Once you say commit then this Vector is saved in the database. SCREEN SHOT OF REVIEW FORM
Leave message Form This form is used to leave message for an extension. It display the greeting for that extension when it pops up .User can enter the message in the text area and Press ADD button to save the message in the database. SCREEN SHOT OF LEAVE MESSAGE
SCREEN SHOT OF APPLET This is the main Screen in the form of Applet. Once applet is downloaded it will get connected to the database through dbANYWHERE Server. It provides the functionality of the login screen such as Login as an Administrator ,login as a user and leave an message for an extension. This is used to display the message/error message. It has three parameter
SCHEEN SHOT OF THE INFO DIALOG
5.0 A Brief Description of the Midde Tier(dbANYWHERE Server) The second tier is the dbANYWHERE server which process the request coming from the client machine. dbANYWHERE Sever listen to the port 8889. The request coming from the Applet is proceed to the database and result in from of result set is sent back to the applet by the dbANYWHERE Server.
Few Points about dbANYWHERE Server
6.0 A Brief Description of the Third Tier (Database)
Database MailBox Tables t_mailbox t_newmessage t_oldmessage
Tables Description
Primary Key : MailBoxID FIELDNAME TYPE SIZE field1 : MailBoxID text 5 field2 : MailboxPassword text 5 field3 : MailboxGreeting text 100 t_mailbox
Primary Key : NewMessageID Foreign Key : MailBoxID FIELDNAME TYPE SIZE field1 : NewMessageID Integer AutoGenerated field2 : MailBoxID text 5 field3 : Message text 100
t_newmessage
Primary Key : OldMessageID Foreign Key : MailBoxID FIELDNAME TYPE SIZE field1 : OldMessageID Integer AutoGenerated field2 : MailBoxID text 5 field3 : Message text 100 t_oldmessage
|