Interface ProfileEntryBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, 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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasProfileEntries(AliasRequestList aliasRequests) Adds anIdto aProfileEntryfor the purpose of creating compatibility.createProfileEntries(ProfileEntryBatchFormList profileEntryForms) Creates a new set ofProfileEntries.Deletes allProfileEntriesin thisProfile.Deletes profile entries expired before the given date.deleteProfileEntries(IdList profileEntryIds) Deletes profile entries for the givenIds.deleteProfileEntriesForProfileItem(Id profileItemId) Deletes profile entries for the given profile item.deleteProfileEntriesForResource(Id resourceId) Deletes profile entries for the given resource.getProfileEntryFormsForCreateForAgents(ProfileEntryAgentPeerList peers, Type[] profileEntryRecordTypes) Gets the profile entry forms for creating a bunch of new profile entries.getProfileEntryFormsForCreateForResources(ProfileEntryResourcePeerList peers, Type[] profileEntryRecordTypes) Gets the profile entry forms for creating a bunch of new profile entries.getProfileEntryFormsForUpdate(IdList profileEntryIds) Gets the profile entry forms for updating an existing set of profile entries.updateProfileEntries(ProfileEntryBatchFormList profileEntryForms) Updates existing profile entries.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 ProfileEntryAdminSession
aliasProfileEntry, canCreateProfileEntries, canCreateProfileEntryWithRecordTypes, canDeleteProfileEntries, canManageProfileEntryAliases, canUpdateProfileEntries, createProfileEntry, deleteProfileEntry, getProfile, getProfileEntryFormForCreateForAgent, getProfileEntryFormForCreateForResource, getProfileEntryFormForUpdate, getProfileId, updateProfileEntryModifier and TypeMethodDescriptionvoidaliasProfileEntry(Id profileEntryId, Id aliasId) Adds anIdto anProfileEntryfor the purpose of creating compatibility.booleanTests if this user can createProfileEntries.booleancanCreateProfileEntryWithRecordTypes(Type[] profileEntryRecordTypes) Tests if this user can create a singleProfileEntryusing the desired record types.booleanTests if this user can deleteProfileEntries.booleanTests if this user can manageIdaliases for profile entries.booleanTests if this user can updateProfileEntries.createProfileEntry(ProfileEntryForm profileEntryForm) Creates a newProfileEntry.voiddeleteProfileEntry(Id profileEntryId) Deletes theProfileEntryidentified by the givenId.Gets theProfileassociated with this session.getProfileEntryFormForCreateForAgent(Id agentId, Id profileItemId, Type[] profileEntryRecordTypes) Gets the profile entry form for creating new profile entries.getProfileEntryFormForCreateForResource(Id resourceId, Id profileItemId) Gets the profile entry form for creating new profile entries.getProfileEntryFormForUpdate(Id profileEntryId) Gets the profile entry form for updating an existing profile entry.Gets theProfileIdassociated with this session.voidupdateProfileEntry(ProfileEntryForm profileEntryForm) Updates an existing profile entry.
-
Method Details
-
getProfileEntryFormsForCreateForAgents
ProfileEntryBatchFormList getProfileEntryFormsForCreateForAgents(ProfileEntryAgentPeerList peers, Type[] profileEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the profile entry forms for creating a bunch of new profile entries. A form is returned for each agent and profile item pair.- Parameters:
peers- the relationship peersprofileEntryRecordTypes- array of profile entry record types to be included in each create operation or an empty list if none- Returns:
- the profile entry forms
- Throws:
NotFoundException- anagentIdorprofileItemIdis not foundNullArgumentException-peersorprofileEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
getProfileEntryFormsForCreateForResources
ProfileEntryBatchFormList getProfileEntryFormsForCreateForResources(ProfileEntryResourcePeerList peers, Type[] profileEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the profile entry forms for creating a bunch of new profile entries. A form is returned for each resource and profile item pair.- Parameters:
peers- the relationship peersprofileEntryRecordTypes- array of profile entry record types to be included in each create operation or an empty list if none- Returns:
- the profile entry forms
- Throws:
NotFoundException- aresourceIdorprofileItemIdis not foundNullArgumentException-peersorprofileEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createProfileEntries
CreateResponseList createProfileEntries(ProfileEntryBatchFormList profileEntryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofProfileEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
profileEntryForms- the profile entry forms- Returns:
- the create responses
- Throws:
NullArgumentException-profileEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProfileEntryFormsForUpdate
ProfileEntryBatchFormList getProfileEntryFormsForUpdate(IdList profileEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException 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.- Parameters:
profileEntryIds- theIdsof theProfileEntry- Returns:
- the profile entry form
- Throws:
NotFoundException- aprofileEntryIdis not foundNullArgumentException-profileEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProfileEntries
UpdateResponseList updateProfileEntries(ProfileEntryBatchFormList profileEntryForms) throws OperationFailedException, PermissionDeniedException 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 theBatchCreateResponse.- Parameters:
profileEntryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-profileEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllProfileEntries
DeleteResponseList deleteAllProfileEntries() throws OperationFailedException, PermissionDeniedExceptionDeletes allProfileEntriesin thisProfile.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProfileEntries
DeleteResponseList deleteProfileEntries(IdList profileEntryIds) throws OperationFailedException, PermissionDeniedException Deletes profile entries for the givenIds.- Parameters:
profileEntryIds- theIdsof the profile entries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-profileEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProfileEntriesForProfileItem
DeleteResponseList deleteProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException Deletes profile entries for the given profile item.- Parameters:
profileItemId- theIdof a profile item- Returns:
- the delete responses
- Throws:
NullArgumentException-profileItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteProfileEntriesForResource
DeleteResponseList deleteProfileEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes profile entries 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.
-
deleteIneffectiveProfileEntriesByDate
DeleteResponseList deleteIneffectiveProfileEntriesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes profile entries expired before 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.
-
aliasProfileEntries
AliasResponseList aliasProfileEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aProfileEntryfor the purpose of creating compatibility. The primaryIdof theProfileEntryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another profile entry, it is reassigned to the given profile 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.
-