public interface PeriodBusinessSession extends OsidSession
This session provides methods to retrieve Period
to
Business
mappings. A Period
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 |
canLookupPeriodBusinessMappings()
Tests if this user can perform lookups of period/business mappings.
|
BusinessList |
getBusinessesByPeriod(Id periodId)
Gets the
Business objects mapped to a Period. |
IdList |
getBusinessIdsByPeriod(Id periodId)
Gets the
Business Ids mapped to a
Period. |
IdList |
getPeriodIdsByBusiness(Id businessId)
Gets the list of
Period Ids associated with a
Business. |
IdList |
getPeriodIdsByBusinesses(IdList businessIds)
Gets the list of
Period Ids corresponding to a list of
Business objects. |
PeriodList |
getPeriodsByBusiness(Id businessId)
Gets the list of
Period associated with a
Business. |
PeriodList |
getPeriodsByBusinesses(IdList businessIds)
Gets the list of
Periods corresponding to a list of
Business objects. |
void |
useComparativePeriodBusinessView()
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 |
usePlenaryPeriodCatalogView()
A complete view of the
Period and Business
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupPeriodBusinessMappings()
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 useComparativePeriodBusinessView()
mandatory
- This method is must be implemented. void usePlenaryPeriodCatalogView()
Period
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 getPeriodIdsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Period 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. PeriodList getPeriodsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Period
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 getPeriodIdsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Period Ids
corresponding to a list of
Business
objects.businessIds
- list of catalog Ids
Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PeriodList getPeriodsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Periods
corresponding to a list of
Business
objects.businessIds
- list of catalog Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getBusinessIdsByPeriod(Id periodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
Ids
mapped to a
Period.
periodId
- Id
of a Period
NotFoundException
- periodId
is not
foundNullArgumentException
- periodId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BusinessList getBusinessesByPeriod(Id periodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
objects mapped to a Period.
periodId
- Id
of a Period
NotFoundException
- periodId
is not
foundNullArgumentException
- periodId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.