public interface ProfileEntryBatchAdminSession extends ProfileEntryAdminSession
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.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasProfileEntries(AliasRequestList aliasRequests)
Adds an
Id to a ProfileEntry for the
purpose of creating compatibility. |
CreateResponseList |
createProfileEntries(ProfileEntryBatchFormList profileEntryForms)
Creates a new set of
ProfileEntries. |
DeleteResponseList |
deleteAllProfileEntries()
Deletes all
ProfileEntries in this Profile
. |
DeleteResponseList |
deleteIneffectiveProfileEntriesByDate(DateTime date)
Deletes profile entries expired before the given date.
|
DeleteResponseList |
deleteProfileEntries(IdList profileEntryIds)
Deletes profile entries for the given
Ids. |
DeleteResponseList |
deleteProfileEntriesForProfileItem(Id profileItemId)
Deletes profile entries for the given profile item.
|
DeleteResponseList |
deleteProfileEntriesForResource(Id resourceId)
Deletes profile entries for the given resource.
|
ProfileEntryBatchFormList |
getProfileEntryFormsForCreateForAgents(ProfileEntryAgentPeerList peers,
Type[] profileEntryRecordTypes)
Gets the profile entry forms for creating a bunch of new profile
entries.
|
ProfileEntryBatchFormList |
getProfileEntryFormsForCreateForResources(ProfileEntryResourcePeerList peers,
Type[] profileEntryRecordTypes)
Gets the profile entry forms for creating a bunch of new profile
entries.
|
ProfileEntryBatchFormList |
getProfileEntryFormsForUpdate(IdList profileEntryIds)
Gets the profile entry forms for updating an existing set of profile
entries.
|
UpdateResponseList |
updateProfileEntries(ProfileEntryBatchFormList profileEntryForms)
Updates existing profile entries.
|
aliasProfileEntry, canCreateProfileEntries, canCreateProfileEntryWithRecordTypes, canDeleteProfileEntries, canManageProfileEntryAliases, canUpdateProfileEntries, createProfileEntry, deleteProfileEntry, getProfile, getProfileEntryFormForCreateForAgent, getProfileEntryFormForCreateForResource, getProfileEntryFormForUpdate, getProfileId, updateProfileEntry
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
ProfileEntryBatchFormList getProfileEntryFormsForCreateForAgents(ProfileEntryAgentPeerList peers, Type[] profileEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the relationship peersprofileEntryRecordTypes
- array of profile entry record types to
be included in each create operation or an empty list if noneNotFoundException
- an agentId
or
profileItemId
is not foundNullArgumentException
- peers
or
profileEntryRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. ProfileEntryBatchFormList getProfileEntryFormsForCreateForResources(ProfileEntryResourcePeerList peers, Type[] profileEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the relationship peersprofileEntryRecordTypes
- array of profile entry record types to
be included in each create operation or an empty list if noneNotFoundException
- a resourceId
or
profileItemId
is not foundNullArgumentException
- peers
or
profileEntryRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createProfileEntries(ProfileEntryBatchFormList profileEntryForms) throws OperationFailedException, PermissionDeniedException
ProfileEntries.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.profileEntryForms
- the profile entry formsNullArgumentException
- profileEntryForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProfileEntryBatchFormList getProfileEntryFormsForUpdate(IdList profileEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
profileEntryIds
- the Ids
of the
ProfileEntry
NotFoundException
- a profileEntryId
is
not foundNullArgumentException
- profileEntryIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateProfileEntries(ProfileEntryBatchFormList profileEntryForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.profileEntryForms
- the form containing the elements to be
updatedNullArgumentException
- profileEntryForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllProfileEntries() throws OperationFailedException, PermissionDeniedException
ProfileEntries
in this Profile
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProfileEntries(IdList profileEntryIds) throws OperationFailedException, PermissionDeniedException
Ids.
profileEntryIds
- the Ids
of the profile entries
to deleteNullArgumentException
- profileEntryIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
profileItemId
- the Id
of a profile itemNullArgumentException
- profileItemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteProfileEntriesForResource(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 deleteIneffectiveProfileEntriesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasProfileEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
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.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.