OSID Logo
OSID Specifications
profile batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.profile.batch.ProfileEntryBatchAdminSession
Implementsosid.profile.ProfileEntryAdminSession
Description

This session creates, updates, and deletes ProfileEntries 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 ProfileEntry, a ProfileEntryForm is requested using getProfileEntryFormsForCreate() specifying the desired work, resource, and record Types or none if no record Types are needed. Each of the returned ProfileEntryForms 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 ProfileEntryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProfileEntryForm corresponds to an attempted transaction.

The ProfileEntryForms returned from getProfileEntryFormsForCreate() may be linked to the originating request through the peer Ids of the ProfileEntryForm. In the case where there may be duplicates, any ProfileEntryForm of the same peer Ids may be used for a create operation.

Once a batch of ProfileEntryForms are submitted for create, a CreateResponse is returned for each ProfileEntryForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createProfileEntries(), errors specific to an individual ProfileEntryForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating ProfileEntryForm through the ProfileEntryForm Id .

For updates, ProfileEntryForms are requested to the ProfileEntry Id that is to be updated using getProfileEntryFormsForUpdate() where the reference Id in the ProfileEntryForm may be used to link the request. Similarly, the ProfileEntryForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ProfileEntryForm can only be used once for a successful update and cannot be reused.

Once a batch of ProfileEntryForms are submitted for update, an UpdateResponse is returned for each ProfileEntryForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateProfileEntries(), errors specific to an individual ProfileEntryForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating ProfileEntryForm through the ProfileEntryForm Id.

The delete operations delete ProfileEntries in bulk. To unmap a ProfileEntry from the current Profile, the ProfileEntryProfileAssignmentSession should be used. These delete operations attempt to remove the ProfileEntry itself thus removing it from all known Profile catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetProfileEntryFormsForCreateForAgents
Description

Gets the profile entry forms for creating a bunch of new profile entries. A form is returned for each agent and profile item pair.

Parametersosid.profile.batch.ProfileEntryAgentPeerListpeersthe relationship peers
osid.type.Type[]profileEntryRecordTypesarray of profile entry record types to be included in each create operation or an empty list if none
Returnosid.profile.batch.ProfileEntryBatchFormListthe profile entry forms
ErrorsNOT_FOUNDan agentId or profileItemId is not found
NULL_ARGUMENT peers or profileEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodgetProfileEntryFormsForCreateForResources
Description

Gets the profile entry forms for creating a bunch of new profile entries. A form is returned for each resource and profile item pair.

Parametersosid.profile.batch.ProfileEntryResourcePeerListpeersthe relationship peers
osid.type.Type[]profileEntryRecordTypesarray of profile entry record types to be included in each create operation or an empty list if none
Returnosid.profile.batch.ProfileEntryBatchFormListthe profile entry forms
ErrorsNOT_FOUNDa resourceId or profileItemId is not found
NULL_ARGUMENT peers or profileEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateProfileEntries
Description

Creates a new set of ProfileEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.profile.batch.ProfileEntryBatchFormListprofileEntryFormsthe profile entry forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT profileEntryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProfileEntryFormsForUpdate
Description

Gets the profile entry forms for updating an existing set of profile entries. A new profile entry form should be requested for each update transaction.

Parametersosid.id.IdListprofileEntryIdsthe Ids of the ProfileEntry
Returnosid.profile.batch.ProfileEntryBatchFormListthe profile entry form
ErrorsNOT_FOUNDa profileEntryId is not found
NULL_ARGUMENT profileEntryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProfileEntries
Description

Updates existing profile entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.profile.batch.ProfileEntryBatchFormListprofileEntryFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT profileEntryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllProfileEntries
Description

Deletes all ProfileEntries in this Profile .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProfileEntries
Description

Deletes profile entries for the given Ids.

Parametersosid.id.IdListprofileEntryIdsthe Ids of the profile entries to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT profileEntryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProfileEntriesForProfileItem
Description

Deletes profile entries for the given profile item.

Parametersosid.id.IdprofileItemIdthe Id of a profile item
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT profileItemId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProfileEntriesForResource
Description

Deletes profile entries for the given resource.

Parametersosid.id.IdresourceIdthe Id of a resource
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveProfileEntriesByDate
Description

Deletes profile entries expired before the given date.

Parametersosid.calendaring.DateTimedatea date
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasProfileEntries
Description

Adds an Id to a ProfileEntry for the purpose of creating compatibility. The primary Id of the ProfileEntry is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another profile entry, it is reassigned to the given profile entry Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.