Interface BidEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BidEnablerAdminSession extends OsidSession

This session creates, updates, and deletes BidEnablers . 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 BidEnabler , a BidEnablerForm is requested using getBidEnablerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned BidEnablerForm 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 BidEnablerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each BidEnablerForm corresponds to an attempted transaction.

For updates, BidEnablerForms are requested to the BidEnabler Id that is to be updated using getBidEnablerFormForUpdate() . Similarly, the BidEnablerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The BidEnablerForm can only be used once for a successful update and cannot be reused.

The delete operations delete BidEnablers . To unmap a BidEnabler from the current AuctionHouse , the BidEnablerAuctionHouseAssignmentSession should be used. These delete operations attempt to remove the BidEnabler 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 .

  • Method Details

    • getAuctionHouseId

      Id getAuctionHouseId()
      Gets the AuctionHouse Id associated with this session.
      Returns:
      the AuctionHouse Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getAuctionHouse

      Gets the AuctionHouse associated with this session.
      Returns:
      the auction house
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateBidEnablers

      boolean canCreateBidEnablers()
      Tests if this user can create BidEnablers . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a BidEnabler will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if BidEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateBidEnablerWithRecordTypes

      boolean canCreateBidEnablerWithRecordTypes(Type[] bidEnablerRecordTypes)
      Tests if this user can create a single BidEnabler using the desired record types. While BiddingRulesManager.getBidEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific BidEnabler . Providing an empty array tests if a BidEnabler can be crea ted with no records.
      Parameters:
      bidEnablerRecordTypes - array of bid enabler record types
      Returns:
      true if BidEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - bidEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getBidEnablerFormForCreate

      BidEnablerForm getBidEnablerFormForCreate(Type[] bidEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the bid enabler form for creating new bid enablers. A new form should be requested for each create transaction.
      Parameters:
      bidEnablerRecordTypes - array of bid enabler record types
      Returns:
      the bid enabler form
      Throws:
      NullArgumentException - bidEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createBidEnabler

      Creates a new BidEnabler .
      Parameters:
      bidEnablerForm - the form for this BidEnabler
      Returns:
      the new BidEnabler
      Throws:
      IllegalStateException - bidEnablerForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - bidEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - bidEnablerForm did not originate from getBidEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateBidEnablers

      boolean canUpdateBidEnablers()
      Tests if this user can update BidEnablers . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a BidEnabler will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if BidEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBidEnablerFormForUpdate

      BidEnablerForm getBidEnablerFormForUpdate(Id bidEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the bid enabler form for updating an existing bid enabler. A new bid enabler form should be requested for each update transaction.
      Parameters:
      bidEnablerId - the Id of the BidEnabler
      Returns:
      the bid enabler form
      Throws:
      NotFoundException - bidEnablerId is not found
      NullArgumentException - bidEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateBidEnabler

      void updateBidEnabler(BidEnablerForm bidEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing bid enabler.
      Parameters:
      bidEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - bidEnablerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - bidEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - bidEnablerForm did not originate from getBidEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteBidEnablers

      boolean canDeleteBidEnablers()
      Tests if this user can delete BidEnablers . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a BidEnabler will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if BidEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteBidEnabler

      void deleteBidEnabler(Id bidEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a BidEnabler .
      Parameters:
      bidEnablerId - the Id of the BidEnabler to remove
      Throws:
      NotFoundException - bidEnablerId not found
      NullArgumentException - bidEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageBidEnablerAliases

      boolean canManageBidEnablerAliases()
      Tests if this user can manage Id aliases for BidEnablers 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.
      Returns:
      false if BidEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasBidEnabler

      void aliasBidEnabler(Id bidEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a BidEnabler for the purpose of creating compatibility. The primary Id of the BidEnabler 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 enabler, it is reassigned to the given bid enabler Id .
      Parameters:
      bidEnablerId - the Id of a BidEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - bidEnablerId not found
      NullArgumentException - bidEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.