Interface BidAuctionHouseAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BidAuctionHouseAssignmentSession extends OsidSession

This session provides methods to re-assign Bids to AuctionHouse mappings. A Bid may appear in multiple AuctionHouse objects and removing the last reference to a Bid is the equivalent of deleting it. Each AuctionHouse may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Bid to another AuctionHouse is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignBids

      boolean canAssignBids()
      Tests if this user can alter bid/auction house mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known item methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignBidsToAuctionHouse

      boolean canAssignBidsToAuctionHouse(Id auctionHouseId)
      Tests if this user can alter bid/auction house mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known item methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      auctionHouseId - the Id of the AuctionHouse
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - auctionHouseId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableAuctionHouseIds

      IdList getAssignableAuctionHouseIds(Id auctionHouseId) throws OperationFailedException
      Gets a list of auction houses including and under the given auction house node in which any bid can be assigned.
      Parameters:
      auctionHouseId - the Id of the AuctionHouse
      Returns:
      list of assignable auction house Ids
      Throws:
      NullArgumentException - auctionHouseId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableAuctionHouseIdsForBid

      IdList getAssignableAuctionHouseIdsForBid(Id auctionHouseId, Id bidId) throws OperationFailedException
      Gets a list of auction houses including and under the given auction house node in which a specific bid can be assigned.
      Parameters:
      auctionHouseId - the Id of the AuctionHouse
      bidId - the Id of the Bid
      Returns:
      list of assignable auction house Ids
      Throws:
      NullArgumentException - auctionHouseId or bidId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignBidToAuctionHouse

      void assignBidToAuctionHouse(Id bidId, Id auctionHouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Bid to an AuctionHouse .
      Parameters:
      bidId - the Id of the Bid
      auctionHouseId - the Id of the AuctionHouse
      Throws:
      AlreadyExistsException - bidId is already assigned tio auctionHouseId
      NotFoundException - bidId or auctionHouseId not found
      NullArgumentException - bidId or auctionHouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignBidFromAuctionHouse

      void unassignBidFromAuctionHouse(Id bidId, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Bid from an AuctionHouse .
      Parameters:
      bidId - the Id of the Bid
      auctionHouseId - the Id of the AuctionHouse
      Throws:
      NotFoundException - bidId or auctionHouseId not found or bidId not assigned to auctionHouseId
      NullArgumentException - bidId or auctionHouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignBidToAuctionHouse

      void reassignBidToAuctionHouse(Id bidId, Id fromAuctionHouseId, Id toAuctionHouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Bid from one AuctionHouse to another. Mappings to other AuctionHouses are unaffected.
      Parameters:
      bidId - the Id of the Bid
      fromAuctionHouseId - the Id of the current AuctionHouse
      toAuctionHouseId - the Id of the destination AuctionHouse
      Throws:
      AlreadyExistsException - bidId already assigned to toAuctionHouseId
      NotFoundException - bidId, fromAuctionHouseId , or toAuctionHouseId not found or bidId not mapped to fromAuctionHouseId
      NullArgumentException - bidId, fromAuctionHouseId , or toAuctionHouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.