OSID Logo
OSID Specifications
ordering package
Version 3.1.0
Interfaceosid.ordering.OrderItemStoreAssignmentSession
Implementsosid.OsidSession
Used Byosid.ordering.OrderingManager
osid.ordering.OrderingProxyManager
Description

This session provides methods to re-assign OrderItems to Stores. A OrderItem may map to multiple Stores and removing the last reference to an OrderItem is the equivalent of deleting it. Each Store may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a OrderItem to another Store is not a copy operation (eg: does not change its Id).

Like all OsidSessions, OrderItemStoreAssignmentSessions are dedicated to single processing threads and a single authenticated user.

MethodcanAssignOrderItems
Description

Tests if this user can alter order item/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignOrderItemsToStore
Description

Tests if this user can alter order item/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdstoreId the Id of the Store
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT storeId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableStoreIds
Description

Gets a list of stores including and under the given store node in which any order item can be assigned.

Parametersosid.id.IdstoreId the Id of the Store
Returnosid.id.IdList list of assignable store Ids
ErrorsNULL_ARGUMENT storeId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableStoreIdsForOrderItem
Description

Gets a list of stores including and under the given store node in which a specific order item can be assigned.

Parametersosid.id.IdstoreId the Id of the Store
osid.id.IdorderItemId the Id of the OrderItem
Returnosid.id.IdList list of assignable store Ids
ErrorsNULL_ARGUMENT storeId or orderItemId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignOrderItemToStore
Description

Adds an existing OrderItem to a Store.

Parametersosid.id.IdorderItemId the Id of the OrderItem
osid.id.IdstoreId the Id of the Store
ErrorsALREADY_EXISTS orderItemId is already assigned to storeId
NOT_FOUND orderItemId or storeId not found
NULL_ARGUMENT orderItemId or storeId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignOrderItemFromStore
Description

Removes an OrderItem from a Store.

Parametersosid.id.IdorderItemId the Id of the OrderItem
osid.id.IdstoreId the Id of the Store
ErrorsNOT_FOUND orderItemId or storeId not found or orderItemId not assigned to storeId
NULL_ARGUMENT orderItemId or storeId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignOrderItemToStore
Description

Moves an OrderItem from one Store to another. Mappings to other Stores are unaffected.

Parametersosid.id.IdorderItemId the Id of the OrderItem
osid.id.IdfromStoreId the Id of the current Store
osid.id.IdtoStoreId the Id of the destination Store
ErrorsALREADY_EXISTS orderItemId already assigned to storeId
NOT_FOUND orderItemId, fromStoreId, or toStoreId not found or orderItemId not mapped to fromStoreId
NULL_ARGUMENT orderItemId, fromStoreId, or toStoreId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.