OSID Logo
OSID Specifications
room construction package
Version 3.0.0
Release Candidate Preview
Interfaceosid.room.construction.ProjectAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Projects. To unmap a Project from the current Campus, the ProjectCampusAssignmentSession should be used. These delete operations attempt to remove the Project itself thus removing it from all known Campus catalogs.

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

MethodgetCampusId
Description

Gets the Campus Id associated with this session.

Returnosid.id.Idthe Campus Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCampus
Description

Gets the Campus associated with this session.

Returnosid.room.Campusthe campus
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateProjects
Description

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

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

Parametersosid.type.Type[]projectRecordTypesarray of project record types
Returnboolean true if Project creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT projectRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProjectFormForCreate
Description

Gets the project form for creating new projects. A new form should be requested for each create transaction.

Parametersosid.id.IdbuildingIdthe Id of the building
osid.type.Type[]projectRecordTypesarray of project record types
Returnosid.room.construction.ProjectFormthe project form
ErrorsNOT_FOUND buildngId is not found
NULL_ARGUMENT buildngId or projectRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get from for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProject
Description

Creates a new Project.

Parametersosid.room.construction.ProjectFormprojectFormthe form for this Project
Returnosid.room.construction.Projectthe new Project
ErrorsILLEGAL_STATE projectForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT projectForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED projectForm did not originate from getProjectFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProjects
Description

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

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

Parametersosid.id.IdprojectIdthe Id of the Project
Returnosid.room.construction.ProjectFormthe project form
ErrorsNOT_FOUND projectId is not found
NULL_ARGUMENT projectId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProject
Description

Updates an existing project.

Parametersosid.room.construction.ProjectFormprojectFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE projectForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT projectForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED projectForm did not originate from getProjectFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteProjects
Description

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

Deletes a Project.

Parametersosid.id.IdprojectIdthe Id of the Project to remove
ErrorsNOT_FOUND projectId not found
NULL_ARGUMENT projectId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProjectAliases
Description

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

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

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