Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CommentRpcService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | */ | |
15 | ||
16 | package org.kuali.student.common.ui.client.service; | |
17 | ||
18 | import java.util.List; | |
19 | ||
20 | import org.kuali.student.core.comment.dto.CommentInfo; | |
21 | import org.kuali.student.core.comment.dto.CommentTypeInfo; | |
22 | import org.kuali.student.core.dto.StatusInfo; | |
23 | ||
24 | import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; | |
25 | ||
26 | @RemoteServiceRelativePath("rpcservices/CommentRpcService") | |
27 | public interface CommentRpcService extends BaseRpcService { | |
28 | /** | |
29 | * Adds a comment to a reference. | |
30 | * @param referenceId identifier of reference | |
31 | * @param referenceTypeKey reference type | |
32 | * @param commentInfo detailed information about the comment | |
33 | * @return detailed information about the comment | |
34 | * @throws Exception | |
35 | */ | |
36 | public CommentInfo addComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo) throws Exception; | |
37 | /** | |
38 | * Retrieves comment information for a reference. The expected behavior is that if the caller is not authorized to invoke the getComments operation, a PERMISSION_DENIED error is returned. Assuming that the caller is authorized to invoke getComments, only comments that the caller is authorized to view are included in the returned commentInfoList; comments that the caller is unauthorized to view are filtered out of the return parameter. | |
39 | * @param referenceId reference identifier | |
40 | * @param referenceTypeKey reference type | |
41 | * @return list of comment information | |
42 | * @throws Exception | |
43 | */ | |
44 | public List<CommentInfo> getComments(String referenceId, String referenceTypeKey) throws Exception; | |
45 | /** | |
46 | * Retrieves comment information for a reference of a particular type. The expected behavior is that if the caller is not authorized to invoke the getCommentsByType operation, a PERMISSION_DENIED error is returned. Assuming that the caller is authorized to invoke getCommentsByType, only comments that the caller is authorized to view are included in the returned commentInfoList; comments that the caller is unauthorized to view are filtered out of the return parameter. | |
47 | * @param referenceId reference identifier | |
48 | * @param referenceTypeKey reference type | |
49 | * @param commentTypeKey comment type | |
50 | * @return list of comment information | |
51 | * @throws Exception | |
52 | */ | |
53 | public List<CommentInfo> getCommentsByType(String referenceId, String referenceTypeKey, String commentTypeKey) throws Exception; | |
54 | ||
55 | /** | |
56 | * Updates a comment for a reference. | |
57 | * @param referenceId identifier of reference | |
58 | * @param referenceTypeKey reference type | |
59 | * @param commentInfo detailed information about the comment | |
60 | * @return detailed information about the comment | |
61 | * @throws Exception | |
62 | */ | |
63 | public CommentInfo updateComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo) throws Exception; | |
64 | ||
65 | /** | |
66 | * Removes a comment. | |
67 | * @param commentId id of comment to be removed | |
68 | * @param referenceId identifier of reference | |
69 | * @param referenceTypeKey reference type | |
70 | */ | |
71 | public StatusInfo removeComment(String commentId, String referenceId, String referenceTypeKey) throws Exception; | |
72 | ||
73 | /** | |
74 | * Gets the comment types for a particular reference type. | |
75 | * @param referenceTypeKey reference type | |
76 | */ | |
77 | public List<CommentTypeInfo> getCommentTypesForReferenceType(String referenceTypeKey) throws Exception; | |
78 | ||
79 | /** | |
80 | * Check for authorization to add a comment | |
81 | * @param id identifier of the object | |
82 | * @param referenceTypeKey reference type of the object | |
83 | */ | |
84 | public Boolean isAuthorizedAddComment(String id, String referenceTypeKey); | |
85 | ||
86 | /** | |
87 | * user IdentityService to get user name | |
88 | * @param userId | |
89 | */ | |
90 | public String getUserRealName(String userId); | |
91 | } |