org.kuali.student.common.ui.client.service
Interface CommentRpcService

All Superinterfaces:
BaseRpcService, com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
CommentRpcGwtServlet

@RemoteServiceRelativePath(value="rpcservices/CommentRpcService")
public interface CommentRpcService
extends BaseRpcService


Method Summary
 CommentInfo addComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo)
          Adds a comment to a reference.
 List<CommentInfo> getComments(String referenceId, String referenceTypeKey)
          Retrieves comment information for a reference.
 List<CommentInfo> getCommentsByType(String referenceId, String referenceTypeKey, String commentTypeKey)
          Retrieves comment information for a reference of a particular type.
 List<CommentTypeInfo> getCommentTypesForReferenceType(String referenceTypeKey)
          Gets the comment types for a particular reference type.
 String getUserRealName(String userId)
          user IdentityService to get user name
 Boolean isAuthorizedAddComment(String id, String referenceTypeKey)
          Check for authorization to add a comment
 StatusInfo removeComment(String commentId, String referenceId, String referenceTypeKey)
          Removes a comment.
 CommentInfo updateComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo)
          Updates a comment for a reference.
 
Methods inherited from interface org.kuali.student.common.ui.client.service.BaseRpcService
getObjectStructure, getObjectTypes, getSearchCriteriaType, getSearchCriteriaTypes, getSearchResultType, getSearchResultTypes, getSearchType, getSearchTypes, getSearchTypesByCriteria, getSearchTypesByResult, search
 

Method Detail

addComment

CommentInfo addComment(String referenceId,
                       String referenceTypeKey,
                       CommentInfo commentInfo)
                       throws Exception
Adds a comment to a reference.

Parameters:
referenceId - identifier of reference
referenceTypeKey - reference type
commentInfo - detailed information about the comment
Returns:
detailed information about the comment
Throws:
Exception

getComments

List<CommentInfo> getComments(String referenceId,
                              String referenceTypeKey)
                              throws Exception
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.

Parameters:
referenceId - reference identifier
referenceTypeKey - reference type
Returns:
list of comment information
Throws:
Exception

getCommentsByType

List<CommentInfo> getCommentsByType(String referenceId,
                                    String referenceTypeKey,
                                    String commentTypeKey)
                                    throws Exception
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.

Parameters:
referenceId - reference identifier
referenceTypeKey - reference type
commentTypeKey - comment type
Returns:
list of comment information
Throws:
Exception

updateComment

CommentInfo updateComment(String referenceId,
                          String referenceTypeKey,
                          CommentInfo commentInfo)
                          throws Exception
Updates a comment for a reference.

Parameters:
referenceId - identifier of reference
referenceTypeKey - reference type
commentInfo - detailed information about the comment
Returns:
detailed information about the comment
Throws:
Exception

removeComment

StatusInfo removeComment(String commentId,
                         String referenceId,
                         String referenceTypeKey)
                         throws Exception
Removes a comment.

Parameters:
commentId - id of comment to be removed
referenceId - identifier of reference
referenceTypeKey - reference type
Throws:
Exception

getCommentTypesForReferenceType

List<CommentTypeInfo> getCommentTypesForReferenceType(String referenceTypeKey)
                                                      throws Exception
Gets the comment types for a particular reference type.

Parameters:
referenceTypeKey - reference type
Throws:
Exception

isAuthorizedAddComment

Boolean isAuthorizedAddComment(String id,
                               String referenceTypeKey)
Check for authorization to add a comment

Parameters:
id - identifier of the object
referenceTypeKey - reference type of the object

getUserRealName

String getUserRealName(String userId)
user IdentityService to get user name

Parameters:
userId -


Copyright © 2010 The Kuali Foundation. All rights reserved.