public interface ItemBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Items to
Business objects An Item may appear in
multiple Business objects and removing the last reference
to an Item is the equivalent of deleting it. Each
Business may have its own authorizations governing who is allowed
to operate on it.
Adding a reference of an Item to another
Business is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignItemToBusiness(Id itemId,
Id businessId)
Adds an existing
Item to a Business. |
boolean |
canAssignItems()
Tests if this user can alter item/business mappings.
|
boolean |
canAssignItemToBusiness(Id businessId)
Tests if this user can alter item/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any item can be assigned.
|
IdList |
getAssignableBusinessIdsForItem(Id businessId,
Id itemId)
Gets a list of businesses including and under the given business node
in which a specific item can be assigned.
|
void |
reassignItemToBusiness(Id itemId,
Id fromBusinessId,
Id toBusinessId)
Moves an
Item from one Business to
another. |
void |
unassignItemFromBusiness(Id itemId,
Id businessId)
Removes an
Item from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignItems()
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 canAssignItemToBusiness(Id businessId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.businessId - the Id of the Business
false if mapping is not authorized, true
otherwiseNullArgumentException - businessId is
null mandatory - This method must be implemented. IdList getAssignableBusinessIds(Id businessId) throws OperationFailedException
businessId - the Id of the Business
Ids NullArgumentException - businessId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableBusinessIdsForItem(Id businessId, Id itemId) throws OperationFailedException
businessId - the Id of the Business
itemId - the Id of the Item Ids NullArgumentException - businessId or
itemId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignItemToBusiness(Id itemId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Item to a Business. itemId - the Id of the Item businessId - the Id of the Business
AlreadyExistsException - itemId is
already assigned to businessId NotFoundException - itemId or
businessId not foundNullArgumentException - itemId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignItemFromBusiness(Id itemId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item from a Business. itemId - the Id of the Item businessId - the Id of the Business
NotFoundException - itemId or
businessId not found or itemId not
assigned to businessId NullArgumentException - itemId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignItemToBusiness(Id itemId, Id fromBusinessId, Id toBusinessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item from one Business to
another. Mappings to other Businesses are unaffected.itemId - the Id of the Item fromBusinessId - the Id of the current
Business toBusinessId - the Id of the destination
Business NotFoundException - itemId, fromBusinessId,
or toBusinessId not found or
itemId not mapped to fromBusinessId NullArgumentException - itemId, fromBusinessId,
or toBusinessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.