public interface BudgetEntryAdminSession extends OsidSession
This session creates, updates, and deletes BudgetEntries.
The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or
update and may not be reused.
Create and update operations differ in their usage. To create an
BudgetEntry, an BudgetEntryForm is requested
using getBudgetEntryFormForCreate() specifying the desired
budget, account period, and record Types or none if no
record Types are needed. The returned
BudgetEntryForm will indicate that it is to be used with a create
operation and can be used to examine metdata or validate data prior to
creation. Once the BudgetEntryForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each BudgetEntryForm
corresponds to an attempted transaction.
For updates, BudgetEntryForms are requested to the
BudgetEntry Id that is to be updated using
getBudgetEntryFormForUpdate(). Similarly, the
BudgetEntryForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
BudgetEntryForm can only be used once for a successful update and
cannot be reused.
The delete operations delete BudgetEntryForms. To unmap
an BudgetEntry from the current Business,
the BudgetEntryBusinessAssignmentSession should be used.
These delete operations attempt to remove the BudgetEntryForm
itself thus removing it from all known Business
catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasBudgetEntry(Id budgetEntryId,
Id aliasId)
Adds an
Id to an BudgetEntry for the
purpose of creating compatibility. |
boolean |
canCreateBudgetEntries()
Tests if this user can create
BudgetEntries. |
boolean |
canCreateBudgetEntryWithRecordTypes(Type[] budgetEntryRecordTypes)
Tests if this user can create a single
BudgetEntry
using the desired record types. |
boolean |
canDeleteBudgetEntries()
Tests if this user can delete
BudgetEntries. |
boolean |
canManageBudgetEntryAliases()
Tests if this user can manage
Id aliases for
BudgetEntries. |
boolean |
canUpdateBudgetEntries()
Tests if this user can update
BudgetEntries. |
BudgetEntry |
createBudgetEntry(BudgetEntryForm entryForm)
Creates a new
BudgetEntry. |
void |
deleteBudgetEntry(Id budgetEntryId)
Deletes an
BudgetEntry. |
BudgetEntryForm |
getBudgetEntryFormForCreate(Id budgetId,
Id accountId,
Type[] budgetEntryRecordTypes)
Gets the budget entry form for creating new budget entries.
|
BudgetEntryForm |
getBudgetEntryFormForUpdate(Id budgetEntryId)
Gets the budget entry form for updating an existing budget entries.
|
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
updateBudgetEntry(BudgetEntryForm budgetEntryForm)
Updates an existing budget entries.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBusinessId()
Business Id associated with
this session. Business Id associated with this sessionmandatory - This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateBudgetEntries()
BudgetEntries. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating an BudgetEntry will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer create operations to
an unauthorized user. false if BudgetEntry creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateBudgetEntryWithRecordTypes(Type[] budgetEntryRecordTypes)
BudgetEntry
using the desired record types. While
FinancialsBudgetManager.getBudgetEntryRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific BudgetEntry.
Providing an empty array tests if an BudgetEntry
can be created with no records.budgetEntryRecordTypes - array of budget entry record types true if BudgetEntry creation
using the specified record Types is supported,
false otherwiseNullArgumentException - budgetEntryRecordTypes
is null mandatory - This method must be implemented. BudgetEntryForm getBudgetEntryFormForCreate(Id budgetId, Id accountId, Type[] budgetEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
budgetId - a budget Id accountId - an account Id budgetEntryRecordTypes - array of budget entry record typesNotFoundException - budgetId or
accountId is not foundNullArgumentException - budgetId, accountId,
or budgetEntryRecordTypes is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. BudgetEntry createBudgetEntry(BudgetEntryForm entryForm) throws OperationFailedException, PermissionDeniedException
BudgetEntry. entryForm - the form for this BudgetEntry BudgetEntry IllegalStateException - entryForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - entryForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - entryForm did not
originate from getBudgetEntryFormForCreate() mandatory - This method must be implemented. boolean canUpdateBudgetEntries()
BudgetEntries. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating an BudgetEntry will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user. false if BudgetEntry
modification is not authorized, true otherwisemandatory - This method must be implemented. BudgetEntryForm getBudgetEntryFormForUpdate(Id budgetEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
budgetEntryId - the Id of the BudgetEntry
NotFoundException - budgetEntryId is not
foundNullArgumentException - budgetEntryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateBudgetEntry(BudgetEntryForm budgetEntryForm) throws OperationFailedException, PermissionDeniedException
budgetEntryForm - the form containing the elements to be updatedIllegalStateException - budgetEntryForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - budgetEntryForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - entryForm did not
originate from getBudgetEntryFormForUpdate() mandatory - This method must be implemented. boolean canDeleteBudgetEntries()
BudgetEntries. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting an BudgetEntry will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer delete operations to
an unauthorized user. false if BudgetEntry deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteBudgetEntry(Id budgetEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BudgetEntry. budgetEntryId - the Id of the BudgetEntry
to removeNotFoundException - budgetEntryId not
foundNullArgumentException - budgetEntryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageBudgetEntryAliases()
Id aliases for
BudgetEntries. A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false if BudgetEntry aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasBudgetEntry(Id budgetEntryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an BudgetEntry for the
purpose of creating compatibility. The primary Id of
the BudgetEntry is deentryined by the provider. The new
Id performs as an alias to the primary Id
. If the alias is a pointer to another budget entry, it is
reassigned to the given budget entry Id. budgetEntryId - the Id of an BudgetEntry
aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - budgetEntryId not
foundNullArgumentException - budgetEntryId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.