public interface SyllabusAdminSession extends OsidSession
This session creates, updates, and deletes Syllabi. 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
Syllabus, a SyllabusForm is requested using
getSyllabusFormForCreate() specifying the desired record
Types or none if no record Types are needed. The
returned SyllabusForm 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 SyllabusForm is submiited
to a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each SyllabusForm
corresponds to an attempted transaction.
For updates, SyllabusForms are requested to the
Syllabus Id that is to be updated using
getSyllabusFormForUpdate(). Similarly, the SyllabusForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The SyllabusForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Syllabi. To unmap a
Syllabus from the current CourseCatalog, the
SyllabusCourseCatalogAssignmentSession should be used. These
delete operations attempt to remove the SyllabusForm itself
thus removing it from all known CourseCatalog catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasSyllabus(Id syllabusId,
Id aliasId)
Adds an
Id to a Syllabus for the purpose
of creating compatibility. |
boolean |
canCreateSyllabi()
Tests if this user can create syllabi.
|
boolean |
canCreateSyllabusWithRecordTypes(Type[] syllabusRecordTypes)
Tests if this user can create a single
Syllabus using
the desired record types. |
boolean |
canDeleteSyllabi()
Tests if this user can delete syllabi.
|
boolean |
canManageSyllabusAliases()
Tests if this user can manage
Id aliases for
Comnents. |
boolean |
canUpdateSyllabi()
Tests if this user can update syllabi.
|
Syllabus |
createSyllabus(SyllabusForm syllabusForm)
Creates a new
Syllabus. |
void |
deleteSyllabus(Id syllabusId)
Deletes a
Syllabus. |
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
SyllabusForm |
getSyllabusFormForCreate(Id courseId,
Type[] syllabusRecordTypes)
Gets the syllabus form for creating new syllabi.
|
SyllabusForm |
getSyllabusFormForUpdate(Id syllabusId)
Gets the syllabus form for updating an existing syllabus.
|
void |
updateSyllabus(SyllabusForm syllabusForm)
Updates an existing syllabus.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCourseCatalogId()
CourseCatalog Id associated
with this session. CourseCatalog Id associated with this
sessionmandatory - This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateSyllabi()
Syllabus 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. false if Syllabus creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateSyllabusWithRecordTypes(Type[] syllabusRecordTypes)
Syllabus using
the desired record types. While
CourseSyllabusManager.getSyllabusRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Syllabus.
Providing an empty array tests if a Syllabus can be
created with no records.syllabusRecordTypes - array of syllabus record types true if Syllabus creation using
the specified record Types is supported,
false otherwiseNullArgumentException - syllabusRecordTypes
is null mandatory - This method must be implemented. SyllabusForm getSyllabusFormForCreate(Id courseId, Type[] syllabusRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseId - the Id for the coursesyllabusRecordTypes - array of syllabus record typesNotFoundException - courseId is not
foundNullArgumentException - courseId or
syllabusRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Syllabus createSyllabus(SyllabusForm syllabusForm) throws NotFoundException, OperationFailedException, PermissionDeniedException
Syllabus. syllabusForm - the form for this Syllabus Syllabus IllegalStateException - syllabusForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNotFoundException - courseId is not
foundNullArgumentException - syllabusForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - syllabusForm did
not originate from getSyllabusFormForCreate() mandatory - This method must be implemented. boolean canUpdateSyllabi()
Syllabus 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. false if Syllabus modification
is not authorized, true otherwisemandatory - This method must be implemented. SyllabusForm getSyllabusFormForUpdate(Id syllabusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
syllabusId - the Id of the Syllabus
NotFoundException - syllabusId is not
foundNullArgumentException - syllabusId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateSyllabus(SyllabusForm syllabusForm) throws OperationFailedException, PermissionDeniedException
syllabusForm - the form containing the elements to be updatedIllegalStateException - syllabusForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - syllabusForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - syllabusForm did
not originate from getSyllabusFormForUpdate() mandatory - This method must be implemented. boolean canDeleteSyllabi()
Syllabus 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. false if Syllabus deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteSyllabus(Id syllabusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Syllabus. syllabusId - the Id of the Syllabus
to removeNotFoundException - syllabusId not foundNullArgumentException - syllabusId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageSyllabusAliases()
Id aliases for
Comnents. 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. false if Syllabus aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasSyllabus(Id syllabusId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Syllabus for the purpose
of creating compatibility. The primary Id of the
Syllabus is determined by the provider. The new Id
performs as an alias to the primary Id. If the
alias is a pointer to another syllabus, it is reassigned to the given
syllabus Id. syllabusId - the Id of a Syllabus aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - syllabusId not foundNullArgumentException - syllabusId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.