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

This session creates, updates, and deletes Forums. 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 Forum, a ForumForm is requested using getForumFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ForumForm 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 ForumForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ForumForm corresponds to an attempted transaction.

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

The delete operations delete Forums.

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

MethodcanCreateForums
Description

Tests if this user can create Forums. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Forum 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 Forum creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateForumWithRecordTypes
Description

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

Parametersosid.type.Type[]forumRecordTypesarray of forum record types
Returnboolean true if Forum creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT forumRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetForumFormForCreate
Description

Gets the forum form for creating new forums. A new form should be requested for each create transaction.

Parametersosid.type.Type[]forumRecordTypesarray of forum record types
Returnosid.forum.ForumFormthe forum form
ErrorsNULL_ARGUMENT forumRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateForum
Description

Creates a new Forum.

Parametersosid.forum.ForumFormforumFormthe form for this Forum
Returnosid.forum.Forumthe new Forum
ErrorsILLEGAL_STATE forumForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT forumForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED forumForm did not originate from getForumFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateForums
Description

Tests if this user can update Forums. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Forum 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 Forum modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetForumFormForUpdate
Description

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

Parametersosid.id.IdforumIdthe Id of the Forum
Returnosid.forum.ForumFormthe forum form
ErrorsNOT_FOUND forumId is not found
NULL_ARGUMENT forumId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateForum
Description

Updates an existing forum.

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

Tests if this user can delete Forums A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Forum 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 Forum deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteForum
Description

Deletes a Forum.

Parametersosid.id.IdforumIdthe Id of the Forum to remove
ErrorsNOT_FOUND forumId not found
NULL_ARGUMENT forumId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageForumAliases
Description

Tests if this user can manage Id aliases for Forums. 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 Forum aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasForum
Description

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

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