public interface AuctionHouseAdminSession extends OsidSession
This session creates, updates, and deletes AuctionHouses.
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 an
AuctionHouse,
an AuctionHouseForm
is
requested using getAuctionHouseFormForCreate()
specifying
the desired record Types
or none if no record Types
are needed. The returned AuctionHouseForm
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
AuctionHouseForm
is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each AuctionHouseForm
corresponds to an
attempted transaction.
For updates, AuctionHouseForms
are requested to the
AuctionHouse
Id
that is to be updated using
getAuctionHouseFormForUpdate().
Similarly, the
AuctionHouseForm
has metadata about the data that can be updated
and it can perform validation before submitting the update. The
AuctionHouseForm
can only be used once for a successful update and
cannot be reused.
The delete operations delete AuctionHouses.
This
session includes an Id
aliasing mechanism to assign an
external Id
to an internally assigned Id.
Modifier and Type | Method and Description |
---|---|
void |
aliasAuctionHouse(Id auctionHouseId,
Id aliasId)
Adds an
Id to an AuctionHouse for the
purpose of creating compatibility. |
boolean |
canCreateAuctionHouses()
Tests if this user can create
AuctionHouses. |
boolean |
canCreateAuctionHouseWithRecordTypes(Type[] auctionHouseRecordTypes)
Tests if this user can create a single
AuctionHouse
using the desired record types. |
boolean |
canDeleteAuctionHouses()
Tests if this user can delete
AuctionHouses. |
boolean |
canManageAuctionHouseAliases()
Tests if this user can manage
Id aliases for
Auction Houses. |
boolean |
canUpdateAuctionHouses()
Tests if this user can update
Auction Houses. |
AuctionHouse |
createAuctionHouse(AuctionHouseForm auctionHouseForm)
Creates a new
AuctionHouse. |
void |
deleteAuctionHouse(Id auctionHouseId)
Deletes an
AuctionHouse. |
AuctionHouseForm |
getAuctionHouseFormForCreate(Type[] auctionHouseRecordTypes)
Gets the auction house form for creating new auction houses.
|
AuctionHouseForm |
getAuctionHouseFormForUpdate(Id auctionHouseId)
Gets the auction house form for updating an existing auction house.
|
void |
updateAuctionHouse(AuctionHouseForm auctionHouseForm)
Updates an existing auction house
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreateAuctionHouses()
AuctionHouses.
A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating an AuctionHouse.
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may not wish to offer create operations
to unauthorized users. false
if AuctionHouse
creation
is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateAuctionHouseWithRecordTypes(Type[] auctionHouseRecordTypes)
AuctionHouse
using the desired record types. While
BiddingManager.getAuctionHouseRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific AuctionHouse.
Providing an empty array tests if an AuctionHouse
can
be created with no records.auctionHouseRecordTypes
- array of auction house record types true
if AuctionHouse
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- auctionHouseRecordTypes
is null
mandatory
- This method must be implemented. AuctionHouseForm getAuctionHouseFormForCreate(Type[] auctionHouseRecordTypes) throws OperationFailedException, PermissionDeniedException
auctionHouseRecordTypes
- array of auction house record typesNullArgumentException
- auctionHouseRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. AuctionHouse createAuctionHouse(AuctionHouseForm auctionHouseForm) throws OperationFailedException, PermissionDeniedException
AuctionHouse.
auctionHouseForm
- the form for this AuctionHouse
AuctionHouse
IllegalStateException
- auctionHouseForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- auctionHouseForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- auctionHouseForm
did not originate from getAuctionHouseFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateAuctionHouses()
Auction Houses.
A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating an AuctionHouse
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may not wish to offer update operations
to unauthorized users. false
if AuctionHouse
modification is not authorized, true
otherwisemandatory
- This method must be implemented. AuctionHouseForm getAuctionHouseFormForUpdate(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- the Id
of the
AuctionHouse
NotFoundException
- auctionHouseId
is
not foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateAuctionHouse(AuctionHouseForm auctionHouseForm) throws OperationFailedException, PermissionDeniedException
auctionHouseForm
- the form containing the elements to be
updatedIllegalStateException
- auctionHouseForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- auctionHouseForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- auctionHouseForm
did not originate from getAuctionHouseFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteAuctionHouses()
AuctionHouses.
A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting an AuctionHouse
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may not wish to offer delete operations
to unauthorized users. false
if AuctionHouse
deletion
is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteAuctionHouse(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AuctionHouse.
auctionHouseId
- the Id
of the
AuctionHouse
to removeNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageAuctionHouseAliases()
Id
aliases for
Auction Houses.
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. false
if AuctionHouse
aliasing
is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasAuctionHouse(Id auctionHouseId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to an AuctionHouse
for the
purpose of creating compatibility. The primary Id
of
the AuctionHouse
is determined by the provider. The new
Id
performs as an alias to the primary Id.
auctionHouseId
- the Id
of an AuctionHouse
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.