Class UI

java.lang.Object
  extended by UI

public class UI
extends java.lang.Object

UI class handles most of the user interaction (input/output).


Field Summary
private  DocumentList list
          maintains a reference to the DocumentList object for convenience.
 
Constructor Summary
UI(DocumentList list)
          Constructor accepts a reference to the DocumentList.
 
Method Summary
 int getChoice()
          Primary method that prompts for a selection from the user and returns the selection.
 java.lang.String getPattern()
          Method called if selection is 3.
 UploadInfo getUploadInfo()
          Method called if selection is 4.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private DocumentList list
maintains a reference to the DocumentList object for convenience.

Constructor Detail

UI

public UI(DocumentList list)
Constructor accepts a reference to the DocumentList.

Parameters:
list -
Method Detail

getChoice

public int getChoice()
Primary method that prompts for a selection from the user and returns the selection. Verify that the selection is between 1 and 5.

Returns:

getPattern

public java.lang.String getPattern()
Method called if selection is 3. Prompt for a pattern and return the pattern to the caller.

Returns:

getUploadInfo

public UploadInfo getUploadInfo()
Method called if selection is 4. Prompt for a username and password. Next, display only txt files and prompt for numerical ID of selected file. Create and return an UploadInfo object.

Returns: