public interface ProficiencyAdminSession extends OsidSession
This session creates, updates, and deletes Proficiencies.
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
Proficiency, a ProficiencyForm is requested using
getProficiencyFormForCreate() specifying the desired
relationship peers and record Types or none if no record
Types are needed. The returned ProficiencyForm
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 ProficiencyForm is submiited to a create operation, it
cannot be reused with another create operation unless the first operation
was unsuccessful. Each ProficiencyForm corresponds to an
attempted transaction.
For updates, ProficiencyForms are requested to the
Proficiency Id that is to be updated using
getProficiencyFormForUpdate(). Similarly, the
ProficiencyForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
ProficiencyForm can only be used once for a successful update and
cannot be reused.
The delete operations delete Proficiencies. To unmap a
Proficiency from the current ObjectiveBank,
the ProficiencyObjectiveBankAssignmentSession should be
used. These delete operations attempt to remove the Proficiency
itself thus removing it from all known ObjectiveBank
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 |
aliasProficiency(Id proficiencyId,
Id aliasId)
Adds an
Id to a Proficiency for the
purpose of creating compatibility. |
boolean |
canCreateProficiencies()
Tests if this user can create
Proficiencies. |
boolean |
canCreateProficiencyWithRecordTypes(Type[] proficiencyRecordTypes)
Tests if this user can create a single
Proficiency
using the desired record types. |
boolean |
canDeleteProficiencies()
Tests if this user can delete
Proficiencies. |
boolean |
canManageProficiencyAliases()
Tests if this user can manage
Id aliases for
proficiency entries. |
boolean |
canUpdateProficiencies()
Tests if this user can update
Proficiencies. |
Proficiency |
createProficiency(ProficiencyForm proficiencyForm)
Creates a new
Proficiency. |
void |
deleteProficiencies()
Deletes all proficiencies in this
ObjectiveBank. |
void |
deleteProficiency(Id proficiencyId)
Deletes a
Proficiency. |
ObjectiveBank |
getObjectiveBank()
Gets the
ObjectiveBank associated with this session. |
Id |
getObjectiveBankId()
Gets the
ObjectiveBank Id associated
with this session. |
ProficiencyForm |
getProficiencyFormForCreate(Id objectiveId,
Id resourceId,
Type[] proficiencyRecordTypes)
Gets the proficiency form for creating new proficiencies.
|
ProficiencyForm |
getProficiencyFormForUpdate(Id proficiencyId)
Gets the proficiency form for updating an existing proficiency.
|
void |
updateProficiency(ProficiencyForm proficiencyForm)
Updates an existing proficiency.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getObjectiveBankId()
ObjectiveBank Id associated
with this session. ObjectiveBank Id associated with this
sessionmandatory - This method must be implemented. ObjectiveBank getObjectiveBank() throws OperationFailedException, PermissionDeniedException
ObjectiveBank associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateProficiencies()
Proficiencies. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating a Proficiency 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 Proficiency creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateProficiencyWithRecordTypes(Type[] proficiencyRecordTypes)
Proficiency
using the desired record types. While
LearningManager.getProficiencyRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Proficiency.
Providing an empty array tests if a Proficiency can be
created with no records.proficiencyRecordTypes - array of proficiency record types true if Proficiency creation
using the specified record Types is supported,
false otherwiseNullArgumentException - proficiencyRecordTypes
is null mandatory - This method must be implemented. ProficiencyForm getProficiencyFormForCreate(Id objectiveId, Id resourceId, Type[] proficiencyRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveId - the Id of the Objective
resourceId - the Id of the Resource
proficiencyRecordTypes - array of proficiency record typesNotFoundException - objectiveId or
resourceId is not foundNullArgumentException - objectiveId, resourceId,
or proficienyRecordTypes is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Proficiency createProficiency(ProficiencyForm proficiencyForm) throws OperationFailedException, PermissionDeniedException
Proficiency. A new form should be
requested for each create transaction.proficiencyForm - the form for this Proficiency Proficiency IllegalStateException - proficiencyForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - proficiencyForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - proficiencyForm
did not originate from getProficiencyFormForCreate()
mandatory - This method must be implemented. boolean canUpdateProficiencies()
Proficiencies. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating a Proficiency 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 Proficiency
modification is not authorized, true otherwisemandatory - This method must be implemented. ProficiencyForm getProficiencyFormForUpdate(Id proficiencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
proficiencyId - the Id of the Proficiency
NotFoundException - proficiencyId is not
foundNullArgumentException - proficiencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateProficiency(ProficiencyForm proficiencyForm) throws OperationFailedException, PermissionDeniedException
proficiencyForm - the form containing the elements to be updatedIllegalStateException - proficiencyForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - proficiencyForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - proficiencyForm
did not originate from getProficiencyFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteProficiencies()
Proficiencies. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Proficiency 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 Proficiency deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteProficiency(Id proficiencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Proficiency. proficiencyId - the Id of the Proficiency
to removeNotFoundException - proficiencyId not
foundNullArgumentException - proficiencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void deleteProficiencies()
throws OperationFailedException,
PermissionDeniedException
ObjectiveBank. OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageProficiencyAliases()
Id aliases for
proficiency entries. 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 Proficiency aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasProficiency(Id proficiencyId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Proficiency for the
purpose of creating compatibility. The primary Id of
the Proficiency is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another proficiency, it is
reassigned to the given proficiency Id. proficiencyId - the Id of a Proficiency
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - proficiencyId not
foundNullArgumentException - proficiencyId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.