c408h003.omnieditor
Class User

java.lang.Object
  extended byc408h003.omnieditor.User

public class User
extends java.lang.Object


Constructor Summary
User(int userId)
          Constructs a User object with name and id.
 
Method Summary
 void addFile(java.lang.String name)
          Adds a file NAME to the list of the editing files of the user.
 java.lang.String[] getFiles()
          Get all filenames that the user's editing.
 int getId()
          Get the user's id number.
 int getVersionNumber(java.lang.String fileName)
          Get the version number of a specific file.
 boolean isFileInUse(java.lang.String fileName)
           
 void removeFile(java.lang.String name)
          Removes a file NAME from the list of the editing files of the user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User(int userId)
Constructs a User object with name and id.

Parameters:
userId - id number of the user
Method Detail

addFile

public void addFile(java.lang.String name)
Adds a file NAME to the list of the editing files of the user.

Parameters:
name - the file NAME

removeFile

public void removeFile(java.lang.String name)
Removes a file NAME from the list of the editing files of the user

Parameters:
name - the file NAME number

getId

public int getId()
Get the user's id number.

Returns:
id number as an integer

getFiles

public java.lang.String[] getFiles()
Get all filenames that the user's editing.

Returns:
a string array of file names

getVersionNumber

public int getVersionNumber(java.lang.String fileName)
Get the version number of a specific file.

Parameters:
fileName - the name the file which version wanted
Returns:
an integer of the file's version number

isFileInUse

public boolean isFileInUse(java.lang.String fileName)