| Interface | osid.course.program.ProgramAdminSession | ||
|---|---|---|---|
| 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 | getCourseCatalogId | ||
| Description | 
                     Gets the   | ||
| Return | osid.id.Id | the  CourseCatalog Id  associated with this session  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getCourseCatalog | ||
| Description | 
                     Gets the   | ||
| Return | osid.course.CourseCatalog | the course catalog | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canCreatePrograms | ||
| Description | 
                     Tests if this user can create   | ||
| Return | boolean |  false  if  Program  creation is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | canCreateProgramWithRecordTypes | ||
| Description | 
                     Tests if this user can create a single   | ||
| Parameters | osid.type.Type[] | programRecordTypes | array of program record types | 
| Return | boolean |  true  if  Program  creation using the specified 
record  Types  is supported,  false  otherwise  | |
| Errors | NULL_ARGUMENT |  programRecordTypes  is  null   |                 |
| Compliance | mandatory | This method must be implemented. | |
| Method | getProgramFormForCreate | ||
| Description | 
                     Gets the program form for creating new programs. A new form should be requested for each create transaction.  | ||
| Parameters | osid.type.Type[] | programRecordTypes | array of program record types | 
| Return | osid.course.program.ProgramForm | the program form | |
| Errors | NULL_ARGUMENT |  programRecordTypes  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 | createProgram | ||
| Description | 
                     Creates a new   | ||
| Parameters | osid.course.program.ProgramForm | programForm | the form for this  Program   | 
| Return | osid.course.program.Program | the new  Program   | |
| Errors | ILLEGAL_STATE |  programForm  already used in a create transaction  |                 |
| INVALID_ARGUMENT | one or more of the form elements is invalid | ||
| NULL_ARGUMENT |  programForm  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| UNSUPPORTED |  programForm  did not originate from  
getProgramFormForCreate()   |                 ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canUpdatePrograms | ||
| Description | 
                     Tests if this user can update   | ||
| Return | boolean |  false  if  Program  modification is not 
authorized,  true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getProgramFormForUpdate | ||
| Description | 
                     Gets the program form for updating an existing course. A new program form should be requested for each update transaction.  | ||
| Parameters | osid.id.Id | programId | the  Id  of the  Program   | 
| Return | osid.course.program.ProgramForm | the program form | |
| Errors | NOT_FOUND |  programId  is not found  |                 |
| NULL_ARGUMENT |  programId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | updateProgram | ||
| Description | 
                     Updates an existing program.  | ||
| Parameters | osid.course.program.ProgramForm | programForm | the form containing the elements to be updated | 
| Errors | ILLEGAL_STATE |  programForm  already used in an update transaction  |                 |
| INVALID_ARGUMENT | the form contains an invalid value | ||
| NULL_ARGUMENT |  programForm  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| UNSUPPORTED |  programForm  did not originate from  
getProgramFormForUpdate()   |                 ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canDeletePrograms | ||
| Description | 
                     Tests if this user can delete   | ||
| Return | boolean |  false  if  Program  deletion is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | deleteProgram | ||
| Description | 
                     Deletes a   | ||
| Parameters | osid.id.Id | programId | the  Id  of the  Program  to remove  | 
| Errors | NOT_FOUND |  programId  not found  |                 |
| NULL_ARGUMENT |  programId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canManageProgramAliases | ||
| Description | 
                     Tests if this user can manage   | ||
| Return | boolean |  false  if  Program  aliasing is not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | aliasProgram | ||
| Description | 
                     Adds an   | ||
| Parameters | osid.id.Id | programId | the  Id  of a  Program   | 
osid.id.Id | aliasId | the alias  Id   | |
| Errors | ALREADY_EXISTS |  aliasId  is in use as a primary  Id   |                 |
| NOT_FOUND |  programId  not found  |                 ||
| NULL_ARGUMENT |  programId  or  aliasId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |