Interface JournalEntryBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, JournalEntryAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes JournalEntries in
bulk. 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 a
JournalEntry , a JournalEntryForm is requested using
getJournalEntryFormsForCreate() specifying the desired branch, source,
and record Types or none if no record Types are needed.
Each of the returned JournalEntryForms 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 a JournalEntryForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
JournalEntryForm corresponds to an attempted transaction.
The JournalEntryForms returned from
getJournalEntryFormsForCreate() may be linked to the originating request
through the peer Ids of the JournalEntryForm . In the case
where there may be duplicates, any JournalEntryForm of the same
peer Ids may be used for a create operation.
Once a batch of JournalEntryForms are submitted for create, a
CreateResponse is returned for each JournalEntryForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createJournalEntries() ,
errors specific to an individual JournalEntryForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating JournalEntryForm through the
JournalEntryForm Id .
For updates, JournalEntryForms are requested to the
JournalEntry Id that is to be updated using
getJournalEntryFormsForUpdate() where the reference Id in the
JournalEntryForm may be used to link the request. Similarly, the
JournalEntryForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
JournalEntryForm can only be used once for a successful update and cannot
be reused.
Once a batch of JournalEntryForms are submitted for update, an
UpdateResponse is returned for each JournalEntryForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateJournalEntries() ,
errors specific to an individual JournalEntryForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating JournalEntryForm through the
JournalEntryForm Id .
The delete operations delete JournalEntries in bulk. To unmap
a JournalEntry from the current Journal , the
JournalEntryJournalAssignmentSession should be used. These delete
operations attempt to remove the JournalEntry itself thus removing
it from all known Journal catalogs. Bulk delete operations return
the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasJournalEntries(AliasRequestList aliasRequests) Adds anIdto aJournalEntryfor the purpose of creating compatibility.createJournalEntries(JournalEntryBatchFormList journalEntryForms) Creates a new set ofJournal Entries.Deletes allJournalEntriesin thisJournal.deleteJournalEntries(IdList journalEntryIds) Deletes journal entries for the givenIds.deleteJournalEntriesByDate(DateTime from, DateTime to) Deletes journal entries between the given date range inclusive.deleteJournalEntriesForBranch(Id branchId) Deletes journal entries for the given branch.deleteJournalEntriesForSource(Id sourceId) Deletes journal entries for the given source.getJournalEntryFormsForCreate(JournalEntryPeerList peers, Type[] journalEntryRecordTypes) Gets the journal entry forms for creating a bunch of new journal entries.getJournalEntryFormsForUpdate(IdList journalEntryIds) Gets the journal entry forms for updating an existing set of journal entries.updateJournalEntries(JournalEntryBatchFormList journalEntryForms) Updates existing journal entries.Methods inherited from interface JournalEntryAdminSession
aliasJournalEntry, canCreateJournalEntries, canCreateJournalEntryWithRecordTypes, canDeleteJournalEntries, canManageJournalEntryAliases, canUpdateJournalEntries, createJournalEntry, deleteJournalEntry, getJournal, getJournalEntryFormForCreate, getJournalEntryFormForUpdate, getJournalId, updateJournalEntryModifier and TypeMethodDescriptionvoidaliasJournalEntry(Id journalEntryId, Id aliasId) Adds anIdto aJournalEntryfor the purpose of creating compatibility.booleanTests if this user can create journal entries.booleancanCreateJournalEntryWithRecordTypes(Type[] journalEntryRecordTypes) Tests if this user can create a singleJournalEntryusing the desired record interface types.booleanTests if this user can delete journal entries.booleanTests if this user can manageIdaliases for journal entries.booleanTests if this user can update journal entries.createJournalEntry(JournalEntryForm journalEntryForm) Creates a newJournalEntry.voiddeleteJournalEntry(Id journalEntryId) Deletes aJournalEntry.Gets theJournalassociated with this session.getJournalEntryFormForCreate(Id branchId, Id sourceId, Type[] journalEntryRecordTypes) Gets the journal entry form for creating new entries.getJournalEntryFormForUpdate(Id journalEntryId) Gets the journal entry form for updating an existing entry.Gets theJournalIdassociated with this session.voidupdateJournalEntry(JournalEntryForm journalEntryForm) Updates an existing journal entry.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
-
getJournalEntryFormsForCreate
JournalEntryBatchFormList getJournalEntryFormsForCreate(JournalEntryPeerList peers, Type[] journalEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the journal entry forms for creating a bunch of new journal entries. AJournalEntryFormis returned for each supplied branch and source.- Parameters:
peers- a list of journal entry peersjournalEntryRecordTypes- array of journal entry record types to be included in each create operation or an empty list if none- Returns:
- the journal entry forms
- Throws:
NotFoundException- abranchIdorsourceIdis not foundNullArgumentException-peersorjournalEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createJournalEntries
CreateResponseList createJournalEntries(JournalEntryBatchFormList journalEntryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofJournal Entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
journalEntryForms- the journal entry forms- Returns:
- the create responses
- Throws:
NullArgumentException-journalEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntryFormsForUpdate
JournalEntryBatchFormList getJournalEntryFormsForUpdate(IdList journalEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the journal entry forms for updating an existing set of journal entries. A new journal entry form should be requested for each update transaction.- Parameters:
journalEntryIds- theIdsof theJournalEntry- Returns:
- the journal entry form
- Throws:
NotFoundException- ajournalEntryIdis not foundNullArgumentException-journalEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateJournalEntries
UpdateResponseList updateJournalEntries(JournalEntryBatchFormList journalEntryForms) throws OperationFailedException, PermissionDeniedException Updates existing journal entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
journalEntryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-journalEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllJournalEntries
DeleteResponseList deleteAllJournalEntries() throws OperationFailedException, PermissionDeniedExceptionDeletes allJournalEntriesin thisJournal.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteJournalEntries
DeleteResponseList deleteJournalEntries(IdList journalEntryIds) throws OperationFailedException, PermissionDeniedException Deletes journal entries for the givenIds.- Parameters:
journalEntryIds- theIdsof the journal entries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-journalEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteJournalEntriesForBranch
DeleteResponseList deleteJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException Deletes journal entries for the given branch.- Parameters:
branchId- theIdof a branch- Returns:
- the delete responses
- Throws:
NullArgumentException-branchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteJournalEntriesForSource
DeleteResponseList deleteJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException Deletes journal entries for the given source.- Parameters:
sourceId- theIdof a source- Returns:
- the delete responses
- Throws:
NullArgumentException-sourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteJournalEntriesByDate
DeleteResponseList deleteJournalEntriesByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Deletes journal entries between the given date range inclusive.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the delete responses
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasJournalEntries
AliasResponseList aliasJournalEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aJournalEntryfor the purpose of creating compatibility. The primaryIdof theJournalEntryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another journal entry, it is reassigned to the given entryId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-