Interface ShipmentBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, ShipmentAdminSession
This session creates, updates, and deletes Shipments 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 a
Shipment , a ShipmentForm is requested using
getShipmentFormsForCreate() specifying the desired record Types
or none if no record Types are needed. Each of the returned
ShipmentForms 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 a ShipmentForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each ShipmentForm corresponds to an attempted
transaction.
The ShipmentForms returned from
getShipmentFormsForCreate() may be linked to the originating request
through the peer Ids of the ShipmentForm . In the case
where there may be duplicates, any ShipmentForm of the same peer
Ids may be used for a create operation.
Once a batch of ShipmentForms are submitted for create, a
CreateResponse is returned for each ShipmentForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createShipments() ,
errors specific to an individual ShipmentForm are indicated in the
corresponding CreateResponse . CreateResponses may be
linked to the originating ShipmentForm through the
ShipmentForm Id .
For updates, ShipmentForms are requested to the
Shipment Id that is to be updated using
getShipmentFormsForUpdate() where the reference Id in the
ShipmentForm may be used to link the request. Similarly, the
ShipmentForm has metadata about the data that can be updated and it can
perform validation before submitting the update. The ShipmentForm
can only be used once for a successful update and cannot be reused.
Once a batch of ShipmentForms are submitted for update, an
UpdateResponse is returned for each ShipmentForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateShipments() ,
errors specific to an individual ShipmentForm are indicated in the
corresponding UpdateResponse . UpdateResponses may be
linked to the originating ShipmentForm through the
ShipmentForm Id .
The delete operations delete Shipments in bulk. To unmap a
Shipment from the current Warehouse , the
ShipmentWarehouseAssignmentSession should be used. These delete
operations attempt to remove the Shipment itself thus removing it
from all known Warehouse catalogs. Bulk delete operations return
the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasEntries(AliasRequestList aliasRequests) Adds anIdto anEntryfor the purpose of creating compatibility.aliasShipments(AliasRequestList aliasRequests) Adds anIdto aShipmentfor the purpose of creating compatibility.createEntries(EntryBatchFormList entryForms) Creates a new set ofEntries.createShipments(ShipmentBatchFormList shipmentForms) Creates a new set ofShipments.Deletes allEntriesin thisWarehouse.Deletes allShipmentsin thisWarehouse.deleteEntries(IdList entryIds) Deletes entries for the givenIds.deleteEntriesForShipment(Id shipmentId) Deletes entries for the given shipment.deleteShipments(IdList shipmentIds) Deletes shipments for the givenIds.getEntryFormsForCreate(IdList shipmentIds, Type[] shipmentRecordTypes) Gets the entry forms for creating a bunch of new entries.getEntryFormsForUpdate(IdList entryIds) Gets the entry forms for updating an existing set of entrys.getShipmentFormsForCreate(long number, Type[] shipmentRecordTypes) Gets the shipment forms for creating a bunch of new shipments.getShipmentFormsForUpdate(IdList shipmentIds) Gets the shipment forms for updating an existing set of shipments.updateEntries(EntryBatchFormList entryForms) Updates existing entries.updateShipments(ShipmentBatchFormList shipmentForms) Updates existing shipments.Methods 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.Methods inherited from interface ShipmentAdminSession
aliasEntry, aliasShipment, canCreateEntries, canCreateEntriesWithRecordTypes, canCreateShipments, canCreateShipmentWithRecordTypes, canDeleteEntries, canDeleteShipments, canManageEntryAliases, canManageShipmentAliases, canUpdateEntries, canUpdateShipments, createEntry, createShipment, deleteEntry, deleteShipment, getEntryFormForCreate, getEntryFormForUpdate, getShipmentFormForCreate, getShipmentFormForUpdate, getWarehouse, getWarehouseId, updateEntry, updateShipmentModifier and TypeMethodDescriptionvoidaliasEntry(Id entryId, Id aliasId) Adds anIdto anEntryfor the purpose of creating compatibility.voidaliasShipment(Id shipmentId, Id aliasId) Adds anIdto aShipmentfor the purpose of creating compatibility.booleanTests if this user can createEntries.booleancanCreateEntriesWithRecordTypes(Type[] entryRecordTypes) Tests if this user can create a singleEntryusing the desired record types.booleanTests if this user can createShipments.booleancanCreateShipmentWithRecordTypes(Type[] shipmentRecordTypes) Tests if this user can create a singleShipmentusing the desired record types.booleanTests if this user can deleteEntries.booleanTests if this user can deleteShipments.booleanTests if this user can manageIdaliases forEntries.booleanTests if this user can manageIdaliases forShipments.booleanTests if this user can updateEntries.booleanTests if this user can updateShipments.createEntry(EntryForm entryForm) Creates a newEntry.createShipment(ShipmentForm shipmentForm) Creates a newShipment.voiddeleteEntry(Id entryId) Deletes anEntry.voiddeleteShipment(Id shipmentId) Deletes aShipment.getEntryFormForCreate(Id shipmentId, Type[] entryRecordTypes) Gets the entry form for creating new entries.getEntryFormForUpdate(Id entryId) Gets the entry form for updating an existing entry.getShipmentFormForCreate(Type[] shipmentRecordTypes) Gets the shipment form for creating new shipments.getShipmentFormForUpdate(Id shipmentId) Gets the shipment form for updating an existing shipment.Gets theWarehouseassociated with this session.Gets theWarehouseIdassociated with this session.voidupdateEntry(EntryForm entryForm) Updates an existing entry.voidupdateShipment(ShipmentForm shipmentForm) Updates an existing shipment.
-
Method Details
-
getShipmentFormsForCreate
ShipmentBatchFormList getShipmentFormsForCreate(long number, Type[] shipmentRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the shipment forms for creating a bunch of new shipments.- Parameters:
number- the number of forms to retrieveshipmentRecordTypes- array of shipment record types to be included in each create operation or an empty list if none- Returns:
- the shipment forms
- Throws:
NullArgumentException-shipmentRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createShipments
CreateResponseList createShipments(ShipmentBatchFormList shipmentForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofShipments. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
shipmentForms- the shipment forms- Returns:
- the create responses
- Throws:
NullArgumentException-shipmentFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getShipmentFormsForUpdate
ShipmentBatchFormList getShipmentFormsForUpdate(IdList shipmentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the shipment forms for updating an existing set of shipments. A new shipment form should be requested for each update transaction.- Parameters:
shipmentIds- theIdsof theShipment- Returns:
- the shipment form
- Throws:
NotFoundException- ashipmentIdis not foundNullArgumentException-shipmentIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateShipments
UpdateResponseList updateShipments(ShipmentBatchFormList shipmentForms) throws OperationFailedException, PermissionDeniedException Updates existing shipments. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
shipmentForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-shipmentFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllShipments
Deletes allShipmentsin thisWarehouse.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteShipments
DeleteResponseList deleteShipments(IdList shipmentIds) throws OperationFailedException, PermissionDeniedException Deletes shipments for the givenIds.- Parameters:
shipmentIds- theIdsof the shipments to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-shipmentIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasShipments
AliasResponseList aliasShipments(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aShipmentfor the purpose of creating compatibility. The primaryIdof theShipmentis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another shipment, it is reassigned to the given shipmentId.- 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.
-
getEntryFormsForCreate
EntryBatchFormList getEntryFormsForCreate(IdList shipmentIds, Type[] shipmentRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the entry forms for creating a bunch of new entries. A form is returned for each supplied shipment.- Parameters:
shipmentIds- a list of shipmentIdsshipmentRecordTypes- array of shipment record types to be included in each create operation or an empty list if none- Returns:
- the entry forms
- Throws:
NotFoundException- ashipmentIdis not foundNullArgumentException-shipmentIdsorshipmentRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createEntries
CreateResponseList createEntries(EntryBatchFormList entryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
entryForms- the entry forms- Returns:
- the create responses
- Throws:
NullArgumentException-entryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEntryFormsForUpdate
EntryBatchFormList getEntryFormsForUpdate(IdList entryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the entry forms for updating an existing set of entrys. A new entry form should be requested for each update transaction.- Parameters:
entryIds- theIdsof theEntry- Returns:
- the entry form
- Throws:
NotFoundException- anentryIdis not foundNullArgumentException-entryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateEntries
UpdateResponseList updateEntries(EntryBatchFormList entryForms) throws OperationFailedException, PermissionDeniedException Updates existing entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
entryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-entryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllEntries
Deletes allEntriesin thisWarehouse.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteEntries
DeleteResponseList deleteEntries(IdList entryIds) throws OperationFailedException, PermissionDeniedException Deletes entries for the givenIds.- Parameters:
entryIds- theIdsof the entries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-entryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteEntriesForShipment
DeleteResponseList deleteEntriesForShipment(Id shipmentId) throws OperationFailedException, PermissionDeniedException Deletes entries for the given shipment.- Parameters:
shipmentId- theIdsof the shipment- Returns:
- the delete responses
- Throws:
NullArgumentException-shipmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasEntries
AliasResponseList aliasEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anEntryfor the purpose of creating compatibility. The primaryIdof theEntryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another entry, 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.
-