IAccessHandler.cs

00001 using System;
00002 using System.Collections.Generic;
00003 
00007 namespace Shared
00008 {
00012     public interface IAccessHandler
00013     {
00014         // Person
00015         PersonInfo GetPersonInfo(string username);
00016         Messages Login(string user, string password);
00017         Messages Register(string user, string password, string name, string department, string email);
00018         string WhoAmI { get; }
00019         Messages UpdatePerson(PersonInfo info);
00020 
00021         // Literature
00022         LiteratureInfo[] ListLiterature();
00023         LiteratureInfo GetLiteratureInfo(int id);
00024         Messages CreateLiterature(out int id, LiteratureInfo info);
00025         Messages UpdateLiterature(LiteratureInfo info);
00026         Messages DeleteLiterature(int id);
00027 
00028         // Roles
00029         RoleInfo[] GetRoles(int id);
00030         ProjectInfo[] GetUsersProjects(string username);
00031         Messages AssignUser(string username, int project, RoleType role);
00032         Messages UnassignUser(string username, int project);
00033 
00034         // References
00035         ReferenceInfo[] ListReferences(int project);
00036         ReferenceInfo GetReferenceInfo(int project, int literature);
00037         Messages CreateReference(ReferenceInfo ri);
00038         Messages UpdateReference(ReferenceInfo ri);
00039         Messages DeleteReference(int project, int literature);
00040 
00041         // Review
00042         ReviewInfo[] ListReviews(int project);
00043         ReviewInfo GetReviewInfo(int project, int literature);
00044         Messages CreateReview(ReviewInfo ri);
00045         Messages UpdateReview(ReviewInfo ri);
00046 
00047         // Suggestion
00048         SuggestionInfo[] ListSuggestions(int project);
00049         SuggestionInfo GetSuggestionInfo(int project, int literature);
00050         Messages CreateSuggestion(SuggestionInfo si);
00051         Messages UpdateSuggestion(SuggestionInfo si);
00052 
00053         // Projects
00054         ProjectInfo[] ListProjects();
00055         ProjectInfo GetProjectInfo(int id);
00056         Messages CreateProject(ProjectInfo pi, out int id);
00057         Messages UpdateProject(ProjectInfo info);
00058         Messages DeleteProject(int id);
00059 
00060         // Tags
00061         TagInfo[] GetAllTags();
00062         TagInfo[] GetTags(string tag, int id, string username);
00063         Messages AddTag(string tag, int id);
00064         Messages RemoveTag(string tag, int id);
00065 
00066         // Search
00067         List<SearchResult> Search(string query);
00068         List<SearchResult> Search(string query, ResultType searchTypes);
00069         ISearchable[] ListItems(ResultType type);
00070         ISearchable[] ListItems(ResultType type, string creator);
00071         List<SearchResult> SearchByTag(string tag);
00072         List<SearchResult> ShowRelated(int id);
00073 
00074         // Comment
00075         CommentInfo[] GetComments(int literatureID);
00076         CommentInfo[] GetComments(int literatureID, int projectID);
00077         Messages CreateComment(CommentInfo ci, out int id);
00078     
00079         // Statistics
00080         StatisticsInfo GetStatistics();
00081     
00082     }
00083 }

Generated on Thu Dec 21 06:21:56 2006 for SCRAML by  doxygen 1.5.1-p1