Interface BudgetLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving budgets.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated business view: All budget methods in this session
operate, retrieve and pertain to budgets defined explicitly in the
current business. Using an isolated view is useful for managing
Budgetswith theBudgetAdminSession. - federated business view: All budget lookup methods in this session operate, retrieve and pertain to all budgets defined in this business and any other budgets implicitly available in this business through business inheritence.
- effective budget view: All budget lookup methods return budgets where the current date falls in between the effective dates inclusive.
- any effective budget view: Budgets of any effective date are returned from methods.
The methods useFederatedBusinessView() and
useIsolatedBusinessView() behave as a radio group and one should be
selected before invoking any lookup methods.
Budgets may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Budget .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performBudgetlookups.Gets theBudgetspecified by itsId.Gets allBudgets.getBudgetsByGenusType(Type budgetGenusType) Gets aBudgetListcorresponding to the given budget genusTypewhich does not include budgets of types derived from the specifiedType.getBudgetsByIds(IdList budgetIds) Gets aBudgetListcorresponding to the givenIdList.getBudgetsByParentGenusType(Type budgetGenusType) Gets aBudgetListcorresponding to the given budget genusTypeand include any additional budgets with genus types derived from the specifiedType.getBudgetsByRecordType(Type budgetRecordType) Gets aBudgetListcontaining the given budget recordType.getBudgetsForActivity(Id activityId) Gets aBudgetListfor the given activity.getBudgetsForActivityAndFiscalPeriod(Id activityId, Id fiscalPeriodId) Gets aBudgetListfor the given activity and fiscal period.getBudgetsForActivityAndFiscalPeriodOnDate(Id activityId, Id fiscalPeriodId, DateTime from, DateTime to) Gets aBudgetListfor the given activity, fiscal period, and effective during the entire given date range inclusive but not confined to the date range.getBudgetsForActivityOnDate(Id activityId, DateTime from, DateTime to) Gets aBudgetListfor the given activity and effective during the entire given date range inclusive but not confined to the date range.getBudgetsForFiscalPeriod(Id fiscalPeriodId) Gets aBudgetListfor the given fiscal period.getBudgetsForFiscalPeriodOnDate(Id fiscalPeriodId, DateTime from, DateTime to) Gets aBudgetListfor the given fiscal period and effective during the entire given date range inclusive but not confined to the date range.getBudgetsOnDate(DateTime from, DateTime to) Gets aBudgetListeffective during the entire given date range inclusive but not confined to the date range.Gets theBusinessassociated with this session.Gets theBusinessIdassociated with this session.voidAll budgets of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly budgets whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theBudgetreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getBusinessId
Id getBusinessId()Gets theBusinessIdassociated with this session.- Returns:
- the
Business Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBusiness
Gets theBusinessassociated with this session.- Returns:
- the business
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupBudgets
boolean canLookupBudgets()Tests if this user can performBudgetlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeBudgetView
void useComparativeBudgetView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryBudgetView
void usePlenaryBudgetView()A complete view of theBudgetreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedBusinessView
void useFederatedBusinessView()Federates the view for methods in this session. A federated view will include budgets in catalogs which are children of this catalog in the business hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedBusinessView
void useIsolatedBusinessView()Isolates the view for methods in this session. An isolated view restricts retrievals to this business only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveBudgetView
void useEffectiveBudgetView()Only budgets whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveBudgetView
void useAnyEffectiveBudgetView()All budgets of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getBudget
Budget getBudget(Id budgetId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theBudgetspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedBudgetmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aBudgetand retained for compatibility. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
budgetId- theIdof theBudgetto retrieve- Returns:
- the returned
Budget - Throws:
NotFoundException- noBudgetfound with the givenIdNullArgumentException-budgetIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsByIds
BudgetList getBudgetsByIds(IdList budgetIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aBudgetListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the budgets specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleBudgetsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
budgetIds- the list ofIdsto retrieve- Returns:
- the returned
Budgetlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-budgetIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsByGenusType
BudgetList getBudgetsByGenusType(Type budgetGenusType) throws OperationFailedException, PermissionDeniedException Gets aBudgetListcorresponding to the given budget genusTypewhich does not include budgets of types derived from the specifiedType. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
budgetGenusType- a budget genus type- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-budgetGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsByParentGenusType
BudgetList getBudgetsByParentGenusType(Type budgetGenusType) throws OperationFailedException, PermissionDeniedException Gets aBudgetListcorresponding to the given budget genusTypeand include any additional budgets with genus types derived from the specifiedType. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
budgetGenusType- a budget genus type- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-budgetGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsByRecordType
BudgetList getBudgetsByRecordType(Type budgetRecordType) throws OperationFailedException, PermissionDeniedException Gets aBudgetListcontaining the given budget recordType. In plenary mode, the returned list contains all known mode,s or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
budgetRecordType- a budget record type- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-budgetRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsOnDate
BudgetList getBudgetsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aBudgetListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Budgetlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForActivity
BudgetList getBudgetsForActivity(Id activityId) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given activity. In plenary mode, the returned list contains all known mode,s or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
activityId- an activityId- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForActivityOnDate
BudgetList getBudgetsForActivityOnDate(Id activityId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given activity and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
activityId- an activityIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Budgetlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-activityId, from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForFiscalPeriod
BudgetList getBudgetsForFiscalPeriod(Id fiscalPeriodId) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given fiscal period. In plenary mode, the returned list contains all known mode,s or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
fiscalPeriodId- a fiscal periodId- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-fiscalPeriodIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForFiscalPeriodOnDate
BudgetList getBudgetsForFiscalPeriodOnDate(Id fiscalPeriodId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given fiscal period and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
fiscalPeriodId- a fiscal periodIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Budgetlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fiscalPeriodId, from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForActivityAndFiscalPeriod
BudgetList getBudgetsForActivityAndFiscalPeriod(Id activityId, Id fiscalPeriodId) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given activity and fiscal period. In plenary mode, the returned list contains all known mode,s or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
activityId- an activityIdfiscalPeriodId- a fiscal periodId- Returns:
- the returned
Budgetlist - Throws:
NullArgumentException-activityIdorfiscalPeriodIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgetsForActivityAndFiscalPeriodOnDate
BudgetList getBudgetsForActivityAndFiscalPeriodOnDate(Id activityId, Id fiscalPeriodId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aBudgetListfor the given activity, fiscal period, and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective budgets and those currently expired are returned.- Parameters:
activityId- an activityIdfiscalPeriodId- a fiscal periodIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Budgetlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-activityId, fiscalPeriodId, from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getBudgets
Gets allBudgets. In plenary mode, the returned list contains all known budgets or an error results. Otherwise, the returned list may contain only those budgets that are accessible through this session. In effective mode, budgets are returned that are currently effective. In any effective mode, effective budgets and those currently expired are returned.- Returns:
- a list of
Budgets - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-