public interface AssessmentPartAdminSession extends OsidSession
This session creates, updates, and deletes AssessmentParts.
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
AssessmentPart, an AssessmentPartForm is
requested using getAssessmentPartFormForCreate() specifying
the desired record Types or none if no record Types
are needed. The returned AssessmentPartForm 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
AssessmentPartForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each AssessmentPartForm corresponds to an
attempted transaction.
For updates, AssessmentPartForms are requested to the
AssessmentPart Id that is to be updated
using getAssessmentPartFormForUpdate(). Similarly, the
AssessmentPartForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentPartForm can only be used once for a successful
update and cannot be reused.
The delete operations delete AssessmentParts.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasAssessmentPart(Id assessmentPartId,
Id aliasId)
Adds an
Id to an AssessmentPart for the
purpose of creating compatibility. |
boolean |
canCreateAssessmentParts()
Tests if this user can create assessment parts.
|
boolean |
canCreateAssessmentPartWithRecordTypes(Type[] assessmentPartRecordTypes)
Tests if this user can create a single
AssessmentPart
using the desired record types. |
boolean |
canDeleteAssessmentParts()
Tests if this user can delete
AssessmentParts. |
boolean |
canManageAssessmentPartAliases()
Tests if this user can manage
Id aliases for
AssessmentParts. |
boolean |
canUpdateAssessmentParts()
Tests if this user can update
AssessmentParts. |
AssessmentPart |
createAssessmentPartForAssessment(AssessmentPartForm assessmentPartForm)
Creates a new assessment part.
|
AssessmentPart |
createAssessmentPartForAssessmentPart(AssessmentPartForm assessmentPartForm)
Creates a new assessment part.
|
void |
deleteAssessmentPart(Id assessmentPartId)
Removes an asessment part and all mapped items.
|
AssessmentPartForm |
getAssessmentPartFormForCreateForAssessment(Id assessmentId,
Type[] assessmentPartRecordTypes)
Gets the assessment part form for creating new assessment parts for an
assessment.
|
AssessmentPartForm |
getAssessmentPartFormForCreateForAssessmentPart(Id assessmentPartId,
Type[] assessmentPartRecordTypes)
Gets the assessment part form for creating new assessment parts under
another assessment part.
|
AssessmentPartForm |
getAssessmentPartFormForUpdate(Id assessmentPartId)
Gets the assessment part form for updating an existing assessment
part.
|
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
void |
updateAssessmentPart(Id assessmentPartId,
AssessmentPartForm assessmentPartForm)
Updates an existing assessment part.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBankId()
Bank Id associated with this
session. Bank Id associated with this sessionmandatory - This method must be implemented. Bank getBank() throws OperationFailedException, PermissionDeniedException
Bank associated with this session. Bank associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateAssessmentParts()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer create operations to
unauthorized users. false if AssessmentPart creation
is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateAssessmentPartWithRecordTypes(Type[] assessmentPartRecordTypes)
AssessmentPart
using the desired record types. While
AssessmentAuthoringManager.getAssessmentPartRecordTypes() can
be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
AssessmentPart. Providing an empty array tests if an
AssessmentPart can be created with no records.assessmentPartRecordTypes - array of assessment part record
types true if AssessmentPart creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
assessmentPartRecordTypes is null mandatory - This method must be implemented. AssessmentPartForm getAssessmentPartFormForCreateForAssessment(Id assessmentId, Type[] assessmentPartRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentId - an assessment Id assessmentPartRecordTypes - array of assessment part record
types to be included in the create operation or an empty list
if noneNotFoundException - assessmentId is not
foundNullArgumentException - assessmentId or
assessmentPartRecordTypes is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. AssessmentPart createAssessmentPartForAssessment(AssessmentPartForm assessmentPartForm) throws OperationFailedException, PermissionDeniedException
assessmentPartForm - assessment part formIllegalStateException - assessmentPartForm
already used in a create transactionInvalidArgumentException - assessmentPartForm
is invalidNullArgumentException - assessmentPartForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentPartForm
did not originate from
getAssessmentPartFormForCreateForAssessment() mandatory - This method must be implemented. AssessmentPartForm getAssessmentPartFormForCreateForAssessmentPart(Id assessmentPartId, Type[] assessmentPartRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentPartId - an assessment part Id assessmentPartRecordTypes - array of assessment part record
types to be included in the create operation or an empty list
if noneNotFoundException - assessmentPartId is
not foundNullArgumentException - assessmentPartId
or assessmentPartRecordTypes is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. AssessmentPart createAssessmentPartForAssessmentPart(AssessmentPartForm assessmentPartForm) throws OperationFailedException, PermissionDeniedException
assessmentPartForm - assessment part formIllegalStateException - assessmentPartForm
already used in a create transactionInvalidArgumentException - assessmentPartForm
is invalidNullArgumentException - assessmentPartForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentPartForm
did not originate from
getAssessmentPartFormForCreateForAssessmentPart() mandatory - This method must be implemented. boolean canUpdateAssessmentParts()
AssessmentParts. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating an AssessmentPart
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 assessment part modification is not
authorized, true otherwisemandatory - This method must be implemented. AssessmentPartForm getAssessmentPartFormForUpdate(Id assessmentPartId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentPartId - the Id of the
AssessmentPart NotFoundException - assessmentPartId is
not foundNullArgumentException - assessmentPartId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. void updateAssessmentPart(Id assessmentPartId, AssessmentPartForm assessmentPartForm) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentPartId - the Id of the
AssessmentPart assessmentPartForm - part formNotFoundException - assessmentPartId not
foundNullArgumentException - assessmentPartId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentPartForm
is not of this servicemandatory - This method must be implemented. boolean canDeleteAssessmentParts()
AssessmentParts. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting an AssessmentPart
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 AssessmentPart deletion
is not authorized, true otherwisemandatory - This method must be implemented. void deleteAssessmentPart(Id assessmentPartId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentPartId - the Id of the
AssessmentPart NotFoundException - assessmentPartId not
foundNullArgumentException - assessmentPartId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean canManageAssessmentPartAliases()
Id aliases for
AssessmentParts. 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 AssessmentPart aliasing
is not authorized, true otherwisemandatory - This method must be implemented. void aliasAssessmentPart(Id assessmentPartId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an AssessmentPart for the
purpose of creating compatibility. The primary Id of
the AssessmentPart is determined by the provider. The
new Id is an alias to the primary Id. If
the alias is a pointer to another assessment part, it is reassigned to
the given assessment part Id. assessmentPartId - the Id of an
AssessmentPart aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - assessmentPartId not
foundNullArgumentException - assessmentPartId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.