Interface PriceScheduleBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, 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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasPrices(AliasRequestList aliasRequests) Adds anIdto aPricefor the purpose of creating compatibility.aliasPriceSchedules(AliasRequestList aliasRequests) Adds anIdto aPriceSchedulefor the purpose of creating compatibility.createPrices(PriceBatchFormList priceForms) Creates a new set ofPrices.createPriceSchedules(PriceScheduleBatchFormList priceScheduleForms) Creates a new set ofPriceSchedules.Deletes allPricesin thisStore.Deletes allPriceSchedulesin thisStore.deletePrices(IdList priceIds) Deletes prices for the givenIds.deletePriceSchedules(IdList priceScheduleIds) Deletes price schedules for the givenIds.deletePricesForPriceSchedule(Id priceScheduleId) Deletes prices for the given price schedule.getPriceFormsForCreate(IdList priceScheduleIds, Type[] priceScheduleRecordTypes) Gets the price forms for creating a bunch of new prices.getPriceFormsForUpdate(IdList priceIds) Gets the price forms for updating an existing set of prices.getPriceScheduleFormsForCreate(long number, Type[] priceScheduleRecordTypes) Gets the price schedule forms for creating a bunch of new price schedules.getPriceScheduleFormsForUpdate(IdList priceScheduleIds) Gets the price schedule forms for updating an existing set of price schedules.updatePrices(PriceBatchFormList priceForms) Updates existing prices.updatePriceSchedules(PriceScheduleBatchFormList priceScheduleForms) Updates existing price schedules.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 PriceScheduleAdminSession
aliasPrice, aliasPriceSchedule, canCreatePrices, canCreatePriceSchedules, canCreatePriceScheduleWithRecordTypes, canCreatePriceWithRecordTypes, canDeletePrices, canDeletePriceSchedules, canManagePriceAliases, canManagePriceScheduleAliases, canUpdatePrices, canUpdatePriceSchedules, createPrice, createPriceSchedule, deletePrice, deletePriceSchedule, getPriceFormForCreate, getPriceFormForUpdate, getPriceScheduleFormForCreate, getPriceScheduleFormForUpdate, getStore, getStoreId, updatePrice, updatePriceScheduleModifier and TypeMethodDescriptionvoidaliasPrice(Id priceId, Id aliasId) Adds anIdto aPricefor the purpose of creating compatibility.voidaliasPriceSchedule(Id priceScheduleId, Id aliasId) Adds anIdto aPriceSchedulefor the purpose of creating compatibility.booleancanCreatePrices(Id priceScheduleId) Tests if this user can createPricesfor aPriceSchedule.booleanTests if this user can createPriceSchedules.booleancanCreatePriceScheduleWithRecordTypes(Type[] priceScheduleRecordTypes) Tests if this user can create a singlePriceScheduleusing the desired record types.booleancanCreatePriceWithRecordTypes(Id priceScheduleId, Type[] priceRecordTypes) Tests if this user can create a singlePriceusing the desired record types.booleancanDeletePrices(Id priceScheduleId) Tests if this user can delete prices.booleanTests if this user can deletePriceSchedulesA return of true does not guarantee successful authorization.booleanTests if this user can manageIdaliases forPrices.booleanTests if this user can manageIdaliases forPriceSchedules.booleancanUpdatePrices(Id priceScheduleId) Tests if this user can updatePrices.booleanTests if this user can updatePriceSchedules.createPrice(PriceForm priceForm) Creates a newPrice.createPriceSchedule(PriceForm priceScheduleForm) Creates a newPriceSchedule.voiddeletePrice(Id priceId) Deletes aPrice.voiddeletePriceSchedule(Id priceScheduleId) Deletes aPriceSchedule.getPriceFormForCreate(Id priceScheduleId, Type[] priceRecordTypes) Gets the price form for creating new prices.getPriceFormForUpdate(Id priceId) Gets the price form for updating an existing price.getPriceScheduleFormForCreate(Type[] priceScheduleRecordTypes) Gets the price schedule form for creating new prices.getPriceScheduleFormForUpdate(Id priceScheduleId) Gets the price schedule form for updating an existing price schedule.getStore()Gets theStoreassociated with this session.Gets theStoreIdassociated with this session.voidupdatePrice(PriceForm priceForm) Updates an existing price.voidupdatePriceSchedule(PriceScheduleForm priceScheduleForm) Updates an existing price schedule.
-
Method Details
-
getPriceScheduleFormsForCreate
PriceScheduleBatchFormList getPriceScheduleFormsForCreate(long number, Type[] priceScheduleRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the price schedule forms for creating a bunch of new price schedules.- Parameters:
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 none- Returns:
- the price schedule forms
- Throws:
NullArgumentException-priceScheduleRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createPriceSchedules
CreateResponseList createPriceSchedules(PriceScheduleBatchFormList priceScheduleForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofPriceSchedules. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
priceScheduleForms- the price schedule forms- Returns:
- the create responses
- Throws:
NullArgumentException-priceScheduleFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPriceScheduleFormsForUpdate
PriceScheduleBatchFormList getPriceScheduleFormsForUpdate(IdList priceScheduleIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the price schedule forms for updating an existing set of price schedules. A new price schedule form should be requested for each update transaction.- Parameters:
priceScheduleIds- theIdsof thePriceSchedules- Returns:
- the price schedule form
- Throws:
NotFoundException- apriceScheduleIdis not foundNullArgumentException-priceScheduleIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePriceSchedules
UpdateResponseList updatePriceSchedules(PriceScheduleBatchFormList priceScheduleForms) throws OperationFailedException, PermissionDeniedException Updates existing price schedules. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
priceScheduleForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-priceScheduleFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllPriceSchedules
DeleteResponseList deleteAllPriceSchedules() throws OperationFailedException, PermissionDeniedExceptionDeletes allPriceSchedulesin thisStore.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deletePriceSchedules
DeleteResponseList deletePriceSchedules(IdList priceScheduleIds) throws OperationFailedException, PermissionDeniedException Deletes price schedules for the givenIds.- Parameters:
priceScheduleIds- theIdsof the price schedules to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-priceScheduleIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasPriceSchedules
AliasResponseList aliasPriceSchedules(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aPriceSchedulefor the purpose of creating compatibility. The primaryIdof thePriceScheduleis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another price schedule, it is reassigned to the given price scheduleId.- 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.
-
getPriceFormsForCreate
PriceBatchFormList getPriceFormsForCreate(IdList priceScheduleIds, Type[] priceScheduleRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the price forms for creating a bunch of new prices. A form is returned for each supplied price schedule.- Parameters:
priceScheduleIds- a list of price scheduleIdspriceScheduleRecordTypes- array of price schedule record types to be included in each create operation or an empty list if none- Returns:
- the price schedule forms
- Throws:
NotFoundException- apriceScheduleIdis not foundNullArgumentException-priceScheduleIdorpriceScheduleRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createPrices
CreateResponseList createPrices(PriceBatchFormList priceForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofPrices. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
priceForms- the price forms- Returns:
- the create responses
- Throws:
NullArgumentException-priceFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPriceFormsForUpdate
PriceBatchFormList getPriceFormsForUpdate(IdList priceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the price forms for updating an existing set of prices. A new price form should be requested for each update transaction.- Parameters:
priceIds- theIdsof thePrices- Returns:
- the price forms
- Throws:
NotFoundException- apriceIdis not foundNullArgumentException-priceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePrices
UpdateResponseList updatePrices(PriceBatchFormList priceForms) throws OperationFailedException, PermissionDeniedException Updates existing prices. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
priceForms- the forms containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-priceFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllPrices
Deletes allPricesin thisStore.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deletePrices
DeleteResponseList deletePrices(IdList priceIds) throws OperationFailedException, PermissionDeniedException Deletes prices for the givenIds.- Parameters:
priceIds- theIdsof the price to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-priceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deletePricesForPriceSchedule
DeleteResponseList deletePricesForPriceSchedule(Id priceScheduleId) throws OperationFailedException, PermissionDeniedException Deletes prices for the given price schedule.- Parameters:
priceScheduleId- theIdofa price schedule- Returns:
- the delete responses
- Throws:
NullArgumentException-priceScheduleIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasPrices
AliasResponseList aliasPrices(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aPricefor the purpose of creating compatibility. The primaryIdof thePriceis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another price, it is reassigned to the given priceId.- 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.
-