Interface BidBatchAdminSession
- All Superinterfaces:
AutoCloseable, BidAdminSession, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes Bids 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
Bid , a BidForm is requested using getBidFormsForCreate()
specifying the desired auction bidder, and record Types or none if
no record Types are needed. Each of the returned BidForms
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
BidForm is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
BidForm corresponds to an attempted transaction.
The BidForms returned from getBidFormsForCreate() may
be linked to the originating request through the peer Ids of the
BidForm . In the case where there may be duplicates, any
BidForm of the same peer Ids may be used for a create operation.
Once a batch of BidForms are submitted for create, a
CreateResponse is returned for each BidForm , although the
ordering is not defined. Only errors that pertain to the entire create
operation are returned from createBids() , errors specific to an
individual BidForm are indicated in the corresponding
CreateResponse . CreateResponses may be linked to the originating
BidForm through the BidForm Id .
For updates, BidForms are requested to the Bid
Id that is to be updated using getBidFormsForUpdate() where the
reference Id in the BidForm may be used to link the
request. Similarly, the BidForm has metadata about the data that
can be updated and it can perform validation before submitting the update.
The BidForm can only be used once for a successful update and
cannot be reused.
Once a batch of BidForms are submitted for update, an
UpdateResponse is returned for each BidForm , although the
ordering is not defined. Only errors that pertain to the entire update
operation are returned from updateBids() , errors specific to an
individual BidForm are indicated in the corresponding
UpdateResponse . UpdateResponses may be linked to the originating
BidForm through the BidForm Id .
The delete operations delete Bids in bulk. To unmap a
Bid from the current AuctionHouse , the
BidAuctionHouseAssignmentSession should be used. These delete operations
attempt to remove the Bid itself thus removing it from all known
AuctionHouse catalogs. Bulk delete operations return the results
in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasBids(AliasRequestList aliasRequests) Adds anIdto aBidfor the purpose of creating compatibility.createBids(BidBatchFormList bidForms) Creates a new set ofBids.Deletes allBidsin thisAuctionHouse.deleteBids(IdList bidIds) Deletes bids for the givenIds.deleteBidsForAuction(Id auctionId) Deletes bids for the given auction.deleteBidsForBidder(Id resourceId) Deletes bids for the given bidder.Deletes bids expired before the given date.getBidFormsForCreate(BidPeerList peers, Type[] bidRecordTypes) Gets the bid forms for creating a bunch of new bids.getBidFormsForUpdate(IdList bidIds) Gets the bid forms for updating an existing set of bids.updateBids(BidBatchFormList bidForms) Updates existing bids.Methods inherited from interface BidAdminSession
aliasBid, canCreateBids, canCreateBidWithRecordTypes, canDeleteBids, canManageBidAliases, canUpdateBids, createBid, deleteBid, getAuctionHouse, getAuctionHouseId, getBidFormForCreate, getBidFormForUpdate, updateBidModifier and TypeMethodDescriptionvoidAdds anIdto aBidfor the purpose of creating compatibility.booleanTests if this user can createBids.booleancanCreateBidWithRecordTypes(Type[] bidRecordTypes) Tests if this user can create a singleBidusing the desired record types.booleanTests if this user can deleteBids.booleanTests if this user can manageIdaliases forBids.booleanTests if this user can updateBids.Creates a newBid.voidDeletes aBid.Gets theAuctionHouseassociated with this session.Gets theAuctionHouseIdassociated with this session.getBidFormForCreate(Id auctionId, Type[] bidRecordTypes) Gets the bid form for creating new bids.getBidFormForUpdate(Id bidId) Gets the bid form for updating an existing bid.voidUpdates an existing bid.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.
-
Method Details
-
getBidFormsForCreate
BidBatchFormList getBidFormsForCreate(BidPeerList peers, Type[] bidRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the bid forms for creating a bunch of new bids. A form is returned for each auction and bidder pair.- Parameters:
peers- the relationship peersbidRecordTypes- array of bid record types to be included in each create operation or an empty list if none- Returns:
- the bid forms
- Throws:
NotFoundException- anauctionIdorbidderIdis not foundNullArgumentException-peersorbidRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createBids
CreateResponseList createBids(BidBatchFormList bidForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofBids. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
bidForms- the bid forms- Returns:
- the create responses
- Throws:
NullArgumentException-bidFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBidFormsForUpdate
BidBatchFormList getBidFormsForUpdate(IdList bidIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the bid forms for updating an existing set of bids. A new bid form should be requested for each update transaction.- Parameters:
bidIds- theIdsof theBid- Returns:
- the bid form
- Throws:
NotFoundException- abidIdis not foundNullArgumentException-bidIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateBids
UpdateResponseList updateBids(BidBatchFormList bidForms) throws OperationFailedException, PermissionDeniedException Updates existing bids. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
bidForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-bidFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllBids
Deletes allBidsin thisAuctionHouse.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteBids
DeleteResponseList deleteBids(IdList bidIds) throws OperationFailedException, PermissionDeniedException Deletes bids for the givenIds.- Parameters:
bidIds- theIdsof the bids to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-bidIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteBidsForAuction
DeleteResponseList deleteBidsForAuction(Id auctionId) throws OperationFailedException, PermissionDeniedException Deletes bids for the given auction.- Parameters:
auctionId- theIdof an auction- Returns:
- the delete responses
- Throws:
NullArgumentException-auctionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteBidsForBidder
DeleteResponseList deleteBidsForBidder(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes bids for the given bidder.- Parameters:
resourceId- theIdof a resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectiveBidsByDate
DeleteResponseList deleteIneffectiveBidsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes bids expired before the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasBids
AliasResponseList aliasBids(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aBidfor the purpose of creating compatibility. The primaryIdof theBidis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another bid, it is reassigned to the given entryId.- 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.
-