public interface AssessmentOfferedAdminSession extends OsidSession
This session creates, updates, and deletes AssessmentsOffered.
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
AssessmentOffered, an AssessmentOfferedForm
is requested using getAssessmentOfferedFormForCreate()
specifying the assessment and desired record Types or none
if no record Types are needed. The returned
AssessmentOfferedForm 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 AssessmentOfferedForm is submiited to
a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each
AssessmentOfferedForm corresponds to an attempted transaction.
For updates, AssessmentOfferedForms are requested to
the AssessmentOffered Id that is to be
updated using getAssessmentOfferedFormForUpdate().
Similarly, the AssessmentOfferedForm has metadata about the
data that can be updated and it can perform validation before submitting
the update. The AssessmentOfferedForm can only be used once
for a successful update and cannot be reused.
The delete operations delete AssessmentsOffered. To
unmap an AssessmentOffered from the current Bank,
the AssessmentOfferedBankAssignmentSession should
be used. These delete operations attempt to remove the
AssessmentOffered itself thus removing it from all known
Bank 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 |
aliasAssessmentOffered(Id assessmentOfferedId,
Id aliasId)
Adds an
Id to an AssessmentOffered for
the purpose of creating compatibility. |
boolean |
canCreateAssessmentOfferedWithRecordTypes(Type[] assessmentOfferedRecordTypes)
Tests if this user can create a single
AssessmentOffered
using the desired record types. |
boolean |
canCreateAssessmentsOffered()
Tests if this user can create
AssessmentOffered
objects. |
boolean |
canDeleteAssessmentsOffered()
Tests if this user can delete
AssessmentsOffered. |
boolean |
canManageAssessmentOfferedAliases()
Tests if this user can manage
Id aliases for
AssessmentsOffered. |
boolean |
canUpdateAssessmentsOffered()
Tests if this user can update
AssessmentOffered
objects. |
AssessmentOffered |
createAssessmentOffered(AssessmentOfferedForm assessmentOfferedForm)
Creates a new
AssessmentOffered. |
void |
deleteAssessmentOffered(Id assessmentOfferedId)
Deletes an
AssessmentOffered. |
AssessmentOfferedForm |
getAssessmentOfferedFormForCreate(Id assessmentId,
Type[] assessmentOfferedRecordTypes)
Gets the assessment offered form for creating new assessments offered.
|
AssessmentOfferedForm |
getAssessmentOfferedFormForUpdate(Id assessmentOfferedId)
Gets the assessment offered form for updating an existing assessment
offered.
|
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
void |
updateAssessmentOffered(AssessmentOfferedForm assessmentOfferedForm)
Updates an existing assessment offered.
|
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 failure
occurredmandatory - This method must be implemented. boolean canCreateAssessmentsOffered()
AssessmentOffered
objects. A return of true does not guarantee successful
authoriization. A return of false indicates that it is known creating
an AssessmentOffered 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 AssessmentOffered
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateAssessmentOfferedWithRecordTypes(Type[] assessmentOfferedRecordTypes)
AssessmentOffered
using the desired record types. While
AssessmentManager.getAssessmentOfferedRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific
AssessmentOffered. Providing an empty array tests if an
AssessmentOffered can be created with no records.assessmentOfferedRecordTypes - array of assessment offered
record types true if AssessmentOffered
creation using the specified record Types is
supported, false otherwiseNullArgumentException -
assessmentOfferedRecordTypes is null mandatory - This method must be implemented. AssessmentOfferedForm getAssessmentOfferedFormForCreate(Id assessmentId, Type[] assessmentOfferedRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentId - the Id of the related
Assessment assessmentOfferedRecordTypes - array of assessment offered
record types to be included in the create operation or an
empty list if noneNotFoundException - assessmentId is not
foundNullArgumentException - assessmentId or
assessmentOfferedRecordTypes is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. AssessmentOffered createAssessmentOffered(AssessmentOfferedForm assessmentOfferedForm) throws OperationFailedException, PermissionDeniedException
AssessmentOffered. assessmentOfferedForm - the form for this
AssessmentOffered AssessmentOffered IllegalStateException - assessmentOffreredForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - assessmentForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentForm
did not originate from getAssessmentFormForCreate()
mandatory - This method must be implemented. boolean canUpdateAssessmentsOffered()
AssessmentOffered
objects. A return of true does not guarantee successful authorization.
A return of false indicates that it is known updating an
AssessmentOffered 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 modification
is not authorized, true otherwisemandatory - This method must be implemented. AssessmentOfferedForm getAssessmentOfferedFormForUpdate(Id assessmentOfferedId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentOfferedId - the Id of the
AssessmentOffered NotFoundException - assessmentOfferedId
is not foundNullArgumentException - assessmentOfferedId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. void updateAssessmentOffered(AssessmentOfferedForm assessmentOfferedForm) throws OperationFailedException, PermissionDeniedException
assessmentOfferedForm - the form containing the elements to be
updatedIllegalStateException - assessmentOffreredForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - assessmentOfferedForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentForm
did not originate from getAssessmentFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteAssessmentsOffered()
AssessmentsOffered. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting an
AssessmentOffered will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer a delete operations to unauthorized users. false if AssessmentOffered
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteAssessmentOffered(Id assessmentOfferedId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentOffered. assessmentOfferedId - the Id of the
AssessmentOffered to removeNotFoundException - assessmentOfferedId
not foundNullArgumentException - assessmentOfferedId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean canManageAssessmentOfferedAliases()
Id aliases for
AssessmentsOffered. 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 AssessmentOffered
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasAssessmentOffered(Id assessmentOfferedId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an AssessmentOffered for
the purpose of creating compatibility. The primary Id
of the AssessmentOffered is determined by the provider.
The new Id is an alias to the primary Id.
If the alias is a pointer to another assessment offered, it is
reassigned to the given assessment offered Id. assessmentOfferedId - the Id of an
AssessmentOffered aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - assessmentOfferedId
not foundNullArgumentException - assessmentOfferedId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented.