Interface | osid.ontology.SubjectAdminSession | ||
---|---|---|---|
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 | getOntologyId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Ontology Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getOntology | ||
Description |
Gets the | ||
Return | osid.ontology.Ontology | the Ontology associated with this session | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canCreateSubjects | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Subject creation is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateSubjectWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | subjectRecordTypes | array of subject record types |
Return | boolean | true if Subject creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | subjectRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getSubjectFormForCreate | ||
Description |
Gets the subject form for creating new subjects. A new form should be requested for each create transaction. | ||
Parameters | osid.type.Type[] | subjectRecordTypes | array of subject record types |
Return | osid.ontology.SubjectForm | the subject form | |
Errors | NULL_ARGUMENT | subjectRecordTypes 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 | createSubject | ||
Description |
Creates a new | ||
Parameters | osid.ontology.SubjectForm | subjectForm | the form for this Subject |
Return | osid.ontology.Subject | the new Subject | |
Errors | ILLEGAL_STATE | subjectForm already used in a create transaction | |
INVALID_ARGUMENT | one or more of the form elements is invalid | ||
NULL_ARGUMENT | subjectForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | subjectForm did not originate from
getSubjectFormForCreate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateSubjects | ||
Description |
Tests if this user can update | ||
Return | boolean | false if subject modification is not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getSubjectFormForUpdate | ||
Description |
Gets the subject form for updating an existing subject. A new subject form should be requested for each update transaction. | ||
Parameters | osid.id.Id | subjectId | the Id of the Subject |
Return | osid.ontology.SubjectForm | the subject form | |
Errors | NOT_FOUND | subjectId is not found | |
NULL_ARGUMENT | subjectId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateSubject | ||
Description |
Updates an existing subject. | ||
Parameters | osid.ontology.SubjectForm | subjectForm | the form containing the elements to be updated |
Errors | ILLEGAL_STATE | subjectForm already used in an update transaction | |
INVALID_ARGUMENT | the form contains an invalid value | ||
NULL_ARGUMENT | subjectForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | subjectForm did not originate from
getSubjectFormForUpdate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteSubjects | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Subject deletion is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteSubject | ||
Description |
Deletes the | ||
Parameters | osid.id.Id | subjectId | the Id of the Subject to delete |
Errors | NOT_FOUND | a Subject was not found identified by the given Id
| |
NULL_ARGUMENT | subjectId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canManageSubjectAliases | ||
Description |
Tests if this user can manage | ||
Return | boolean | false if Subject aliasing is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | aliasSubject | ||
Description |
Adds an | ||
Parameters | osid.id.Id | subjectId | the Id of a Subject |
osid.id.Id | aliasId | the alias Id | |
Errors | ALREADY_EXISTS | aliasId is already assigned | |
NOT_FOUND | subjectId not found | ||
NULL_ARGUMENT | subjectId or aliasId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |