Fluent builder for creating a new auction with optional images, access restrictions, bidding rules and page body content. Obtained from AuctionManager.newAuctionBuilder and finished by calling build, which persists the configured auction.

Group: Builders


Properties

PropertyReturnsDescription
activeAuctionBuilderMarks the auction as active, so build gives it ACTIVE status rather than the default DRAFT.

Methods

name(String name) · title(String title) · type(String type) · pointsBucket(Reward pointsBucket) · isActive() · group(Group group) · organisation(Organisation org) · startDate(Date startDate) · endDate(Date endDate) · description(String description) · body(String body) · image(String name, String hash) · website(Website website) · bidFee(BigDecimal bidFee) · startValue(BigDecimal startValue) · incrementValue(BigDecimal incrementValue) · sku(String sku) · auctionSet(AuctionSet auctionSet) · build()

name(String name)

Returns: AuctionBuilder

Sets the path-safe, unique name for the auction. It forms the auction's URL segment and is the key build checks for an existing auction in the current organisation, so it must not already be in use.

ParameterDescription
namethe auction's unique name

title(String title)

Returns: AuctionBuilder

Sets the human readable title shown for the auction in listings and on its page.

ParameterDescription
titlethe auction's display title

type(String type)

Returns: AuctionBuilder

Sets the auction type, which decides how the winning bid is chosen, for example Auction.HighestBidAuction or Auction.LowestUniqueBidAuction. If left blank, build falls back to Auction.HighestBidAuction.

ParameterDescription
typethe auction type name

pointsBucket(Reward pointsBucket)

Returns: AuctionBuilder

Sets the reward used as the auction's points bucket, which is the points balance bids are placed against. Only applied at build time if the reward has a points type.

ParameterDescription
pointsBucketthe reward acting as the auction's points bucket

isActive()

Returns: AuctionBuilder

Marks the auction as active, so build gives it ACTIVE status rather than the default DRAFT.

group(Group group)

Returns: AuctionBuilder

Adds a group whose members are allowed to access the auction. Call it more than once to allow several groups. The groups are attached to the auction when build is called.

ParameterDescription
groupthe group to grant access to, must not be null

organisation(Organisation org)

Returns: AuctionBuilder

Adds an organisation that is allowed to access this auction.

ParameterDescription
orgthe organisation to add

startDate(Date startDate)

Returns: AuctionBuilder

Sets the date and time from which bidding on the auction is open.

ParameterDescription
startDatethe auction's start date

endDate(Date endDate)

Returns: AuctionBuilder

Sets the date and time at which bidding on the auction closes and the winner is settled.

ParameterDescription
endDatethe auction's end date

description(String description)

Returns: AuctionBuilder

Sets the short summary text shown for the auction. Build rejects a description longer than 2048 characters.

ParameterDescription
descriptionthe auction's description, at most 2048 characters

body(String body)

Returns: AuctionBuilder

Sets the HTML content that build saves as the auction's index.html page under the auctions folder. Leave it unset to create the auction without page content.

ParameterDescription
bodythe HTML body content for the auction's page

image(String name, String hash)

Returns: AuctionBuilder

Adds an image to the auction, identified by the content hash of its bytes. Call it more than once to add several images; they are attached to the auction when build is called.

ParameterDescription
namethe image's file name, must not be blank
hashthe content hash of the image data, must not be blank

website(Website website)

Returns: AuctionBuilder

Sets the website the auction is created against, which is the site its pages are served from.

ParameterDescription
websitethe website hosting the auction

bidFee(BigDecimal bidFee)

Returns: AuctionBuilder

Sets the fee charged to place a bid on the auction.

ParameterDescription
bidFeethe bid fee to charge

startValue(BigDecimal startValue)

Returns: AuctionBuilder

Sets the minimum opening bid value for the auction.

ParameterDescription
startValuethe starting bid value

incrementValue(BigDecimal incrementValue)

Returns: AuctionBuilder

Sets the minimum amount each new bid must exceed the previous bid by.

ParameterDescription
incrementValuethe minimum bid increment value

sku(String sku)

Returns: AuctionBuilder

Sets the stock-keeping unit code for the item being auctioned.

ParameterDescription
skuthe SKU to set

auctionSet(AuctionSet auctionSet)

Returns: AuctionBuilder

Assigns the auction to an auction set, used to group related auctions together.

ParameterDescription
auctionSetthe auction set to assign the auction to

build()

Returns: Auction

Creates and persists the auction configured on this builder, including its images, groups, organisations and page body if any were set. Fails if an auction with the same name already exists in the current organisation.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.