public interface ItemBusinessSession extends OsidSession
This session provides methods to retrieve Item
to
Business
mappings. An Item
may appear in multiple
Business
objects. Each catalog may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupItemBusinessMappings()
Tests if this user can perform lookups of item/business mappings.
|
BusinessList |
getBusinessesByItem(Id itemId)
Gets the
Business objects mapped to an Item. |
IdList |
getBusinessIdsByItem(Id itemId)
Gets the
Business Ids mapped to an
Item. |
IdList |
getItemIdsByBusiness(Id businessId)
Gets the list of
Item Ids associated with a
Business. |
IdList |
getItemIdsByBusinesses(IdList businessIds)
Gets the list of
Item Ids corresponding to a list of
Business objects. |
ItemList |
getItemsByBusiness(Id businessId)
Gets the list of
Items associated with a
Business. |
ItemList |
getItemsByBusinesses(IdList businessIds)
Gets the list of
Items corresponding to a list of
Business objects. |
void |
useComparativeItemBusinessView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryItemCatalogView()
A complete view of the
Item and Business
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupItemBusinessMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeItemBusinessView()
mandatory
- This method is must be implemented. void usePlenaryItemCatalogView()
Item
and Business
returns is desired. Methods will return what is requested or result in
an error. This view is used when greater precision is desired at the
expense of interoperability.mandatory
- This method is must be implemented. IdList getItemIdsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Item Ids
associated with a
Business.
businessId
- Id
of the Business
Ids
NotFoundException
- businessId
is not
foundNullArgumentException
- businessId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ItemList getItemsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Items
associated with a
Business.
businessId
- Id
of the Business
NotFoundException
- businessId
is not
foundNullArgumentException
- businessId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getItemIdsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Item Ids
corresponding to a list of
Business
objects.businessIds
- list of business Ids
Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ItemList getItemsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Items
corresponding to a list of
Business
objects.businessIds
- list of business Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getBusinessIdsByItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
Ids
mapped to an
Item.
itemId
- Id
of an Item
NotFoundException
- itemId
is not foundNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BusinessList getBusinessesByItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
objects mapped to an Item.
itemId
- Id
of an Item
NotFoundException
- itemId
is not foundNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.