public interface CourseCatalogAdminSession extends OsidSession
This session creates, updates, and deletes CourseCatalogs.
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
CourseCatalog, a CourseCatalogForm is requested
using getCourseCatalogFormForCreate() specifying the
desired record Types or none if no record Types
are needed. The returned CourseCatalogForm 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
CourseCatalogForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each CourseCatalogForm corresponds to an
attempted transaction.
For updates, CourseCatalogForms are requested to the
CourseCatalog Id that is to be updated using
getCourseCatalogFormForUpdate(). Similarly, the
CourseCatalogForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
CourseCatalogForm can only be used once for a successful update
and cannot be reused.
The delete operations delete CourseCatalogs. It is
safer to remove all mappings to the CourseCatalog catalogs
before deletion.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasCourseCatalog(Id courseCatalogId,
Id aliasId)
Adds an
Id to a CourseCatalog for the
purpose of creating compatibility. |
boolean |
canCreateCourseCatalogs()
Tests if this user can create
CourseCatalogs. |
boolean |
canCreateCourseCatalogWithRecordTypes(Type[] courseCatalogRecordTypes)
Tests if this user can create a single
CourseCatalog
using the desired record types. |
boolean |
canDeleteCourseCatalogs()
Tests if this user can delete
CourseCatalogs. |
boolean |
canManageCourseCatalogAliases()
Tests if this user can manage
Id aliases for
CourseCatalogs. |
boolean |
canUpdateCourseCatalogs()
Tests if this user can update
CourseCatalogs. |
CourseCatalog |
createCourseCatalog(CourseCatalogForm courseCatalogForm)
Creates a new
CourseCatalog. |
void |
deleteCourseCatalog(Id courseCatalogId)
Deletes a
CourseCatalog. |
CourseCatalogForm |
getCourseCatalogFormForCreate(Type[] courseCatalogRecordTypes)
Gets the course catalog form for creating new course catalogs.
|
CourseCatalogForm |
getCourseCatalogFormForUpdate(Id courseCatalogId)
Gets the course catalog form for updating an existing course catalog.
|
void |
updateCourseCatalog(CourseCatalogForm courseCatalogForm)
Updates an existing course catalog.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateCourseCatalogs()
CourseCatalogs. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating a CourseCatalog.
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 CourseCatalog creation
is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateCourseCatalogWithRecordTypes(Type[] courseCatalogRecordTypes)
CourseCatalog
using the desired record types. While
CourseManager.getCourseCatalogRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific CourseCatalog.
Providing an empty array tests if a CourseCatalog can
be created with no records.courseCatalogRecordTypes - array of course catalog record types true if CourseCatalog creation
using the specified record Types is supported,
false otherwiseNullArgumentException - courseCatalogRecordTypes
is null mandatory - This method must be implemented. CourseCatalogForm getCourseCatalogFormForCreate(Type[] courseCatalogRecordTypes) throws OperationFailedException, PermissionDeniedException
courseCatalogRecordTypes - array of course catalog record typesNullArgumentException - courseCatalogRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. CourseCatalog createCourseCatalog(CourseCatalogForm courseCatalogForm) throws OperationFailedException, PermissionDeniedException
CourseCatalog. courseCatalogForm - the form for this CourseCatalog
CourseCatalog IllegalStateException - courseCatalogForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - courseCatalogForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - courseCatalogForm
did not originate from getCourseCatalogFormForCreate()
mandatory - This method must be implemented. boolean canUpdateCourseCatalogs()
CourseCatalogs. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating a CourseCatalog
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 CourseCatalog
modification is not authorized, true otherwisemandatory - This method must be implemented. CourseCatalogForm getCourseCatalogFormForUpdate(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseCatalogId - the Id of the
CourseCatalog NotFoundException - courseCatalogId is
not foundNullArgumentException - courseCatalogId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateCourseCatalog(CourseCatalogForm courseCatalogForm) throws OperationFailedException, PermissionDeniedException
courseCatalogForm - the form containing the elements to be
updatedIllegalStateException - courseCatalogForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - courseCatalogForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - courseCatalogForm
did not originate from getCourseCatalogFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteCourseCatalogs()
CourseCatalogs. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting a CourseCatalog
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 CourseCatalog deletion
is not authorized, true otherwisemandatory - This method must be implemented. void deleteCourseCatalog(Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CourseCatalog. courseCatalogId - the Id of the
CourseCatalog to removeNotFoundException - courseCatalogId not
foundNullArgumentException - courseCatalogId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageCourseCatalogAliases()
Id aliases for
CourseCatalogs. 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 CourseCatalog aliasing
is not authorized, true otherwisemandatory - This method must be implemented. void aliasCourseCatalog(Id courseCatalogId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a CourseCatalog for the
purpose of creating compatibility. The primary Id of
the CourseCatalog is determined by the provider. The
new Id performs as an alias to the primary Id
. If the alias is a pointer to another course catalog, it is
reassigned to the given course catalog Id. courseCatalogId - the Id of a
CourseCatalog aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - aliasId is in use as
a primary Id NullArgumentException - courseCatalogId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.