public interface ProficiencyBatchAdminSession extends ProficiencyAdminSession
This session creates, updates, and deletes Proficiencies
in bulk. 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
getProficiencyFormsForCreate()
specifying the desired
objective, resource, and record Types
or none if no record
Types
are needed. Each of the returned
ProficiencyForms
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 a 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.
The ProficiencyForms
returned from
getProficiencyFormsForCreate()
may be linked to the originating
request through the peer Ids
of the ProficiencyForm.
In the case where there may be duplicates, any
ProficiencyForm
of the same peer Ids
may be used
for a create operation.
Once a batch of ProficiencyForms
are submitted for
create, a CreateResponse
is returned for each
ProficiencyForm,
although the ordering is not defined. Only errors
that pertain to the entire create operation are returned from
createProficiencies(),
errors specific to an individual
ProficiencyForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating ProficiencyForm
through the
ProficiencyForm
Id
.
For updates, ProficiencyForms
are requested to the
Proficiency
Id
that is to be updated using
getProficiencyFormsForUpdate()
where the reference
Id
in the ProficiencyForm
may be used to link the
request. 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.
Once a batch of ProficiencyForms
are submitted for
update, an UpdateResponse
is returned for each
ProficiencyForm,
although the ordering is not defined. Only errors
that pertain to the entire update operation are returned from
updateProficiencies(),
errors specific to an individual
ProficiencyForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating ProficiencyForm
through the
ProficiencyForm
Id.
The delete operations delete Proficiencies
in bulk. 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. Bulk delete operations return the results
in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasProficiencies(AliasRequestList aliasRequests)
Adds an
Id to a Proficiency for the
purpose of creating compatibility. |
CreateResponseList |
createProficiencies(ProficiencyBatchFormList proficiencyForms)
Creates a new set of
Proficiencies. |
DeleteResponseList |
deleteAllProficiencies()
Deletes all
Proficiencies in this ObjectiveBank
. |
DeleteResponseList |
deleteIneffectiveProficienciesByDate(DateTime date)
Deletes proficiencies expired befoe the given date.
|
DeleteResponseList |
deleteProficiencies(IdList proficiencyIds)
Deletes proficiencies for the given
Ids. |
DeleteResponseList |
deleteProficienciesForObjective(Id objectiveId)
Deletes proficiencies for the given objective.
|
DeleteResponseList |
deleteProficienciesForResource(Id resourceId)
Deletes proficiencies for the given resource.
|
ProficiencyBatchFormList |
getProficiencyFormsForCreate(ProficiencyPeerList peers,
Type[] proficiencyRecordTypes)
Gets the proficiency forms for creating a bunch of new proficiencies.
|
ProficiencyBatchFormList |
getProficiencyFormsForUpdate(IdList proficiencyIds)
Gets the proficiency forms for updating an existing set of
proficiencies.
|
UpdateResponseList |
updateProficiencies(ProficiencyBatchFormList proficiencyForms)
Updates existing proficiencies.
|
aliasProficiency, canCreateProficiencies, canCreateProficiencyWithRecordTypes, canDeleteProficiencies, canManageProficiencyAliases, canUpdateProficiencies, createProficiency, deleteProficiencies, deleteProficiency, getObjectiveBank, getObjectiveBankId, getProficiencyFormForCreate, getProficiencyFormForUpdate, updateProficiency
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
ProficiencyBatchFormList getProficiencyFormsForCreate(ProficiencyPeerList peers, Type[] proficiencyRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the proficiency peersproficiencyRecordTypes
- array of proficiency record types to be
included in each create operation or an empty list if noneNotFoundException
- an objectiveId
or
resourceId
is not foundNullArgumentException
- peers
or
proficiencyRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createProficiencies(ProficiencyBatchFormList proficiencyForms) throws OperationFailedException, PermissionDeniedException
Proficiencies.
This method returns
an error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.proficiencyForms
- the proficiency formsNullArgumentException
- proficiencyForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProficiencyBatchFormList getProficiencyFormsForUpdate(IdList proficiencyIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
proficiencyIds
- the Ids
of the
Proficiency
NotFoundException
- a proficiencyId
is
not foundNullArgumentException
- proficiencyIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateProficiencies(ProficiencyBatchFormList proficiencyForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.proficiencyForms
- the form containing the elements to be
updatedNullArgumentException
- proficiencyForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllProficiencies() throws OperationFailedException, PermissionDeniedException
Proficiencies
in this ObjectiveBank
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProficiencies(IdList proficiencyIds) throws OperationFailedException, PermissionDeniedException
Ids.
proficiencyIds
- the Ids
of the proficiencies to
deleteNullArgumentException
- proficiencyIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProficienciesForObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
objectiveId
- the Id
of an objectiveNullArgumentException
- objectiveId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProficienciesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
resourceId
- the Id
of a resourceNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIneffectiveProficienciesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasProficiencies(AliasRequestList aliasRequests) throws 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
is an alias to the primary Id.
If the
alias is a pointer to another proficiency, it is reassigned to the
given entry Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.