public interface ActivityRegistrationAdminSession extends OsidSession
This session creates, updates, and deletes
ActivityRegistrations. 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 an
ActivityRegistration, an ActivityRegistrationForm
is requested using getRegistrationFormForCreate()
specifying the registration, activity, student, and desired record
Types or none if no record Types are needed. The
returned ActivityRegistrationForm 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 ActivityRegistrationForm
is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
ActivityRegistrationForm corresponds to an attempted
transaction.
For updates, ActivityRegistrationForms are requested to
the ActivityRegistrationForm Id that is to
be updated using getActivityRegistrationFormForUpdate().
Similarly, the ActivityRegistrationForm has metadata about
the data that can be updated and it can perform validation before
submitting the update. The ActivityRegistrationForm can
only be used once for a successful update and cannot be reused.
The delete operations delete ActivityRegistrations. To
unmap an ActivityRegistration from the current
CourseCatalog, the
ActivityRegistrationCourseCatalogAssignmentSession should be used.
These delete operations attempt to remove the
ActivityRegistrationForm 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 |
aliasActivityRegistration(Id activityRegistrationId,
Id aliasId)
Adds an
Id to an ActivityRegistration
for the purpose of creating compatibility. |
boolean |
canCreateActivityRegistrations()
Tests if this user can create
ActivityRegistrations. |
boolean |
canCreateActivityRegistrationWithRecordTypes(Type[] activityRegistrationRecordTypes)
Tests if this user can create a single
ActivityRegistration
using the desired record types. |
boolean |
canDeleteActivityRegistrations()
Tests if this user can delete
ActivityRegistrations. |
boolean |
canManageActivityRegistrationAliases()
Tests if this user can manage
Id aliases for
ActivityRegistrations. |
boolean |
canUpdateActivityRegistrations()
Tests if this user can update
ActivityRegistrations. |
ActivityRegistration |
createActivityRegistration(ActivityRegistrationForm activityRegistrationForm)
Creates a new
ActivityRegistration. |
void |
deleteActivityRegistration(Id activityRegistrationId)
Deletes an
ActivityRegistration. |
ActivityRegistrationForm |
getActivityRegistrationFormForCreate(Id registrationId,
Id activityId,
Id resourceId,
Type[] activityRegistrationRecordTypes)
Gets the course form for creating new activity registrations.
|
ActivityRegistrationForm |
getActivityRegistrationFormForUpdate(Id activityRegistrationId)
Gets the activity registration form for updating an existing activity
registration.
|
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
void |
updateActivityRegistration(Id activityRegistrationId,
ActivityRegistrationForm activityRegistrationForm)
Updates an existing activity registration.
|
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 canCreateActivityRegistrations()
ActivityRegistrations. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known creating an
ActivityRegistration will result in a
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer create operations to an
unauthorized user. false if ActivityRegistration
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateActivityRegistrationWithRecordTypes(Type[] activityRegistrationRecordTypes)
ActivityRegistration
using the desired record types. While
CourseRegistrationManager.getActivityRegistrationRecordTypes()
can be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
ActivityRegistration. Providing an empty array tests if an
ActivityRegistration can be created with no records.activityRegistrationRecordTypes - array of activity registration
record types true if ActivityRegistration
creation using the specified record Types is
supported, false otherwiseNullArgumentException -
activityRegistrationRecordTypes is null mandatory - This method must be implemented. ActivityRegistrationForm getActivityRegistrationFormForCreate(Id registrationId, Id activityId, Id resourceId, Type[] activityRegistrationRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
registrationId - the Id for a Registration
activityId - the Id for an Activity
resourceId - the Id for a Resource activityRegistrationRecordTypes - array of activity registration
record typesNotFoundException - activityId or
resourceId is not foundNullArgumentException - activityId, resourceId,
or activityRegistrationRecordTypes is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
recod typesmandatory - This method must be implemented. ActivityRegistration createActivityRegistration(ActivityRegistrationForm activityRegistrationForm) throws OperationFailedException, PermissionDeniedException
ActivityRegistration. activityRegistrationForm - the form for this
ActivityRegistration ActivityRegistration IllegalStateException - activityRegistrationForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - activityRegistrationForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - activityRegistrationForm
did not originate from
getActivityRegistrationFormForCreate() mandatory - This method must be implemented. boolean canUpdateActivityRegistrations()
ActivityRegistrations. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known updating an
ActivityRegistration will result in a
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer update operations to an
unauthorized user. false if ActivityRegistration
modification is not authorized, true otherwisemandatory - This method must be implemented. ActivityRegistrationForm getActivityRegistrationFormForUpdate(Id activityRegistrationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityRegistrationId - the Id of the
ActivityRegistration NotFoundException - activityRegistrationId
is not foundNullArgumentException - activityRegistrationId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateActivityRegistration(Id activityRegistrationId, ActivityRegistrationForm activityRegistrationForm) throws OperationFailedException, PermissionDeniedException
activityRegistrationId - the Id of the
ActivityRegistration activityRegistrationForm - the form containing the elements to
be updatedIllegalStateException - activityRegistrationForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - activityRegistrationForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - activityRegistrationForm
did not originate from
getActivityRegistrationFormForUpdate() mandatory - This method must be implemented. boolean canDeleteActivityRegistrations()
ActivityRegistrations. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting an
ActivityRegistration will result in a
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer delete operations to an
unauthorized user. false if ActivityRegistration
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteActivityRegistration(Id activityRegistrationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ActivityRegistration. activityRegistrationId - the Id of the
ActivityRegistration to removeNotFoundException - activityRegistrationId
not foundNullArgumentException - activityRegistrationId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageActivityRegistrationAliases()
Id aliases for
ActivityRegistrations. 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 ActivityRegistration
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasActivityRegistration(Id activityRegistrationId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an ActivityRegistration
for the purpose of creating compatibility. The primary Id
of the ActivityRegistration is determined by
the provider. The new Id performs as an alias to the
primary Id. If the alias is a pointer to another
activity registration, it is reassigned to the given activity
registration Id. activityRegistrationId - the Id of an
ActivityRegistration aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - activityRegistrationId
not foundNullArgumentException - activityRegistrationId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.