Interface AuctionHouseBatchAdminSession
- All Superinterfaces:
AuctionHouseAdminSession, AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes AuctionHouses in
bulk. 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
getAuctionHouseFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the
returned AuctionHouseForms 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 an 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.
The AuctionHouseForms returned from
getAuctionHouseFormsForCreate() may be linked to the originating request
through the peer Ids of the AuctionHouseForm . In the case
where there may be duplicates, any AuctionHouseForm of the same
peer Ids may be used for a create operation.
Once a batch of AuctionHouseForms are submitted for create, a
CreateResponse is returned for each AuctionHouseForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createAuctionHouses() ,
errors specific to an individual AuctionHouseForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating AuctionHouseForm through the
AuctionHouseForm Id .
For updates, AuctionHouseForms are requested to the
AuctionHouse Id that is to be updated using
getAuctionHouseFormsForUpdate() where the reference Id in the
AuctionHouseForm may be used to link the request. 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.
Once a batch of AuctionHouseForms are submitted for update, an
UpdateResponse is returned for each AuctionHouseForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateAuctionHouses() ,
errors specific to an individual AuctionHouseForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating AuctionHouseForm through the
AuctionHouseForm Id .
The delete operations delete AuctionHouses in bulk. Bulk
delete operations return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasAuctionHouses(AliasRequestList aliasRequests) Adds anIdto anAuctionHousefor the purpose of creating compatibility.createAuctionHouses(AuctionHouseBatchFormList auctionHouseForms) Creates a new set ofAuctionHouses.Deletes allAuctionHouses.deleteAuctionHouses(IdList auctionHouseIds) Deletes auction houses for the givenIds.getAuctionHouseFormsForCreate(long number, Type[] auctionHouseRecordTypes) Gets the auction house forms for creating a bunch of new auction houses.getAuctionHouseFormsForUpdate(IdList auctionHouseIds) Gets the auction house forms for updating an existing set of auction houses.updateAuctionHouses(AuctionHouseBatchFormList auctionHouseForms) Updates existing auction houses.Methods inherited from interface AuctionHouseAdminSession
aliasAuctionHouse, canCreateAuctionHouses, canCreateAuctionHouseWithRecordTypes, canDeleteAuctionHouses, canManageAuctionHouseAliases, canUpdateAuctionHouses, createAuctionHouse, deleteAuctionHouse, getAuctionHouseFormForCreate, getAuctionHouseFormForUpdate, updateAuctionHouseModifier 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
-
getAuctionHouseFormsForCreate
AuctionHouseBatchFormList getAuctionHouseFormsForCreate(long number, Type[] auctionHouseRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the auction house forms for creating a bunch of new auction houses.- Parameters:
number- the number of forms to retrieveauctionHouseRecordTypes- array of auction house record types to be included in each create operation or an empty list if none- Returns:
- the auction house forms
- Throws:
NullArgumentException-auctionHouseRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createAuctionHouses
CreateResponseList createAuctionHouses(AuctionHouseBatchFormList auctionHouseForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofAuctionHouses. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
auctionHouseForms- the auction house forms- Returns:
- the create responses
- Throws:
NullArgumentException-auctionHouseFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAuctionHouseFormsForUpdate
AuctionHouseBatchFormList getAuctionHouseFormsForUpdate(IdList auctionHouseIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the auction house forms for updating an existing set of auction houses. A new auction house form should be requested for each update transaction.- Parameters:
auctionHouseIds- theIdsof theAuctionHouse- Returns:
- the auction house form
- Throws:
NotFoundException- anauctionHouseIdis not foundNullArgumentException-auctionHouseIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAuctionHouses
UpdateResponseList updateAuctionHouses(AuctionHouseBatchFormList auctionHouseForms) throws OperationFailedException, PermissionDeniedException Updates existing auction houses. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
auctionHouseForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-auctionHouseFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllAuctionHouses
DeleteResponseList deleteAllAuctionHouses() throws OperationFailedException, PermissionDeniedExceptionDeletes allAuctionHouses.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAuctionHouses
DeleteResponseList deleteAuctionHouses(IdList auctionHouseIds) throws OperationFailedException, PermissionDeniedException Deletes auction houses for the givenIds.- Parameters:
auctionHouseIds- theIdsof the auction houses to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-auctionHouseIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasAuctionHouses
AliasResponseList aliasAuctionHouses(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anAuctionHousefor the purpose of creating compatibility. The primaryIdof theAuctionHouseis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another auction house, it is reassigned to the given entryId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-