public interface SystemBatchAdminSession extends SystemAdminSession
This session creates, updates, and deletes Systems
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
System,
a SystemForm
is requested using
getSystemFormsForCreate()
specifying the desired record
Types
or none if no record Types
are needed. Each
of the returned SystemForms
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 SystemForm
is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
SystemForm
corresponds to an attempted transaction.
The SystemForms
returned from
getSystemFormsForCreate()
may be linked to the originating request
through the peer Ids
of the SystemForm.
In
the case where there may be duplicates, any SystemForm
of
the same peer Ids
may be used for a create operation.
Once a batch of SystemForms
are submitted for create, a
CreateResponse
is returned for each SystemForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createSystem(),
errors specific to an individual SystemForm
are
indicated in the corresponding CreateResponse.
CreateResponses
may be linked to the originating SystemForm
through the SystemForm
Id
.
For updates, SystemForms
are requested to the
SystemForm
Id
that is to be updated using
getSystemFormsForUpdate()
where the reference Id
in
the SystemForm
may be used to link the request. Similarly,
the SystemForm
has metadata about the data that can be
updated and it can perform validation before submitting the update. The
SystemForm
can only be used once for a successful update
and cannot be reused.
Once a batch of SystemForms
are submitted for update,
an UpdateResponse
is returned for each SystemForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updateSystem(),
errors specific to an individual SystemForm
are
indicated in the corresponding UpdateResponse.
UpdateResponses
may be linked to the originating SystemForm
through the SystemForm
Id.
The delete operations delete Systems
in bulk. Bulk
delete operations return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasSystems(AliasRequestList aliasRequests)
Adds an
Id to a System for the purpose
of creating compatibility. |
CreateResponseList |
createSystems(SystemBatchFormList systemForms)
Creates a new set of
Systems. |
DeleteResponseList |
deleteAllSystems()
Deletes all
Systems. |
DeleteResponseList |
deleteSystems(IdList systemIds)
Deletes systems for the given
Ids. |
SystemBatchFormList |
getSystemFormsForCreate(long number,
Type[] systemRecordTypes)
Gets the system forms for creating a bunch of new systems.
|
SystemBatchFormList |
getSystemFormsForUpdate(IdList systemIds)
Gets the system forms for updating an existing set of systems.
|
UpdateResponseList |
updateSystems(SystemBatchFormList systemForms)
Updates existing system.
|
aliasSystem, canCreateSystems, canCreateSystemWithRecordTypes, canDeleteSystems, canManageSystemAliases, canUpdateSystems, createSystem, deleteSystem, getSystemFormForCreate, getSystemFormForUpdate, updateSystem
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
SystemBatchFormList getSystemFormsForCreate(long number, Type[] systemRecordTypes) throws OperationFailedException, PermissionDeniedException
number
- the number of forms to retrievesystemRecordTypes
- array of system record types to be included
in each create operation or an empty list if noneNullArgumentException
- systemRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createSystems(SystemBatchFormList systemForms) throws OperationFailedException, PermissionDeniedException
Systems.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.systemForms
- the system formsNullArgumentException
- systemForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. SystemBatchFormList getSystemFormsForUpdate(IdList systemIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
systemIds
- the Ids
of the Systems
NotFoundException
- a systemId
is not
foundNullArgumentException
- systemIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateSystems(SystemBatchFormList systemForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.systemForms
- the form containing the elements to be updatedNullArgumentException
- systemForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllSystems() throws OperationFailedException, PermissionDeniedException
Systems.
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteSystems(IdList systemIds) throws OperationFailedException, PermissionDeniedException
Ids.
systemIds
- the Ids
of the systems to deleteNullArgumentException
- systemIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasSystems(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a System
for the purpose
of creating compatibility. The primary Id
of the
System
is determined by the provider. The new Id
is an alias to the primary Id.
If the alias is
a pointer to another system, it is reassigned to the given system
Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.