OSID Logo
OSID Specifications
room construction package
Version 3.1.0
Interfaceosid.room.construction.ProjectAdminSession
Implementsosid.OsidSession
Implemented Byosid.room.construction.batch.ProjectBatchAdminSession
Used Byosid.room.construction.RoomConstructionManager
osid.room.construction.RoomConstructionProxyManager
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.Id the Campus Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetCampus
Description

Gets the Campus associated with this session.

Returnosid.room.Campus the campus
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodcanCreateProjectWithRecordTypes
Description

Tests if this user can create a single Project using the desired record 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[]projectRecordTypes array of project record types
Returnboolean true if Project creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT projectRecordTypes is null
Compliancemandatory This 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.IdbuildingId the Id of the building
osid.type.Type[]projectRecordTypes array of project record types
Returnosid.room.construction.ProjectForm the project form
ErrorsNOT_FOUND buildngId is not found
NULL_ARGUMENT buildngId or projectRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get from for requested record types
Compliancemandatory This method must be implemented.
MethodcreateProject
Description

Creates a new Project.

Parametersosid.room.construction.ProjectFormprojectForm the form for this Project
Returnosid.room.construction.Project the new Project
ErrorsILLEGAL_STATE projectForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT projectForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED projectForm did not originate from getProjectFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdprojectId the Id of the Project
Returnosid.room.construction.ProjectForm the project form
ErrorsNOT_FOUND projectId is not found
NULL_ARGUMENT projectId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateProject
Description

Updates an existing project.

Parametersosid.room.construction.ProjectFormprojectForm the form containing the elements to be updated
ErrorsILLEGAL_STATE projectForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT projectForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED projectForm did not originate from getProjectFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteProject
Description

Deletes a Project.

Parametersosid.id.IdprojectId the Id of the Project to remove
ErrorsNOT_FOUND projectId not found
NULL_ARGUMENT projectId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdprojectId the Id of a Project
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND projectId not found
NULL_ARGUMENT projectId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.