public interface CategoryBusinessSession extends OsidSession
This session provides methods to retrieve Category
to
Business
mappings. A Category
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 |
canLookupCategoryBusinessMappings()
Tests if this user can perform lookups of category/business mappings.
|
BusinessList |
getBusinessesByCategory(Id categoryId)
Gets the
Business objects mapped to a Category. |
IdList |
getBusinessIdsByCategory(Id categoryId)
Gets the
Business Ids mapped to a
Category. |
CategoryList |
getCategoriesByBusiness(Id businessId)
Gets the list of
Categories associated with a
Business. |
CategoryList |
getCategoriesByBusinesses(IdList businessIds)
Gets the list of
Categories corresponding to a list of
Business objects. |
IdList |
getCategoryIdsByBusiness(Id businessId)
Gets the list of
Category Ids associated with a
Business. |
IdList |
getCategoryIdsByBusinesses(IdList businessIds)
Gets the list of
Category Ids corresponding to a list
of Business objects. |
void |
useComparativeCategoryBusinessView()
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 |
usePlenaryCategoryBusinessView()
A complete view of the
Category and Business
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupCategoryBusinessMappings()
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 useComparativeCategoryBusinessView()
mandatory
- This method is must be implemented. void usePlenaryCategoryBusinessView()
Category
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 getCategoryIdsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Category 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. CategoryList getCategoriesByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Categories
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 getCategoryIdsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Category 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. CategoryList getCategoriesByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Categories
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 getBusinessIdsByCategory(Id categoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
Ids
mapped to a
Category.
categoryId
- Id
of a Category
NotFoundException
- categoryId
is not
foundNullArgumentException
- categoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BusinessList getBusinessesByCategory(Id categoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
objects mapped to a Category.
categoryId
- Id
of a Category
NotFoundException
- categoryId
is not
foundNullArgumentException
- categoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.