Server.Net.RMIAccessHandler Class Reference

This class contains an implemention of an AccessHandler. In this case it is used for Remote Method Invocation. The objective of the AccessHandler is to handle the communication between the client and the catalogue. It inherits from the class MarshalByRefObject which enables the class to be accessed via network. It also inherits from the IAccessHandler interface which defines the public methods in the Catalogue class. More...

Inheritance diagram for Server.Net.RMIAccessHandler:

Inheritance graph
[legend]
Collaboration diagram for Server.Net.RMIAccessHandler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RMIAccessHandler (Catalogue catalogue)
 Constructs a new instance of RMIAccessHandler.
ProjectInfo GetProjectInfo (int id)
 Calls the corresponding method on the catalogue.
ProjectInfo[] ListProjects ()
 Calls the corresponding method on the catalogue.
Messages CreateProject (ProjectInfo pi, out int id)
 Calls the corresponding method on the catalogue.
Messages UpdateProject (ProjectInfo info)
 Calls the corresponding method on the catalogue.
Messages DeleteProject (int id)
 Check if the user if creator or moderator. If yes call the corresponding method on the catalogue.
ProjectInfo[] GetUsersProjects (string username)
 Calls the corresponding method on the catalogue.
LiteratureInfo[] ListLiterature ()
 Calls the corresponding method on the catalogue.
LiteratureInfo GetLiteratureInfo (int id)
 Calls the corresponding method on the catalogue.
Messages CreateLiterature (out int id, LiteratureInfo info)
 Calls the corresponding method on the catalogue and sets the creator of the project to current user.
Messages UpdateLiterature (LiteratureInfo info)
 Calls the corresponding method on the catalogue.
Messages DeleteLiterature (int id)
 Checks if the user if moderator or creator of the literature. Then calls the corresponding method on the catalogue.
ReferenceInfo[] ListReferences (int project)
 Calls the corresponding method on the catalogue.
ReferenceInfo GetReferenceInfo (int project, int literature)
 Calls the corresponding method on the catalogue.
Messages CreateReference (ReferenceInfo ri)
 Calls the corresponding method on the catalogue.
Messages UpdateReference (ReferenceInfo ri)
 Calls the corresponding method on the catalogue.
Messages DeleteReference (int project, int literature)
 Check if the user is a member of the project and not a supervisor. Then call the corresponding method on the catalogue.
List< SearchResultSearch (string query)
 Calls the corresponding method on the catalogue.
List< SearchResultSearch (string query, ResultType searchTypes)
 Calls the corresponding method on the catalogue.
List< SearchResultSearchByTag (string tag)
 Calls the corresponding method on the catalogue.
ISearchable[] ListItems (ResultType type)
 Calls the corresponding method on the catalogue.
ISearchable[] ListItems (ResultType type, string creator)
 Calls the corresponding method on the catalogue.
SuggestionInfo[] ListSuggestions (int project)
 Calls the corresponding method on the catalogue.
SuggestionInfo GetSuggestionInfo (int project, int literature)
 Calls the corresponding method on the catalogue.
Messages CreateSuggestion (SuggestionInfo si)
 Calls the corresponding method on the catalogue.
Messages UpdateSuggestion (SuggestionInfo si)
 Calls the corresponding method on the catalogue.
ReviewInfo GetReviewInfo (int project, int literature)
 Calls the corresponding method on the catalogue.
ReviewInfo[] ListReviews (int project)
 Calls the corresponding method on the catalogue.
Messages CreateReview (ReviewInfo ri)
 Check if the user is not a supervisor. Then call the corresponding method on the catalogue.
Messages UpdateReview (ReviewInfo ri)
 Calls the corresponding method on the catalogue.
TagInfo[] GetAllTags ()
 Call the GetTag method on the catalogue with empty parameters. Which means it returns all tags.
TagInfo[] GetTags (string tag, int id, string username)
 Calls the corresponding method on the catalogue.
Messages AddTag (string tag, int id)
 Calls the corresponding method on the catalogue.
Messages RemoveTag (string tag, int id)
 Calls the corresponding method on the catalogue.
PersonInfo GetPersonInfo (string username)
 Calls the corresponding method on the catalogue.
Messages Register (string user, string password, string name, string department, string email)
 Calls the corresponding method on the catalogue.
Messages Login (string user, string password)
 First make a check if the password is correct. If yes call the corresponding method on the catalogue.
Messages UpdatePerson (PersonInfo pi)
 Check if the person trying to make a change actually is same person. If yes call the corresponding method on the catalogue.
RoleInfo[] GetRoles (int id)
 Calls the corresponding method on the catalogue.
Messages AssignUser (string username, int project, RoleType role)
 Check if the person trying to add a user is the creator of the project. If yes calls the corresponding method on the catalogue.
Messages UnassignUser (string username, int project)
 Chech if the person trying to remove a user is the creator of the project. If yes call the corresponding method on the catalogue.
CommentInfo[] GetComments (int literatureID, int projectID)
 Calls the corresponding method on the catalogue.
CommentInfo[] GetComments (int literatureID)
 Calls the corresponding method on the catalogue.
Messages CreateComment (CommentInfo ci, out int id)
 Calls the corresponding method on the catalogue.
StatisticsInfo GetStatistics ()
 Calls the corresponding method on the catalogue.
List< SearchResultShowRelated (int id)
 Calls the corresponding method on the catalogue.

Properties

string WhoAmI [get]
 A property which returns the username of the user of the accessHandler.

Private Attributes

Person user = null
Catalogue catalogue

Detailed Description

This class contains an implemention of an AccessHandler. In this case it is used for Remote Method Invocation. The objective of the AccessHandler is to handle the communication between the client and the catalogue. It inherits from the class MarshalByRefObject which enables the class to be accessed via network. It also inherits from the IAccessHandler interface which defines the public methods in the Catalogue class.

Definition at line 17 of file RMIAccessHandler.cs.


Constructor & Destructor Documentation

Server.Net.RMIAccessHandler.RMIAccessHandler ( Catalogue  catalogue  ) 

Constructs a new instance of RMIAccessHandler.

Parameters:
catalogue The instance of Catalogue to communicate with.

Definition at line 28 of file RMIAccessHandler.cs.


Member Function Documentation

ProjectInfo Server.Net.RMIAccessHandler.GetProjectInfo ( int  id  ) 

Calls the corresponding method on the catalogue.

Parameters:
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 53 of file RMIAccessHandler.cs.

ProjectInfo [] Server.Net.RMIAccessHandler.ListProjects (  ) 

Calls the corresponding method on the catalogue.

Returns:

Implements Shared.IAccessHandler.

Definition at line 64 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateProject ( ProjectInfo  pi,
out int  id 
)

Calls the corresponding method on the catalogue.

Parameters:
pi 
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 77 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.UpdateProject ( ProjectInfo  info  ) 

Calls the corresponding method on the catalogue.

Parameters:
info 
Returns:

Implements Shared.IAccessHandler.

Definition at line 90 of file RMIAccessHandler.cs.

References Server.Project.GetPerson(), and Shared.ProjectInfo.id.

Here is the call graph for this function:

Messages Server.Net.RMIAccessHandler.DeleteProject ( int  id  ) 

Check if the user if creator or moderator. If yes call the corresponding method on the catalogue.

Parameters:
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 110 of file RMIAccessHandler.cs.

References Server.Project.GetPerson(), Server.Role.Person, and Server.Role.Type.

Here is the call graph for this function:

ProjectInfo [] Server.Net.RMIAccessHandler.GetUsersProjects ( string  username  ) 

Calls the corresponding method on the catalogue.

Parameters:
username 
Returns:

Implements Shared.IAccessHandler.

Definition at line 134 of file RMIAccessHandler.cs.

LiteratureInfo [] Server.Net.RMIAccessHandler.ListLiterature (  ) 

Calls the corresponding method on the catalogue.

Returns:

Implements Shared.IAccessHandler.

Definition at line 146 of file RMIAccessHandler.cs.

LiteratureInfo Server.Net.RMIAccessHandler.GetLiteratureInfo ( int  id  ) 

Calls the corresponding method on the catalogue.

Parameters:
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 158 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateLiterature ( out int  id,
LiteratureInfo  info 
)

Calls the corresponding method on the catalogue and sets the creator of the project to current user.

Parameters:
id 
info 
Returns:

Implements Shared.IAccessHandler.

Definition at line 173 of file RMIAccessHandler.cs.

References Shared.LiteratureInfo.creator.

Messages Server.Net.RMIAccessHandler.UpdateLiterature ( LiteratureInfo  info  ) 

Calls the corresponding method on the catalogue.

Parameters:
info 
Returns:

Implements Shared.IAccessHandler.

Definition at line 188 of file RMIAccessHandler.cs.

References Shared.LiteratureInfo.creator, and Shared.LiteratureInfo.id.

Messages Server.Net.RMIAccessHandler.DeleteLiterature ( int  id  ) 

Checks if the user if moderator or creator of the literature. Then calls the corresponding method on the catalogue.

Parameters:
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 205 of file RMIAccessHandler.cs.

References Shared.LiteratureInfo.creator.

ReferenceInfo [] Server.Net.RMIAccessHandler.ListReferences ( int  project  ) 

Calls the corresponding method on the catalogue.

Parameters:
project 
Returns:

Implements Shared.IAccessHandler.

Definition at line 228 of file RMIAccessHandler.cs.

ReferenceInfo Server.Net.RMIAccessHandler.GetReferenceInfo ( int  project,
int  literature 
)

Calls the corresponding method on the catalogue.

Parameters:
project 
literature 
Returns:

Implements Shared.IAccessHandler.

Definition at line 241 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateReference ( ReferenceInfo  ri  ) 

Calls the corresponding method on the catalogue.

Parameters:
ri 
Returns:

Implements Shared.IAccessHandler.

Definition at line 253 of file RMIAccessHandler.cs.

References Shared.ReferenceInfo.project, and Server.Role.Type.

Messages Server.Net.RMIAccessHandler.UpdateReference ( ReferenceInfo  ri  ) 

Calls the corresponding method on the catalogue.

Parameters:
ri 
Returns:

Implements Shared.IAccessHandler.

Definition at line 269 of file RMIAccessHandler.cs.

References Shared.ReferenceInfo.project, and Server.Role.Type.

Messages Server.Net.RMIAccessHandler.DeleteReference ( int  project,
int  literature 
)

Check if the user is a member of the project and not a supervisor. Then call the corresponding method on the catalogue.

Parameters:
project 
literature 
Returns:

Implements Shared.IAccessHandler.

Definition at line 287 of file RMIAccessHandler.cs.

References Server.Role.Type.

List<SearchResult> Server.Net.RMIAccessHandler.Search ( string  query  ) 

Calls the corresponding method on the catalogue.

Parameters:
query 
Returns:

Implements Shared.IAccessHandler.

Definition at line 308 of file RMIAccessHandler.cs.

List<SearchResult> Server.Net.RMIAccessHandler.Search ( string  query,
ResultType  searchTypes 
)

Calls the corresponding method on the catalogue.

Parameters:
query 
searchTypes 
Returns:

Implements Shared.IAccessHandler.

Definition at line 321 of file RMIAccessHandler.cs.

List<SearchResult> Server.Net.RMIAccessHandler.SearchByTag ( string  tag  ) 

Calls the corresponding method on the catalogue.

Parameters:
tag 
Returns:

Implements Shared.IAccessHandler.

Definition at line 333 of file RMIAccessHandler.cs.

ISearchable [] Server.Net.RMIAccessHandler.ListItems ( ResultType  type  ) 

Calls the corresponding method on the catalogue.

Parameters:
type 
Returns:

Implements Shared.IAccessHandler.

Definition at line 345 of file RMIAccessHandler.cs.

ISearchable [] Server.Net.RMIAccessHandler.ListItems ( ResultType  type,
string  creator 
)

Calls the corresponding method on the catalogue.

Parameters:
type 
Returns:

Implements Shared.IAccessHandler.

Definition at line 357 of file RMIAccessHandler.cs.

SuggestionInfo [] Server.Net.RMIAccessHandler.ListSuggestions ( int  project  ) 

Calls the corresponding method on the catalogue.

Parameters:
project 
Returns:

Implements Shared.IAccessHandler.

Definition at line 376 of file RMIAccessHandler.cs.

SuggestionInfo Server.Net.RMIAccessHandler.GetSuggestionInfo ( int  project,
int  literature 
)

Calls the corresponding method on the catalogue.

Parameters:
project 
literature 
Returns:

Implements Shared.IAccessHandler.

Definition at line 389 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateSuggestion ( SuggestionInfo  si  ) 

Calls the corresponding method on the catalogue.

Parameters:
si 
Returns:

Implements Shared.IAccessHandler.

Definition at line 401 of file RMIAccessHandler.cs.

References Shared.SuggestionInfo.project, and Server.Role.Type.

Messages Server.Net.RMIAccessHandler.UpdateSuggestion ( SuggestionInfo  si  ) 

Calls the corresponding method on the catalogue.

Parameters:
si 
Returns:

Implements Shared.IAccessHandler.

Definition at line 417 of file RMIAccessHandler.cs.

References Shared.SuggestionInfo.project.

ReviewInfo Server.Net.RMIAccessHandler.GetReviewInfo ( int  project,
int  literature 
)

Calls the corresponding method on the catalogue.

Parameters:
project 
literature 
Returns:

Implements Shared.IAccessHandler.

Definition at line 440 of file RMIAccessHandler.cs.

ReviewInfo [] Server.Net.RMIAccessHandler.ListReviews ( int  project  ) 

Calls the corresponding method on the catalogue.

Parameters:
project 
Returns:

Implements Shared.IAccessHandler.

Definition at line 452 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateReview ( ReviewInfo  ri  ) 

Check if the user is not a supervisor. Then call the corresponding method on the catalogue.

Parameters:
ri 
Returns:

Implements Shared.IAccessHandler.

Definition at line 464 of file RMIAccessHandler.cs.

References Shared.ReviewInfo.person, Shared.ReviewInfo.project, and Server.Role.Type.

Messages Server.Net.RMIAccessHandler.UpdateReview ( ReviewInfo  ri  ) 

Calls the corresponding method on the catalogue.

Parameters:
ri 
Returns:

Implements Shared.IAccessHandler.

Definition at line 481 of file RMIAccessHandler.cs.

References Shared.ReviewInfo.project, and Server.Role.Type.

TagInfo [] Server.Net.RMIAccessHandler.GetAllTags (  ) 

Call the GetTag method on the catalogue with empty parameters. Which means it returns all tags.

Returns:

Implements Shared.IAccessHandler.

Definition at line 503 of file RMIAccessHandler.cs.

TagInfo [] Server.Net.RMIAccessHandler.GetTags ( string  tag,
int  id,
string  username 
)

Calls the corresponding method on the catalogue.

Parameters:
tag 
id 
username 
Returns:

Implements Shared.IAccessHandler.

Definition at line 514 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.AddTag ( string  tag,
int  id 
)

Calls the corresponding method on the catalogue.

Parameters:
tag 
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 527 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.RemoveTag ( string  tag,
int  id 
)

Calls the corresponding method on the catalogue.

Parameters:
tag 
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 542 of file RMIAccessHandler.cs.

PersonInfo Server.Net.RMIAccessHandler.GetPersonInfo ( string  username  ) 

Calls the corresponding method on the catalogue.

Parameters:
username 
Returns:

Implements Shared.IAccessHandler.

Definition at line 562 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.Register ( string  user,
string  password,
string  name,
string  department,
string  email 
)

Calls the corresponding method on the catalogue.

Parameters:
user 
password 
name 
department 
email 
Returns:

Implements Shared.IAccessHandler.

Definition at line 577 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.Login ( string  user,
string  password 
)

First make a check if the password is correct. If yes call the corresponding method on the catalogue.

Parameters:
user 
password 
Returns:

Implements Shared.IAccessHandler.

Definition at line 587 of file RMIAccessHandler.cs.

References Server.Person.Password.

Messages Server.Net.RMIAccessHandler.UpdatePerson ( PersonInfo  pi  ) 

Check if the person trying to make a change actually is same person. If yes call the corresponding method on the catalogue.

Parameters:
pi 
Returns:

Implements Shared.IAccessHandler.

Definition at line 607 of file RMIAccessHandler.cs.

References Shared.PersonInfo.username.

RoleInfo [] Server.Net.RMIAccessHandler.GetRoles ( int  id  ) 

Calls the corresponding method on the catalogue.

Parameters:
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 624 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.AssignUser ( string  username,
int  project,
RoleType  role 
)

Check if the person trying to add a user is the creator of the project. If yes calls the corresponding method on the catalogue.

Parameters:
username 
project 
role 
Returns:

Implements Shared.IAccessHandler.

Definition at line 639 of file RMIAccessHandler.cs.

References Server.Project.GetPerson(), and Server.Role.Type.

Here is the call graph for this function:

Messages Server.Net.RMIAccessHandler.UnassignUser ( string  username,
int  project 
)

Chech if the person trying to remove a user is the creator of the project. If yes call the corresponding method on the catalogue.

Parameters:
username 
project 
Returns:

Implements Shared.IAccessHandler.

Definition at line 663 of file RMIAccessHandler.cs.

References Server.Project.GetPerson(), Server.Project.Roles, and Server.Role.Type.

Here is the call graph for this function:

CommentInfo [] Server.Net.RMIAccessHandler.GetComments ( int  literatureID,
int  projectID 
)

Calls the corresponding method on the catalogue.

Parameters:
literatureID 
projectID 
Returns:

Implements Shared.IAccessHandler.

Definition at line 695 of file RMIAccessHandler.cs.

CommentInfo [] Server.Net.RMIAccessHandler.GetComments ( int  literatureID  ) 

Calls the corresponding method on the catalogue.

Parameters:
literatureID 
Returns:

Implements Shared.IAccessHandler.

Definition at line 704 of file RMIAccessHandler.cs.

Messages Server.Net.RMIAccessHandler.CreateComment ( CommentInfo  ci,
out int  id 
)

Calls the corresponding method on the catalogue.

Parameters:
ci 
id 
Returns:

Implements Shared.IAccessHandler.

Definition at line 714 of file RMIAccessHandler.cs.

StatisticsInfo Server.Net.RMIAccessHandler.GetStatistics (  ) 

Calls the corresponding method on the catalogue.

Returns:

Implements Shared.IAccessHandler.

Definition at line 725 of file RMIAccessHandler.cs.

List<SearchResult> Server.Net.RMIAccessHandler.ShowRelated ( int  id  ) 

Calls the corresponding method on the catalogue.

Returns:

Implements Shared.IAccessHandler.

Definition at line 736 of file RMIAccessHandler.cs.


Property Documentation

string Server.Net.RMIAccessHandler.WhoAmI [get]

A property which returns the username of the user of the accessHandler.

Implements Shared.IAccessHandler.

Definition at line 36 of file RMIAccessHandler.cs.


The documentation for this class was generated from the following file:
Generated on Thu Dec 21 06:25:25 2006 for SCRAML by  doxygen 1.5.1-p1