OSID Logo
OSID Specifications
bidding package
Version 3.0.0
Release Candidate Preview
Interfaceosid.bidding.BidAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Bids. 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 getBidFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned BidForm 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 the 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.

For updates, BidForms are requested to the Bid Id that is to be updated using getBidFormForUpdate(). 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.

The delete operations delete Bids. 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.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetAuctionHouseId
Description

Gets the AuctionHouse Id associated with this session.

Returnosid.id.Idthe AuctionHouse Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAuctionHouse
Description

Gets the AuctionHouse associated with this session.

Returnosid.bidding.AuctionHousethe auction house
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateBids
Description

Tests if this user can create Bids. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Bid will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Bid creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateBidWithRecordTypes
Description

Tests if this user can create a single Bid using the desired record types. While BiddingManager.getBidRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Bid. Providing an empty array tests if a Bid can be created with no records.

Parametersosid.type.Type[]bidRecordTypesarray of bid record types
Returnboolean true if Bid creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT bidRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBidFormForCreate
Description

Gets the bid form for creating new bids. A new form should be requested for each create transaction.

Parametersosid.id.IdauctionIdan Auction Id
osid.type.Type[]bidRecordTypesarray of bid record types
Returnosid.bidding.BidFormthe bid form
ErrorsNOT_FOUND auctionId is not found
NULL_ARGUMENT auctionId or bidRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBid
Description

Creates a new Bid.

Parametersosid.bidding.BidFormbidFormthe form for this Bid
Returnosid.bidding.Bidthe new Bid
ErrorsILLEGAL_STATE bidForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT bidForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED bidForm did not originate from getBidFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBids
Description

Tests if this user can update Bids. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Bid will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Bid modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetBidFormForUpdate
Description

Gets the bid form for updating an existing bid. A new bid form should be requested for each update transaction.

Parametersosid.id.IdbidIdthe Id of the Bid
Returnosid.bidding.BidFormthe bid form
ErrorsNOT_FOUND bidId is not found
NULL_ARGUMENT bidId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBid
Description

Updates an existing bid.

Parametersosid.bidding.BidFormbidFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE bidForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT bidForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED bidForm did not originate from getBidFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteBids
Description

Tests if this user can delete Bids. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Bid will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Bid deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteBid
Description

Deletes a Bid.

Parametersosid.id.IdbidIdthe Id of the Bid to remove
ErrorsNOT_FOUND bidId not found
NULL_ARGUMENT bidId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBidAliases
Description

Tests if this user can manage Id aliases for Bids. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Bid aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasBid
Description

Adds an Id to a Bid for the purpose of creating compatibility. The primary Id of the Bid is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another bid, it is reassigned to the given bid Id.

Parametersosid.id.IdbidIdthe Id of a Bid
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND bidId not found
NULL_ARGUMENT bidId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.