|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Connection Inteface between Server and Client
Category: Baseline
Inherits from: Client:
Method Summary | |
int |
Authenticate(java.lang.String UserName,
java.lang.String Password)
Authenticates the user into the File Server database. |
int |
ChangeFilePermissions(int FileId,
int ReadPermission,
int WritePermission,
int ExecutePermission)
Change the permissions of the given file. |
int |
ChangePassword(java.lang.String UserName,
java.lang.String OldPassword,
java.lang.String NewPassword)
Allows the User to change his/her password. |
int |
CreateFile(java.lang.String FileName,
int ParentDirId)
Creates a new file for the user in the sub directory selected. |
int |
DeleteFile(int FileId)
Delete the given file. |
list |
FindFile(java.lang.String FileName,
int StartDirId)
Change find the path of the given file. |
FileList |
GetSubTree(int UserId,
int ParentId)
Get the list of files and directories in the given directory. |
int |
RenameFile(int FileId,
java.lang.String NewFileName)
Change the name of the given file. |
Method Detail |
public int Authenticate(java.lang.String UserName, java.lang.String Password)
UserName
- Name of the userPassword
- Password of the user trying to login
InvalidUserName
- if the UserName does not exist
InvalidPassword
- if Password is not valid
DBException
- if there is a database exceptionpublic int ChangePassword(java.lang.String UserName, java.lang.String OldPassword, java.lang.String NewPassword)
UserName
- The name name of the user who is trying to change passwordOldPassword
- The old password of the userNewPassword
- The new password of the user
InvalidPassword
- if the OldPassword is not valid
NewPasswordTooShort
- if NewPassword is less than 6 characterspublic FileList GetSubTree(int UserId, int ParentId)
UserId
- The Id of the user requesting the directory listingParentId
- The Id of the Folder whose children are desired
InvalidUserId
- if the UserId is not valid
InvalidParentId
- if the ParentId is not valid
InsufficientPriviledges
- if UserId does not have the priviledges in the directorypublic int RenameFile(int FileId, java.lang.String NewFileName)
FileId
- The Id of the file to be renamedNewFileName
- The new name of the file
InvalidFileId
- if the FileId is not valid
InvalidFileName
- if the NewFileName is not valid (Blank etc.)
FileLocked
- if the file is currently locked by some other user
InsufficientPriviledges
- if UserId does not have the priviledges on the filepublic int ChangeFilePermissions(int FileId, int ReadPermission, int WritePermission, int ExecutePermission)
FileId
- The Id of the file whose permisions are to be changedReadPermission
- The read permissionsWritePermission
- The write permissionsExecutePermission
- The execute permissions
InvalidFileId
- if the FileId is not valid
FileLocked
- if the file is currently locked by some other user
InsufficientPriviledges
- if UserId does not have the priviledges on the filepublic list FindFile(java.lang.String FileName, int StartDirId)
FileName
- The name of the file to be searchedStartDirId
- Id of the directory where the search is to started
InvalidFileId
- if the FileId is not valid
FileLocked
- if the file is currently locked by some other user
InvalidStartDirId
- if StartDirId is invalid
InsufficientPriviledges
- if UserId does not have the priviledges on the StartDirId public int DeleteFile(int FileId)
FileId
- The Id of the file to be deleted
InvalidFileId
- if the FileId is not valid
FileLocked
- if the file is currently locked by some other user
InsufficientPriviledges
- if UserId does not have the priviledges on the filepublic int CreateFile(java.lang.String FileName, int ParentDirId)
FileName
- The name of the file to be created
InvalidFileName
- if the FileName is not valid (some invalid character)
FileExists
- if the file already exists in the directory
InsufficientPriviledges
- if UserId does not have the priviledges in the given directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |