public interface ProductStoreAssignmentSession extends OsidSession
This session provides methods to re-assign Products to
Stores. A Product may map to multiple
Stores and removing the last reference to a Product
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 Product to another Store
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignProductToStore(Id productId,
Id storeId)
Adds an existing
Product to a Store. |
boolean |
canAssignProducts()
Tests if this user can alter product/store mappings.
|
boolean |
canAssignProductsToStore(Id storeId)
Tests if this user can alter product/store mappings.
|
IdList |
getAssignableStoreIds(Id storeId)
Gets a list of stores including and under the given store node in
which any product can be assigned.
|
IdList |
getAssignableStoreIdsForProduct(Id storeId,
Id productId)
Gets a list of stores including and under the given store node in
which a specific product can be assigned.
|
void |
unassignProductFromStore(Id productId,
Id storeId)
Removes a
Product from a Store. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignProducts()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignProductsToStore(Id storeId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.storeId - the Id of the Store false if mapping is not authorized, true
otherwiseNullArgumentException - storeId is
null mandatory - This method must be implemented. IdList getAssignableStoreIds(Id storeId) throws OperationFailedException
storeId - the Id of the Store Ids NullArgumentException - storeId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableStoreIdsForProduct(Id storeId, Id productId) throws OperationFailedException
storeId - the Id of the Store productId - the Id of the Product Ids NullArgumentException - storeId or
productId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignProductToStore(Id productId, Id storeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Product to a Store. productId - the Id of the Product storeId - the Id of the Store AlreadyExistsException - productId is
already assigned to storeId NotFoundException - productId or
storeId not foundNullArgumentException - productId or
storeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignProductFromStore(Id productId, Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Product from a Store. productId - the Id of the Product storeId - the Id of the Store NotFoundException - productId or
storeId not found or productId not
assigned to storeId NullArgumentException - productId or
storeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.