Interface ProficiencyBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, 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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasProficiencies(AliasRequestList aliasRequests) Adds anIdto aProficiencyfor the purpose of creating compatibility.createProficiencies(ProficiencyBatchFormList proficiencyForms) Creates a new set ofProficiencies.Deletes allProficienciesin thisObjectiveBank.Deletes proficiencies expired befoe the given date.deleteProficiencies(IdList proficiencyIds) Deletes proficiencies for the givenIds.deleteProficienciesForObjective(Id objectiveId) Deletes proficiencies for the given objective.deleteProficienciesForResource(Id resourceId) Deletes proficiencies for the given resource.getProficiencyFormsForCreate(ProficiencyPeerList peers, Type[] proficiencyRecordTypes) Gets the proficiency forms for creating a bunch of new proficiencies.getProficiencyFormsForUpdate(IdList proficiencyIds) Gets the proficiency forms for updating an existing set of proficiencies.updateProficiencies(ProficiencyBatchFormList proficiencyForms) Updates existing proficiencies.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface ProficiencyAdminSession
aliasProficiency, canCreateProficiencies, canCreateProficiencyWithRecordTypes, canDeleteProficiencies, canManageProficiencyAliases, canUpdateProficiencies, createProficiency, deleteProficiencies, deleteProficiency, getObjectiveBank, getObjectiveBankId, getProficiencyFormForCreate, getProficiencyFormForUpdate, updateProficiencyModifier and TypeMethodDescriptionvoidaliasProficiency(Id proficiencyId, Id aliasId) Adds anIdto aProficiencyfor the purpose of creating compatibility.booleanTests if this user can createProficiencies.booleancanCreateProficiencyWithRecordTypes(Type[] proficiencyRecordTypes) Tests if this user can create a singleProficiencyusing the desired record types.booleanTests if this user can deleteProficiencies.booleanTests if this user can manageIdaliases for proficiency entries.booleanTests if this user can updateProficiencies.createProficiency(ProficiencyForm proficiencyForm) Creates a newProficiency.voidDeletes all proficiencies in thisObjectiveBank.voiddeleteProficiency(Id proficiencyId) Deletes aProficiency.Gets theObjectiveBankassociated with this session.Gets theObjectiveBankIdassociated with this session.getProficiencyFormForCreate(Id objectiveId, Id resourceId, Type[] proficiencyRecordTypes) Gets the proficiency form for creating new proficiencies.getProficiencyFormForUpdate(Id proficiencyId) Gets the proficiency form for updating an existing proficiency.voidupdateProficiency(ProficiencyForm proficiencyForm) Updates an existing proficiency.
-
Method Details
-
getProficiencyFormsForCreate
ProficiencyBatchFormList getProficiencyFormsForCreate(ProficiencyPeerList peers, Type[] proficiencyRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the proficiency forms for creating a bunch of new proficiencies. A form is returned for each supplied objective and resource peer.- Parameters:
peers- the proficiency peersproficiencyRecordTypes- array of proficiency record types to be included in each create operation or an empty list if none- Returns:
- the proficiency forms
- Throws:
NotFoundException- anobjectiveIdorresourceIdis not foundNullArgumentException-peersorproficiencyRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createProficiencies
CreateResponseList createProficiencies(ProficiencyBatchFormList proficiencyForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofProficiencies. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
proficiencyForms- the proficiency forms- Returns:
- the create responses
- Throws:
NullArgumentException-proficiencyFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProficiencyFormsForUpdate
ProficiencyBatchFormList getProficiencyFormsForUpdate(IdList proficiencyIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the proficiency forms for updating an existing set of proficiencies. A new proficiency form should be requested for each update transaction.- Parameters:
proficiencyIds- theIdsof theProficiency- Returns:
- the proficiency form
- Throws:
NotFoundException- aproficiencyIdis not foundNullArgumentException-proficiencyIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProficiencies
UpdateResponseList updateProficiencies(ProficiencyBatchFormList proficiencyForms) throws OperationFailedException, PermissionDeniedException Updates existing proficiencies. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
proficiencyForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-proficiencyFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllProficiencies
DeleteResponseList deleteAllProficiencies() throws OperationFailedException, PermissionDeniedExceptionDeletes allProficienciesin thisObjectiveBank.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProficiencies
DeleteResponseList deleteProficiencies(IdList proficiencyIds) throws OperationFailedException, PermissionDeniedException Deletes proficiencies for the givenIds.- Parameters:
proficiencyIds- theIdsof the proficiencies to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-proficiencyIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProficienciesForObjective
DeleteResponseList deleteProficienciesForObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException Deletes proficiencies for the given objective.- Parameters:
objectiveId- theIdof an objective- Returns:
- the delete responses
- Throws:
NullArgumentException-objectiveIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProficienciesForResource
DeleteResponseList deleteProficienciesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes proficiencies for the given resource.- Parameters:
resourceId- theIdof a resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectiveProficienciesByDate
DeleteResponseList deleteIneffectiveProficienciesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes proficiencies expired befoe the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasProficiencies
AliasResponseList aliasProficiencies(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aProficiencyfor the purpose of creating compatibility. The primaryIdof theProficiencyis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another proficiency, it is reassigned to the given entryId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-