public interface DeedBatchAdminSession extends DeedAdminSession
This session creates, updates, and deletes Deeds
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
Deed,
a DeedForm
is requested using
getDeedFormsForCreate()
specifying the peers and desired record
Types
or none if no record Types
are needed.
Each of the returned DeedForms
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 DeedForm
is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
DeedForm
corresponds to an attempted transaction.
The DeedForms
returned from
getDeedFormsForCreate()
may be linked to the originating request
through the peer Ids
of the DeedForm.
In the
case where there may be duplicates, any DeedForm
of the
same peer Ids
may be used for a create operation.
Once a batch of DeedForms
are submitted for create, a
CreateResponse
is returned for each DeedForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createDeeds(),
errors specific to an individual DeedForm
are
indicated in the corresponding CreateResponse.
CreateResponses
may be linked to the originating DeedForm
through the DeedForm
Id
.
For updates, DeedForms
are requested to the Deed
Id
that is to be updated using
getDeedFormsForUpdate()
where the reference Id
in
the DeedForm
may be used to link the request. Similarly,
the DeedForm
has metadata about the data that can be
updated and it can perform validation before submitting the update. The
DeedForm
can only be used once for a successful update and
cannot be reused.
Once a batch of DeedForms
are submitted for update, an
UpdateResponse
is returned for each DeedForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updateDeeds(),
errors specific to an individual DeedForm
are
indicated in the corresponding UpdateResponse.
UpdateResponses
may be linked to the originating DeedForm
through the DeedForm
Id.
The delete operations delete Deeds
in bulk. To unmap a
Deed
from the current Campus,
the
DeedCampusAssignmentSession
should be used. These delete
operations attempt to remove the Deed
itself thus removing
it from all known Campus
catalogs. Bulk delete operations
return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasDeeds(AliasRequestList aliasRequests)
Adds an
Id to a Deed for the purpose of
creating compatibility. |
CreateResponseList |
createDeeds(DeedBatchFormList deedForms)
Creates a new set of
Deeds. |
DeleteResponseList |
deleteAllDeeds()
Deletes all
Deeds in this Campus . |
DeleteResponseList |
deleteDeeds(IdList deedIds)
Deletes deeds for the given
Ids. |
DeleteResponseList |
deleteDeedsForBuilding(Id buildingId)
Deletes all deeds for a building.
|
DeleteResponseList |
deleteDeedsForOwner(Id resourceId)
Deletes all deeds for an owner.
|
DeleteResponseList |
deleteIneffectiveDeedsByDate(DateTime date)
Deletes deeds expired before the given date.
|
DeedBatchFormList |
getDeedFormsForCreate(DeedPeerList peers,
Type[] deedRecordTypes)
Gets the deed forms for creating a bunch of new deeds.
|
DeedBatchFormList |
getDeedFormsForUpdate(IdList deedIds)
Gets the deed forms for updating an existing set of deeds.
|
UpdateResponseList |
updateDeeds(DeedBatchFormList deedForms)
Updates existing deeds.
|
aliasDeed, canCreateDeeds, canCreateDeedWithRecordTypes, canDeleteDeeds, canManageDeedAliases, canUpdateDeeds, createDeed, deleteDeed, getCampus, getCampusId, getDeedFormForCreate, getDeedFormForUpdate, updateDeed
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
DeedBatchFormList getDeedFormsForCreate(DeedPeerList peers, Type[] deedRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- a list of building Ids
deedRecordTypes
- array of deed record types to be included in
each create operation or an empty list if noneNotFoundException
- a buildingId
or
resourceId
is not foundNullArgumentException
- peers
or
deedRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createDeeds(DeedBatchFormList deedForms) throws OperationFailedException, PermissionDeniedException
Deeds.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.deedForms
- the deed formsNullArgumentException
- deedForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeedBatchFormList getDeedFormsForUpdate(IdList deedIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
deedIds
- the Ids
of the Deed
NotFoundException
- a deedId
is not
foundNullArgumentException
- deedIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateDeeds(DeedBatchFormList deedForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.deedForms
- the form containing the elements to be updatedNullArgumentException
- deedForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllDeeds() throws OperationFailedException, PermissionDeniedException
Deeds
in this Campus
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteDeeds(IdList deedIds) throws OperationFailedException, PermissionDeniedException
Ids.
deedIds
- the Ids
of the deeds to deleteNullArgumentException
- deedIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteDeedsForBuilding(Id buildingId) throws OperationFailedException, PermissionDeniedException
buildingId
- a building Id
NullArgumentException
- buildingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteDeedsForOwner(Id resourceId) throws OperationFailedException, PermissionDeniedException
resourceId
- a resource Id
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIneffectiveDeedsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasDeeds(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a Deed
for the purpose of
creating compatibility. The primary Id
of the
Deed
is determined by the provider. The new Id
is an alias to the primary Id.
If the alias is a
pointer to another deed, 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.