Interface AuctionHouseAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
AuctionHouseBatchAdminSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAuctionHouse(Id auctionHouseId, Id aliasId) Adds anIdto anAuctionHousefor the purpose of creating compatibility.booleanTests if this user can createAuctionHouses.booleancanCreateAuctionHouseWithRecordTypes(Type[] auctionHouseRecordTypes) Tests if this user can create a singleAuctionHouseusing the desired record types.booleanTests if this user can deleteAuctionHouses.booleanTests if this user can manageIdaliases forAuction Houses.booleanTests if this user can updateAuction Houses.createAuctionHouse(AuctionHouseForm auctionHouseForm) Creates a newAuctionHouse.voiddeleteAuctionHouse(Id auctionHouseId) Deletes anAuctionHouse.getAuctionHouseFormForCreate(Type[] auctionHouseRecordTypes) Gets the auction house form for creating new auction houses.getAuctionHouseFormForUpdate(Id auctionHouseId) Gets the auction house form for updating an existing auction house.voidupdateAuctionHouse(AuctionHouseForm auctionHouseForm) Updates an existing auction houseMethods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canCreateAuctionHouses
boolean canCreateAuctionHouses()Tests if this user can createAuctionHouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAuctionHouse. will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.- Returns:
falseifAuctionHousecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAuctionHouseWithRecordTypes
Tests if this user can create a singleAuctionHouseusing the desired record types. WhileBiddingManager.getAuctionHouseRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAuctionHouse. Providing an empty array tests if anAuctionHousecan be created with no records.- Parameters:
auctionHouseRecordTypes- array of auction house record types- Returns:
trueifAuctionHousecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-auctionHouseRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAuctionHouseFormForCreate
AuctionHouseForm getAuctionHouseFormForCreate(Type[] auctionHouseRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the auction house form for creating new auction houses. A new form should be requested for each create transaction.- Parameters:
auctionHouseRecordTypes- array of auction house record types- Returns:
- the auction house form
- Throws:
NullArgumentException-auctionHouseRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAuctionHouse
AuctionHouse createAuctionHouse(AuctionHouseForm auctionHouseForm) throws OperationFailedException, PermissionDeniedException Creates a newAuctionHouse.- Parameters:
auctionHouseForm- the form for thisAuctionHouse- Returns:
- the new
AuctionHouse - Throws:
IllegalStateException-auctionHouseFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-auctionHouseFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auctionHouseFormdid not originate fromgetAuctionHouseFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAuctionHouses
boolean canUpdateAuctionHouses()Tests if this user can updateAuction Houses. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAuctionHousewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.- Returns:
falseifAuctionHousemodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAuctionHouseFormForUpdate
AuctionHouseForm getAuctionHouseFormForUpdate(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the auction house form for updating an existing auction house. A new auction house form should be requested for each update transaction.- Parameters:
auctionHouseId- theIdof theAuctionHouse- Returns:
- the auction house form
- Throws:
NotFoundException-auctionHouseIdis not foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAuctionHouse
void updateAuctionHouse(AuctionHouseForm auctionHouseForm) throws OperationFailedException, PermissionDeniedException Updates an existing auction house- Parameters:
auctionHouseForm- the form containing the elements to be updated- Throws:
IllegalStateException-auctionHouseFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-auctionHouseFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-auctionHouseFormdid not originate fromgetAuctionHouseFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAuctionHouses
boolean canDeleteAuctionHouses()Tests if this user can deleteAuctionHouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAuctionHousewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.- Returns:
falseifAuctionHousedeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAuctionHouse
void deleteAuctionHouse(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAuctionHouse.- Parameters:
auctionHouseId- theIdof theAuctionHouseto remove- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAuctionHouseAliases
boolean canManageAuctionHouseAliases()Tests if this user can manageIdaliases forAuction 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifAuctionHousealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAuctionHouse
void aliasAuctionHouse(Id auctionHouseId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAuctionHousefor the purpose of creating compatibility. The primaryIdof theAuctionHouseis determined by the provider. The newIdperforms as an alias to the primaryId.- Parameters:
auctionHouseId- theIdof anAuctionHousealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-