OSID Logo
OSID Specifications
inventory shipment package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.shipment.ShipmentAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Shipments. 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 getShipmentFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ShipmentForm 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 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.

For updates, ShipmentForms are requested to the Shipment Id that is to be updated using getShipmentFormForUpdate(). 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.

The delete operations delete Shipments. 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.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetWarehouseId
Description

Gets the Warehouse Id associated with this session.

Returnosid.id.Idthe Warehouse Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetWarehouse
Description

Gets the Warehouse associated with this session.

Returnosid.inventory.Warehousethe warehouse
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateShipments
Description

Tests if this user can create Shipments. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Shipment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Shipment creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateShipmentWithRecordTypes
Description

Tests if this user can create a single Shipment using the desired record types. While InventoryShipmentManager.getShipmentRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Shipment. Providing an empty array tests if a Shipment can be created with no records.

Parametersosid.type.Type[]shipmentRecordTypesarray of shipment record types
Returnboolean true if Shipment creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT shipmentRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetShipmentFormForCreate
Description

Gets the shipment form for creating new shipments. A new form should be requested for each create transaction.

Parametersosid.type.Type[]shipmentRecordTypesarray of shipment record types
Returnosid.inventory.shipment.ShipmentFormthe shipment form
ErrorsNULL_ARGUMENT shipmentRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateShipment
Description

Creates a new Shipment.

Parametersosid.inventory.shipment.ShipmentFormshipmentFormthe form for this Shipment
Returnosid.inventory.shipment.Shipmentthe new Shipment
ErrorsILLEGAL_STATE shipmentForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT shipmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED shipmentForm did not originate from getShipmentFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateShipments
Description

Tests if this user can update Shipments. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Shipment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Shipment modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetShipmentFormForUpdate
Description

Gets the shipment form for updating an existing shipment. A new shipment form should be requested for each update transaction.

Parametersosid.id.IdshipmentIdthe Id of the Shipment
Returnosid.inventory.shipment.ShipmentFormthe shipment form
ErrorsNOT_FOUND shipmentId is not found
NULL_ARGUMENT shipmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateShipment
Description

Updates an existing shipment.

Parametersosid.inventory.shipment.ShipmentFormshipmentFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE shipmentForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT shipmentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED shipmentForm did not originate from getShipmentFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteShipments
Description

Tests if this user can delete Shipments. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Shipment will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Shipment deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteShipment
Description

Deletes a Shipment.

Parametersosid.id.IdshipmentIdthe Id of the Shipment to remove
ErrorsNOT_FOUND shipmentId not found
NULL_ARGUMENT shipmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageShipmentAliases
Description

Tests if this user can manage Id aliases for Shipments. 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.

Returnboolean false if Shipment aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasShipment
Description

Adds an Id to a Shipment for the purpose of creating compatibility. The primary Id of the Shipment is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another shipment, it is reassigned to the given shipment Id.

Parametersosid.id.IdshipmentIdthe Id of a Shipment
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND shipmentId not found
NULL_ARGUMENT shipmentId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateEntries
Description

Tests if this user can create Entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Entry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Entry creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateEntriesWithRecordTypes
Description

Tests if this user can create a single Entry using the desired record types. While InventoryShippingManager.getEntryRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Entry. Providing an empty array tests if an Entry can be created with no records.

Parametersosid.type.Type[]entryRecordTypesarray of entry record types
Returnboolean true if Entry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT entryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetEntryFormForCreate
Description

Gets the entry form for creating new entries. A new form should be requested for each create transaction.

Parametersosid.id.IdshipmentIda shipment Id
osid.type.Type[]entryRecordTypesarray of entry record types
Returnosid.inventory.shipment.EntryFormthe entry form
ErrorsNOT_FOUND shipmentId is not found
NULL_ARGUMENT entryRecordTypes or shipmentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateEntry
Description

Creates a new Entry.

Parametersosid.inventory.shipment.EntryFormentryFormthe form for this Entry
Returnosid.inventory.shipment.Entrythe new Entry
ErrorsILLEGAL_STATE entryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT entryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED entry did not originate from getEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateEntries
Description

Tests if this user can update Entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Entry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Entry modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetEntryFormForUpdate
Description

Gets the entry form for updating an existing entry. A new entry form should be requested for each update transaction.

Parametersosid.id.IdentryIdthe Id of the Entry
Returnosid.inventory.shipment.EntryFormthe entry form
ErrorsNOT_FOUND entryId is not found
NULL_ARGUMENT entryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateEntry
Description

Updates an existing entry.

Parametersosid.inventory.shipment.EntryFormentryFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE entryForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT entryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED entryForm did not originate from getEntryFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteEntries
Description

Tests if this user can delete Entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Entry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Entry deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteEntry
Description

Deletes an Entry.

Parametersosid.id.IdentryIdthe Id of the Entry to remove
ErrorsNOT_FOUND entryId not found
NULL_ARGUMENT entryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageEntryAliases
Description

Tests if this user can manage Id aliases for Entries. 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.

Returnboolean false if Entry aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasEntry
Description

Adds an Id to an Entry for the purpose of creating compatibility. The primary Id of the Entry is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another entry, it is reassigned to the given entry Id.

Parametersosid.id.IdentryIdthe Id of an Entry
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND entryId not found
NULL_ARGUMENT entryId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.