| Interface | osid.commenting.CommentAdminSession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Description | 
                 This session creates, updates, and deletes   Create and update operations differ in their usage. To 
                create a   For updates,   The delete operations delete   This session includes an   | ||
| Method | getBookId | ||
| Description | 
                     Gets the   | ||
| Return | osid.id.Id | the  Book Id  associated with this session  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getBook | ||
| Description | 
                     Gets the   | ||
| Return | osid.commenting.Book | the book | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canCreateComments | ||
| Description | 
                     Tests if this user can create comments. A return of 
                    true does not guarantee successful authorization. A return 
                    of false indicates that it is known creating a   | ||
| Return | boolean |  false  if  Comment  creation is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | canCreateCommentWithRecordTypes | ||
| Description | 
                     Tests if this user can create a single   | ||
| Parameters | osid.type.Type[] | commentRecordTypes | array of comment record types | 
| Return | boolean |  true  if  Comment  creation using the specified 
record  Types  is supported,  false  otherwise  | |
| Errors | NULL_ARGUMENT |  commentRecordTypes  is  null   |                 |
| Compliance | mandatory | This method must be implemented. | |
| Method | getCommentFormForCreate | ||
| Description | 
                     Gets the comment form for creating new comments. A new form should be requested for each create transaction.  | ||
| Parameters | osid.id.Id | referenceId | the  Id  for the reference object  | 
osid.type.Type[] | commentRecordTypes | array of comment record types | |
| Return | osid.commenting.CommentForm | the comment form | |
| Errors | NULL_ARGUMENT |  referenceId or commentRecordTypes  is  null   |                 |
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| UNSUPPORTED | unable to get form for requested record types | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | createComment | ||
| Description | 
                     Creates a new   | ||
| Parameters | osid.commenting.CommentForm | commentForm | the form for this  Comment   | 
| Return | osid.commenting.Comment | the new  Comment   | |
| Errors | ILLEGAL_STATE |  commentForm  already used in a create transaction  |                 |
| INVALID_ARGUMENT | one or more of the form elements is invalid | ||
| NULL_ARGUMENT |  commentForm  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| UNSUPPORTED |  commentForm  did not originate from  
getCommentFormForCreate()   |                 ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canUpdateComments | ||
| Description | 
                     Tests if this user can update comments. A return of 
                    true does not guarantee successful authorization. A return 
                    of false indicates that it is known updating a   | ||
| Return | boolean |  false  if  Comment  modification is not 
authorized,  true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getCommentFormForUpdate | ||
| Description | 
                     Gets the comment form for updating an existing comment. A new comment form should be requested for each update transaction.  | ||
| Parameters | osid.id.Id | commentId | the  Id  of the  Comment   | 
| Return | osid.commenting.CommentForm | the comment form | |
| Errors | NOT_FOUND |  commentId  is not found  |                 |
| NULL_ARGUMENT |  commentId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | updateComment | ||
| Description | 
                     Updates an existing comment.  | ||
| Parameters | osid.commenting.CommentForm | commentForm | the form containing the elements to be updated | 
| Errors | ILLEGAL_STATE |  commentForm  already used in an update transaction  |                 |
| INVALID_ARGUMENT | the form contains an invalid value | ||
| NULL_ARGUMENT |  commentForm  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| UNSUPPORTED |  commentForm  did not originate from  
getCommentFormForUpdate()   |                 ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canDeleteComments | ||
| Description | 
                     Tests if this user can delete comments. A return of 
                    true does not guarantee successful authorization. A return 
                    of false indicates that it is known deleting an   | ||
| Return | boolean |  false  if  Comment  deletion is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | deleteComment | ||
| Description | 
                     Deletes a   | ||
| Parameters | osid.id.Id | commentId | the  Id  of the  Comment  to remove  | 
| Errors | NOT_FOUND |  commentId  not found  |                 |
| NULL_ARGUMENT |  commentId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canManageCommentAliases | ||
| Description | 
                     Tests if this user can manage   | ||
| Return | boolean |  false  if  Comment  aliasing is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | aliasComment | ||
| Description | 
                     Adds an   | ||
| Parameters | osid.id.Id | commentId | the  Id  of a  Comment   | 
osid.id.Id | aliasId | the alias  Id   | |
| Errors | ALREADY_EXISTS |  aliasId  is already assigned  |                 |
| NOT_FOUND |  commentId  not found  |                 ||
| NULL_ARGUMENT |  commentId  or  aliasId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |