public interface BudgetBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Budgets to
Business objects A Budget may appear in
multiple Business objects and removing the last reference
to a Budget 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 a Budget to another
Business is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignBudgetToBusiness(Id budgetId,
Id businessId)
Adds an existing
Budget to a Business. |
boolean |
canAssignBudgets()
Tests if this user can alter budget/business mappings.
|
boolean |
canAssignBudgetToBusiness(Id businessId)
Tests if this user can alter budget/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any budget can be assigned.
|
IdList |
getAssignableBusinessIdsForBudget(Id businessId,
Id budgetId)
Gets a list of businesses including and under the given business node
in which a specific budget can be assigned.
|
void |
unassignBudgetFromBusiness(Id budgetId,
Id businessId)
Removes a
Budget from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignBudgets()
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 canAssignBudgetToBusiness(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 getAssignableBusinessIdsForBudget(Id businessId, Id budgetId) throws OperationFailedException
businessId - the Id of the Business
budgetId - the Id of the Budget Ids NullArgumentException - businessId or
budgetId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignBudgetToBusiness(Id budgetId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Budget to a Business. budgetId - the Id of the Budget businessId - the Id of the Business
AlreadyExistsException - budgetId is
already assigned to businessId NotFoundException - budgetId or
businessId not foundNullArgumentException - budgetId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignBudgetFromBusiness(Id budgetId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Budget from a Business. budgetId - the Id of the Budget businessId - the Id of the Business
NotFoundException - budgetId or
businessId not found or budgetId not
assigned to businessId NullArgumentException - budgetId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.