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