public interface PriceScheduleBatchAdminSession extends PriceScheduleAdminSession
This session creates, updates, and deletes PriceSchedules
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
PriceSchedule,
a PriceScheduleForm
is requested
using getPriceScheduleFormsForCreate()
specifying the
desired record Types
or none if no record Types
are needed. Each of the returned PriceScheduleForms
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
PriceScheduleForm
is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each PriceScheduleForm
corresponds to an
attempted transaction.
The PriceScheduleForms
returned from
getPriceScheduleFormsForCreate()
may be linked to the originating
request through the peer Ids
of the
PriceScheduleForm.
In the case where there may be duplicates, any
PriceScheduleForm
of the same peer Ids
may
be used for a create operation.
Once a batch of PriceScheduleForms
are submitted for
create, a CreateResponse
is returned for each
PriceScheduleForm,
although the ordering is not defined. Only
errors that pertain to the entire create operation are returned from
createPriceSchedules(),
errors specific to an individual
PriceScheduleForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating PriceScheduleForm
through the
PriceScheduleForm
Id
.
For updates, PriceScheduleForms
are requested to the
PriceSchedule
Id
that is to be updated using
getPriceScheduleFormsForUpdate()
where the reference
Id
in the PriceScheduleForm
may be used to link the
request. Similarly, the PriceScheduleForm
has metadata
about the data that can be updated and it can perform validation before
submitting the update. The PriceScheduleForm
can only be
used once for a successful update and cannot be reused.
Once a batch of PriceScheduleForms
are submitted for
update, an UpdateResponse
is returned for each
PriceScheduleForm,
although the ordering is not defined. Only
errors that pertain to the entire update operation are returned from
updatePriceSchedules(),
errors specific to an individual
PriceScheduleForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating PriceScheduleForm
through the
PriceScheduleForm
Id.
The delete operations delete PriceSchedules
in bulk. To
unmap a PriceSchedule
from the current Store,
the PriceScheduleStoreAssignmentSession
should be
used. These delete operations attempt to remove the PriceSchedule
itself thus removing it from all known Store
catalogs. Bulk delete operations return the results in
DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasPrices(AliasRequestList aliasRequests)
Adds an
Id to a Price for the purpose of
creating compatibility. |
AliasResponseList |
aliasPriceSchedules(AliasRequestList aliasRequests)
Adds an
Id to a PriceSchedule for the
purpose of creating compatibility. |
CreateResponseList |
createPrices(PriceBatchFormList priceForms)
Creates a new set of
Prices. |
CreateResponseList |
createPriceSchedules(PriceScheduleBatchFormList priceScheduleForms)
Creates a new set of
PriceSchedules. |
DeleteResponseList |
deleteAllPrices()
Deletes all
Prices in this Store . |
DeleteResponseList |
deleteAllPriceSchedules()
Deletes all
PriceSchedules in this Store
. |
DeleteResponseList |
deletePrices(IdList priceIds)
Deletes prices for the given
Ids. |
DeleteResponseList |
deletePriceSchedules(IdList priceScheduleIds)
Deletes price schedules for the given
Ids. |
DeleteResponseList |
deletePricesForPriceSchedule(Id priceScheduleId)
Deletes prices for the given price schedule.
|
PriceBatchFormList |
getPriceFormsForCreate(IdList priceScheduleIds,
Type[] priceScheduleRecordTypes)
Gets the price forms for creating a bunch of new prices.
|
PriceBatchFormList |
getPriceFormsForUpdate(IdList priceIds)
Gets the price forms for updating an existing set of prices.
|
PriceScheduleBatchFormList |
getPriceScheduleFormsForCreate(long number,
Type[] priceScheduleRecordTypes)
Gets the price schedule forms for creating a bunch of new price
schedules.
|
PriceScheduleBatchFormList |
getPriceScheduleFormsForUpdate(IdList priceScheduleIds)
Gets the price schedule forms for updating an existing set of price
schedules.
|
UpdateResponseList |
updatePrices(PriceBatchFormList priceForms)
Updates existing prices.
|
UpdateResponseList |
updatePriceSchedules(PriceScheduleBatchFormList priceScheduleForms)
Updates existing price schedules.
|
aliasPrice, aliasPriceSchedule, canCreatePrices, canCreatePriceSchedules, canCreatePriceScheduleWithRecordTypes, canCreatePriceWithRecordTypes, canDeletePrices, canDeletePriceSchedules, canManagePriceAliases, canManagePriceScheduleAliases, canUpdatePrices, canUpdatePriceSchedules, createPrice, createPriceSchedule, deletePrice, deletePriceSchedule, getPriceFormForCreate, getPriceFormForUpdate, getPriceScheduleFormForCreate, getPriceScheduleFormForUpdate, getStore, getStoreId, updatePrice, updatePriceSchedule
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
PriceScheduleBatchFormList getPriceScheduleFormsForCreate(long number, Type[] priceScheduleRecordTypes) throws OperationFailedException, PermissionDeniedException
number
- the number of forms to retrievepriceScheduleRecordTypes
- array of price schedule record types
to be included in each create operation or an empty list if
noneNullArgumentException
- priceScheduleRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createPriceSchedules(PriceScheduleBatchFormList priceScheduleForms) throws OperationFailedException, PermissionDeniedException
PriceSchedules.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.priceScheduleForms
- the price schedule formsNullArgumentException
- priceScheduleForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PriceScheduleBatchFormList getPriceScheduleFormsForUpdate(IdList priceScheduleIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
priceScheduleIds
- the Ids
of the
PriceSchedules
NotFoundException
- a priceScheduleId
is
not foundNullArgumentException
- priceScheduleIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updatePriceSchedules(PriceScheduleBatchFormList priceScheduleForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.priceScheduleForms
- the form containing the elements to be
updatedNullArgumentException
- priceScheduleForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllPriceSchedules() throws OperationFailedException, PermissionDeniedException
PriceSchedules
in this Store
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deletePriceSchedules(IdList priceScheduleIds) throws OperationFailedException, PermissionDeniedException
Ids.
priceScheduleIds
- the Ids
of the price schedules
to deleteNullArgumentException
- priceScheduleIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasPriceSchedules(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a PriceSchedule
for the
purpose of creating compatibility. The primary Id
of
the PriceSchedule
is determined by the provider. The
new Id
is an alias to the primary Id.
If
the alias is a pointer to another price schedule, it is reassigned to
the given price schedule Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PriceBatchFormList getPriceFormsForCreate(IdList priceScheduleIds, Type[] priceScheduleRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
priceScheduleIds
- a list of price schedule Ids
priceScheduleRecordTypes
- array of price schedule record types
to be included in each create operation or an empty list if
noneNotFoundException
- a priceScheduleId
is
not foundNullArgumentException
- priceScheduleId
or priceScheduleRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createPrices(PriceBatchFormList priceForms) throws OperationFailedException, PermissionDeniedException
Prices.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.priceForms
- the price formsNullArgumentException
- priceForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PriceBatchFormList getPriceFormsForUpdate(IdList priceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
priceIds
- the Ids
of the Prices
NotFoundException
- a priceId
is not
foundNullArgumentException
- priceIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updatePrices(PriceBatchFormList priceForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.priceForms
- the forms containing the elements to be updatedNullArgumentException
- priceForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllPrices() throws OperationFailedException, PermissionDeniedException
Prices
in this Store
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deletePrices(IdList priceIds) throws OperationFailedException, PermissionDeniedException
Ids.
priceIds
- the Ids
of the price to deleteNullArgumentException
- priceIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deletePricesForPriceSchedule(Id priceScheduleId) throws OperationFailedException, PermissionDeniedException
priceScheduleId
- the Id
ofa price scheduleNullArgumentException
- priceScheduleId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasPrices(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a Price
for the purpose of
creating compatibility. The primary Id
of the
Price
is determined by the provider. The new Id
is an alias to the primary Id.
If the alias is a
pointer to another price, it is reassigned to the given price
Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.