| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CommentRpcServiceAsync |
|
| 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.core.comments.ui.client.service; | |
| 17 | ||
| 18 | import java.util.List; | |
| 19 | ||
| 20 | import org.kuali.student.common.dto.StatusInfo; | |
| 21 | import org.kuali.student.common.ui.client.service.BaseRpcServiceAsync; | |
| 22 | import org.kuali.student.core.comment.dto.CommentInfo; | |
| 23 | import org.kuali.student.core.comment.dto.CommentTypeInfo; | |
| 24 | ||
| 25 | import com.google.gwt.user.client.rpc.AsyncCallback; | |
| 26 | ||
| 27 | public interface CommentRpcServiceAsync extends BaseRpcServiceAsync { | |
| 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 | * @param detailed information about the comment | |
| 34 | * @throws Exception | |
| 35 | */ | |
| 36 | public void addComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo, AsyncCallback<CommentInfo> callback) 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 | * @param list of comment information | |
| 42 | * @throws Exception | |
| 43 | */ | |
| 44 | public void getComments(String referenceId, String referenceTypeKey, AsyncCallback<List<CommentInfo>> callback) 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 | * @param list of comment information | |
| 51 | * @throws Exception | |
| 52 | */ | |
| 53 | public void getCommentsByType(String referenceId, String referenceTypeKey, String commentTypeKey, AsyncCallback<List<CommentInfo>> callback) 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 | * @param detailed information about the comment | |
| 61 | * @throws Exception | |
| 62 | */ | |
| 63 | public void updateComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo, AsyncCallback<CommentInfo> callback) 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 void removeComment(String commentId, String referenceId, String referenceTypeKey, AsyncCallback<StatusInfo> callback) throws Exception; | |
| 72 | ||
| 73 | /** | |
| 74 | * Gets the comment types for a particular reference type. | |
| 75 | * @param referenceTypeKey reference type | |
| 76 | */ | |
| 77 | public void getCommentTypesForReferenceType(String referenceTypeKey, AsyncCallback<List<CommentTypeInfo>> callback) throws Exception; | |
| 78 | ||
| 79 | /** | |
| 80 | * Check for authorization to add a comment | |
| 81 | * @param id identifier of the object related to the reference type key | |
| 82 | * @param referenceTypeKey reference type key of the object the comment is being set on | |
| 83 | */ | |
| 84 | public void isAuthorizedAddComment(String id, String referenceTypeKey, AsyncCallback<Boolean> callback); | |
| 85 | ||
| 86 | /** | |
| 87 | * user IdentityService to get user name | |
| 88 | * @param userId | |
| 89 | * @param callback | |
| 90 | */ | |
| 91 | public void getUserRealName(String userId, AsyncCallback<String> callback); | |
| 92 | } |