OSID Logo
OSID Specifications
forum package
Version 3.0.0
Release Candidate Preview
Interfaceosid.forum.ReplyAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Replies. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Reply, a ReplyForm is requested using getReplyFormForCreate() specifying the desired post and record Types or none if no record Types are needed. The returned ReplyForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the ReplyForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ReplyForm corresponds to an attempted transaction.

For updates, ReplyForms are requested to the Reply Id that is to be updated using getReplyFormForUpdate(). Similarly, the ReplyForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ReplyForm can only be used once for a successful update and cannot be reused.

The delete operations delete Replies. To unmap a Reply from the current Forum, the ReplyForumAssignmentSession should be used. These delete operations attempt to remove the Reply itself thus removing it from all known Forum catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetForumId
Description

Gets the Forum Id associated with this session.

Returnosid.id.Idthe Forum Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetForum
Description

Gets the Forum associated with this session.

Returnosid.forum.Forumthe forum
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateReplies
Description

Tests if this user can create hournal entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Reply will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returnboolean false if Reply creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateReplyWithRecordTypes
Description

Tests if this user can create a single Reply using the desired record types. While ForumManager.getReplyRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Reply. Providing an empty array tests if a Reply can be created with no records.

Parametersosid.type.Type[]replyRecordTypesarray of reply record types
Returnboolean true if Reply creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT replyRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetReplyFormForCreateToPost
Description

Gets the reply form for creating new replies to a post. A new form should be requested for each create transaction.

Parametersosid.id.IdpostIdthe Id for the post
osid.type.Type[]replyRecordTypesarray of reply record types
Returnosid.forum.ReplyFormthe reply form
ErrorsNOT_FOUND postId is not found
NULL_ARGUMENT postId or replyRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodgetReplyFormForCreateToReply
Description

Gets the reply form for creating new replies to another reply. A new form should be requested for each create transaction.

Parametersosid.id.IdreplyIdthe Id for the reply
osid.type.Type[]replyRecordTypesarray of reply record types
Returnosid.forum.ReplyFormthe reply form
ErrorsNOT_FOUND replyId is not found
NULL_ARGUMENT replyId or replyRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateReply
Description

Creates a new Reply.

Parametersosid.forum.ReplyFormreplyFormthe form for this Reply
Returnosid.forum.Replythe new Reply
ErrorsILLEGAL_STATE replyForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT replyForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED replyForm did not originate from getReplyFormForCreateToPost() or getReplyFormForCreateToReply()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateReplies
Description

Tests if this user can update replies. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Reply will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returnboolean false if Reply modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetReplyFormForUpdate
Description

Gets the reply form for updating an existing reply. A new reply form should be requested for each update transaction.

Parametersosid.id.IdreplyIdthe Id of the Reply
Returnosid.forum.ReplyFormthe reply form
ErrorsNOT_FOUND replyId is not found
NULL_ARGUMENT replyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateReply
Description

Updates an existing reply.

Parametersosid.forum.ReplyFormreplyFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE replyForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT replyForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED replyForm did not originate from getReplyFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteReplies
Description

Tests if this user can delete replies. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Reply will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returnboolean false if Reply deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteReply
Description

Deletes an Reply.

Parametersosid.id.IdreplyIdthe Id of the Reply to remove
ErrorsNOT_FOUND replyId not found
NULL_ARGUMENT replyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageReplyAliases
Description

Tests if this user can manage Id aliases for Comnents. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Reply aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasReply
Description

Adds an Id to a Reply for the purpose of creating compatibility. The primary Id of the Reply is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another reply, it is reassigned to the given reply Id.

Parametersosid.id.IdreplyIdthe Id of a Reply
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND replyId not found
NULL_ARGUMENT replyId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.