public interface ParameterBatchAdminSession extends ParameterAdminSession
This session creates, updates, and deletes Parameters
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
Parameter,
a ParameterForm
is requested using
getParameterFormsForCreate()
specifying the desired record
Types
or none if no record Types
are needed.
Each of the returned ParameterForms
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 ParameterForm
is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
ParameterForm
corresponds to an attempted transaction.
The ParameterForms
returned from
getParameterFormsForCreate()
may be linked to the originating
request through the peer Ids
of the ParameterForm.
In the case where there may be duplicates, any
ParameterForm
of the same peer Ids
may be used for
a create operation.
Once a batch of ParameterForms
are submitted for
create, a CreateResponse
is returned for each
ParameterForm,
although the ordering is not defined. Only errors
that pertain to the entire create operation are returned from
createParameters(),
errors specific to an individual
ParameterForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating ParameterForm
through the
ParameterForm
Id
.
For updates, ParameterForms
are requested to the
Parameter
Id
that is to be updated using
getParameterFormsForUpdate()
where the reference Id
in the ParameterForm
may be used to link the request.
Similarly, the ParameterForm
has metadata about the data
that can be updated and it can perform validation before submitting the
update. The ParameterForm
can only be used once for a
successful update and cannot be reused.
Once a batch of ParameterForms
are submitted for
update, an UpdateResponse
is returned for each
ParameterForm,
although the ordering is not defined. Only errors
that pertain to the entire update operation are returned from
updateParameters(),
errors specific to an individual
ParameterForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating ParameterForm
through the
ParameterForm
Id.
The delete operations delete Parameters
in bulk. To
unmap a Parameter
from the current Configuration,
the ParameterConfigurationAssignmentSession
should
be used. These delete operations attempt to remove the Parameter
itself thus removing it from all known Configuration
catalogs. Bulk delete operations return the results in
DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasParameters(AliasRequestList aliasRequests)
Adds an
Id to a Parameter for the
purpose of creating compatibility. |
CreateResponseList |
createParameters(ParameterBatchFormList parameterForms)
Creates a new set of
Parameters. |
DeleteResponseList |
deleteAllParameters()
Deletes all
Parameters in this Configuration
. |
DeleteResponseList |
deleteParameters(IdList parameterIds)
Deletes parameters for the given
Ids. |
ParameterBatchFormList |
getParameterFormsForCreate(long number,
Type[] parameterRecordTypes)
Gets the parameter forms for creating a bunch of new parameters.
|
ParameterBatchFormList |
getParameterFormsForUpdate(IdList parameterIds)
Gets the parameter forms for updating an existing set of parameters.
|
UpdateResponseList |
updateParameters(ParameterBatchFormList parameterForms)
Updates existing parameters.
|
aliasParameter, canCreateParameters, canCreateParameterWithRecordTypes, canDeleteParameters, canManageParameterAliases, canUpdateParameters, createParameter, deleteParameter, getConfiguration, getConfigurationId, getParameterFormForCreate, getParameterFormForUpdate, updateParameter
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
ParameterBatchFormList getParameterFormsForCreate(long number, Type[] parameterRecordTypes) throws OperationFailedException, PermissionDeniedException
number
- the number of forms to retrieveparameterRecordTypes
- array of parameter record types to be
included in each create operation or an empty list if noneNullArgumentException
- parameterRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createParameters(ParameterBatchFormList parameterForms) throws OperationFailedException, PermissionDeniedException
Parameters.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.parameterForms
- the parameter formsNullArgumentException
- parameterForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ParameterBatchFormList getParameterFormsForUpdate(IdList parameterIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
parameterIds
- the Ids
of the Parameter
NotFoundException
- a parameterId
is not
foundNullArgumentException
- parameterIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateParameters(ParameterBatchFormList parameterForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.parameterForms
- the form containing the elements to be updatedNullArgumentException
- parameterForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllParameters() throws OperationFailedException, PermissionDeniedException
Parameters
in this Configuration
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteParameters(IdList parameterIds) throws OperationFailedException, PermissionDeniedException
Ids.
parameterIds
- the Ids
of the parameters to
deleteNullArgumentException
- parameterIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasParameters(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a Parameter
for the
purpose of creating compatibility. The primary Id
of
the Parameter
is determined by the provider. The new
Id
is an alias to the primary Id.
If the
alias is a pointer to another parameter, it is reassigned to the given
parameter Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.