org.kuali.kfs.gl.document.service
Interface CorrectionDocumentService

All Known Implementing Classes:
CorrectionDocumentServiceImpl, LaborCorrectionDocumentServiceImpl

public interface CorrectionDocumentService

An interface declaring methods needed by the GLCP to function


Field Summary
static String CORRECTION_TYPE_CRITERIA
           
static String CORRECTION_TYPE_MANUAL
           
static String CORRECTION_TYPE_REMOVE_GROUP_FROM_PROCESSING
           
static String SYSTEM_DATABASE
           
static String SYSTEM_UPLOAD
           
static int UNLIMITED_ABORT_THRESHOLD
          When passed into #retrievePersistedInputOriginEntries(CorrectionDocument, int) and #retrievePersistedOutputOriginEntries(CorrectionDocument, int) as the int parameter, this will signify that there is no abort threshold (i.e.
 
Method Summary
 void aggregateCorrectionDocumentReports(GeneralLedgerCorrectionProcessDocument document)
           
 boolean areInputOriginEntriesPersisted(GeneralLedgerCorrectionProcessDocument document)
          Returns true if the system is storing input origin entries for this class.
 boolean areOutputOriginEntriesPersisted(GeneralLedgerCorrectionProcessDocument document)
          Returns true if the system is storing output origin entries for this class.
 String createOutputFileForProcessing(String docId, Date today)
           
 GeneralLedgerCorrectionProcessDocument findByCorrectionDocumentHeaderId(String docId)
          Retrieves a correction document by the document id
 List findByDocumentHeaderIdAndCorrectionGroupNumber(String docId, int i)
          Finds CollectionChange records associated with a given document id and correction change group
 CorrectionChangeGroup findByDocumentNumberAndCorrectionChangeGroupNumber(String docId, int i)
          Returns a specific correction change group for a GLCP document
 List findByDocumentNumberAndCorrectionGroupNumber(String docId, int i)
          Finds Collection Criteria associated with the given GLCP document and group
 String[] findExistingCorrectionOutputFilesForDocument(String documentNumber)
          Finds any existing output files for the given document.
 void generateCorrectionReport(GeneralLedgerCorrectionProcessDocument document)
          Generate a text report for the given correction document
 String generateOutputOriginEntryFileName(String docId)
           
 String getBatchFileDirectoryName()
           
 Collection<GeneralLedgerCorrectionProcessDocument> getCorrectionDocumentsFinalizedOn(Date date)
          Retrieves all of the documents that were finalized on a certain date
 String getGlcpDirectoryName()
           
 List<org.kuali.rice.kns.web.ui.Column> getTableRenderColumnMetadata(String docId)
          Returns metadata to help render columns in the GLCP.
 void persistInputOriginEntriesForInitiatedOrSavedDocument(GeneralLedgerCorrectionProcessDocument document, Iterator<OriginEntryFull> entries)
          This method persists an Iterator of input origin entries for a document that is in the initiated or saved state
 void persistOriginEntryGroupsForDocumentSave(GeneralLedgerCorrectionProcessDocument document, CorrectionDocumentEntryMetadata correctionDocumentEntryMetadata)
          Saves the input and output origin entry groups for a document prior to saving the document
 void persistOutputOriginEntriesForInitiatedOrSavedDocument(GeneralLedgerCorrectionProcessDocument document, Iterator<OriginEntryFull> entries)
          This method persists an Iterator of input origin entries for a document that is in the initiated or saved state
 void removePersistedInputOriginEntries(GeneralLedgerCorrectionProcessDocument document)
          Removes input origin entries that were saved to the database associated with the given document
 void removePersistedInputOriginEntries(String docId)
          Removes input origin entries that were saved to the database associated with the given document
 void removePersistedOutputOriginEntries(GeneralLedgerCorrectionProcessDocument document)
          Removes all output origin entries persisted in the database created by the given document
 void removePersistedOutputOriginEntries(String docId)
          Removes all output origin entries persisted in the database created by the given document
 List<OriginEntryFull> retrievePersistedInputOriginEntries(GeneralLedgerCorrectionProcessDocument document, int abortThreshold)
          Retrieves input origin entries that have been persisted for this document
 Iterator<OriginEntryFull> retrievePersistedInputOriginEntriesAsIterator(GeneralLedgerCorrectionProcessDocument document)
          Retrieves input origin entries that have been persisted for this document in an iterator.
 List<OriginEntryFull> retrievePersistedOutputOriginEntries(GeneralLedgerCorrectionProcessDocument document, int abortThreshold)
          Retrieves output origin entries that have been persisted for this document
 Iterator<OriginEntryFull> retrievePersistedOutputOriginEntriesAsIterator(GeneralLedgerCorrectionProcessDocument document)
          Retrieves output origin entries that have been persisted for this document in an iterator.
 void writePersistedInputOriginEntriesToStream(GeneralLedgerCorrectionProcessDocument document, OutputStream out)
          Writes out the persisted input origin entries in an OutputStream in a flat file format
 void writePersistedOutputOriginEntriesToStream(GeneralLedgerCorrectionProcessDocument document, OutputStream out)
          Writes out the persisted output origin entries in an OutputStream in a flat file format\
 

Field Detail

CORRECTION_TYPE_MANUAL

static final String CORRECTION_TYPE_MANUAL
See Also:
Constant Field Values

CORRECTION_TYPE_CRITERIA

static final String CORRECTION_TYPE_CRITERIA
See Also:
Constant Field Values

CORRECTION_TYPE_REMOVE_GROUP_FROM_PROCESSING

static final String CORRECTION_TYPE_REMOVE_GROUP_FROM_PROCESSING
See Also:
Constant Field Values

SYSTEM_DATABASE

static final String SYSTEM_DATABASE
See Also:
Constant Field Values

SYSTEM_UPLOAD

static final String SYSTEM_UPLOAD
See Also:
Constant Field Values

UNLIMITED_ABORT_THRESHOLD

static final int UNLIMITED_ABORT_THRESHOLD
When passed into #retrievePersistedInputOriginEntries(CorrectionDocument, int) and #retrievePersistedOutputOriginEntries(CorrectionDocument, int) as the int parameter, this will signify that there is no abort threshold (i.e. the methods should return all of the persisted rows, regardless of number of rows.

See Also:
Constant Field Values
Method Detail

findByDocumentNumberAndCorrectionChangeGroupNumber

CorrectionChangeGroup findByDocumentNumberAndCorrectionChangeGroupNumber(String docId,
                                                                         int i)
Returns a specific correction change group for a GLCP document

Parameters:
docId - the document id of a GLCP document
i - the number of the correction group within the document
Returns:
a CorrectionChangeGroup

findByDocumentHeaderIdAndCorrectionGroupNumber

List findByDocumentHeaderIdAndCorrectionGroupNumber(String docId,
                                                    int i)
Finds CollectionChange records associated with a given document id and correction change group

Parameters:
docId - the document id of a GLCP document
i - the number of the correction group within the document
Returns:
a List of qualifying CorrectionChange records

findByDocumentNumberAndCorrectionGroupNumber

List findByDocumentNumberAndCorrectionGroupNumber(String docId,
                                                  int i)
Finds Collection Criteria associated with the given GLCP document and group

Parameters:
docId - the document id of a GLCP document
i - the number of the correction group within the document
Returns:
a List of qualifying CorrectionCriteria

findByCorrectionDocumentHeaderId

GeneralLedgerCorrectionProcessDocument findByCorrectionDocumentHeaderId(String docId)
Retrieves a correction document by the document id

Parameters:
docId - the document id of the GLCP to find
Returns:
a CorrectionDocument if found

getTableRenderColumnMetadata

List<org.kuali.rice.kns.web.ui.Column> getTableRenderColumnMetadata(String docId)
Returns metadata to help render columns in the GLCP. Do not modify this list or the contents in this list.

Parameters:
docId - the document id of a GLCP document
Returns:
a List of Columns to render

persistInputOriginEntriesForInitiatedOrSavedDocument

void persistInputOriginEntriesForInitiatedOrSavedDocument(GeneralLedgerCorrectionProcessDocument document,
                                                          Iterator<OriginEntryFull> entries)
This method persists an Iterator of input origin entries for a document that is in the initiated or saved state

Parameters:
document - an initiated or saved document
entries - an Iterator of origin entries

removePersistedInputOriginEntries

void removePersistedInputOriginEntries(GeneralLedgerCorrectionProcessDocument document)
Removes input origin entries that were saved to the database associated with the given document

Parameters:
document - a GLCP document

removePersistedInputOriginEntries

void removePersistedInputOriginEntries(String docId)
Removes input origin entries that were saved to the database associated with the given document

Parameters:
docId - the document id of a GLCP document

retrievePersistedInputOriginEntries

List<OriginEntryFull> retrievePersistedInputOriginEntries(GeneralLedgerCorrectionProcessDocument document,
                                                          int abortThreshold)
Retrieves input origin entries that have been persisted for this document

Parameters:
document - the document
abortThreshold - if the file exceeds this number of rows, then null is returned. UNLIMITED_ABORT_THRESHOLD signifies that there is no limit
Returns:
the list, or null if there are too many origin entries
Throws:
RuntimeException - several reasons, primarily relating to underlying persistence layer problems

areInputOriginEntriesPersisted

boolean areInputOriginEntriesPersisted(GeneralLedgerCorrectionProcessDocument document)
Returns true if the system is storing input origin entries for this class. Note that this does not mean that there's at least one input origin entry record persisted for this document, but merely returns true if and only if the underlying persistence mechanism has a record of this document's origin entries. See the docs for the implementations of this method for more implementation specific details.

Parameters:
document - a GLCP document
Returns:
Returns true if system should store origin entries, false otherwise

writePersistedInputOriginEntriesToStream

void writePersistedInputOriginEntriesToStream(GeneralLedgerCorrectionProcessDocument document,
                                              OutputStream out)
                                              throws IOException
Writes out the persisted input origin entries in an OutputStream in a flat file format

Parameters:
document - a GLCP document
out - an open and ready output stream
Throws:
IOException - thrown if errors were encountered writing to the Stream
RuntimeException - several reasons, including if the entries are not persisted

persistOutputOriginEntriesForInitiatedOrSavedDocument

void persistOutputOriginEntriesForInitiatedOrSavedDocument(GeneralLedgerCorrectionProcessDocument document,
                                                           Iterator<OriginEntryFull> entries)
This method persists an Iterator of input origin entries for a document that is in the initiated or saved state

Parameters:
document - an initiated or saved document
entries - an Iterator of OriginEntries to persist

removePersistedOutputOriginEntries

void removePersistedOutputOriginEntries(GeneralLedgerCorrectionProcessDocument document)
Removes all output origin entries persisted in the database created by the given document

Parameters:
document - a GLCP document

removePersistedOutputOriginEntries

void removePersistedOutputOriginEntries(String docId)
Removes all output origin entries persisted in the database created by the given document

Parameters:
docId - the document id of a GLCP document

retrievePersistedOutputOriginEntries

List<OriginEntryFull> retrievePersistedOutputOriginEntries(GeneralLedgerCorrectionProcessDocument document,
                                                           int abortThreshold)
Retrieves output origin entries that have been persisted for this document

Parameters:
document - the document
abortThreshold - if the file exceeds this number of rows, then null is returned. UNLIMITED_ABORT_THRESHOLD signifies that there is no limit
Returns:
the list, or null if there are too many origin entries
Throws:
RuntimeException - several reasons, primarily relating to underlying persistence layer problems

retrievePersistedInputOriginEntriesAsIterator

Iterator<OriginEntryFull> retrievePersistedInputOriginEntriesAsIterator(GeneralLedgerCorrectionProcessDocument document)
Retrieves input origin entries that have been persisted for this document in an iterator. Implementations of this method may choose to implement this method in a way that consumes very little memory.

Parameters:
document - the document
Returns:
the iterator
Throws:
RuntimeException - several reasons, primarily relating to underlying persistence layer problems

retrievePersistedOutputOriginEntriesAsIterator

Iterator<OriginEntryFull> retrievePersistedOutputOriginEntriesAsIterator(GeneralLedgerCorrectionProcessDocument document)
Retrieves output origin entries that have been persisted for this document in an iterator. Implementations of this method may choose to implement this method in a way that consumes very little memory.

Parameters:
document - the document
Returns:
the iterator
Throws:
RuntimeException - several reasons, primarily relating to underlying persistence layer problems

areOutputOriginEntriesPersisted

boolean areOutputOriginEntriesPersisted(GeneralLedgerCorrectionProcessDocument document)
Returns true if the system is storing output origin entries for this class. Note that this does not mean that there's at least one output origin entry record persisted for this document, but merely returns true if and only if the underlying persistence mechanism has a record of this document's origin entries. See the docs for the implementations of this method for more implementation specific details.

Parameters:
document - a GLCP document to query
Returns:
true if origin entries are stored to the system, false otherwise

writePersistedOutputOriginEntriesToStream

void writePersistedOutputOriginEntriesToStream(GeneralLedgerCorrectionProcessDocument document,
                                               OutputStream out)
                                               throws IOException
Writes out the persisted output origin entries in an OutputStream in a flat file format\

Parameters:
document - a GLCP document
out - axn open and ready output stream
Throws:
IOException - thrown if IOExceptions occurred in writing the persisted origin entries
RuntimeException - several reasons, including if the entries are not persisted

persistOriginEntryGroupsForDocumentSave

void persistOriginEntryGroupsForDocumentSave(GeneralLedgerCorrectionProcessDocument document,
                                             CorrectionDocumentEntryMetadata correctionDocumentEntryMetadata)
Saves the input and output origin entry groups for a document prior to saving the document

Parameters:
document - a GLCP document
correctionDocumentEntryMetadata - metadata about this GLCP document

getCorrectionDocumentsFinalizedOn

Collection<GeneralLedgerCorrectionProcessDocument> getCorrectionDocumentsFinalizedOn(Date date)
Retrieves all of the documents that were finalized on a certain date

Parameters:
date - the date to find GLCP documents finalized on
Returns:
a collection of documents

generateOutputOriginEntryFileName

String generateOutputOriginEntryFileName(String docId)

createOutputFileForProcessing

String createOutputFileForProcessing(String docId,
                                     Date today)

getBatchFileDirectoryName

String getBatchFileDirectoryName()

getGlcpDirectoryName

String getGlcpDirectoryName()

generateCorrectionReport

void generateCorrectionReport(GeneralLedgerCorrectionProcessDocument document)
Generate a text report for the given correction document

Parameters:
document - GLCP document to report on

aggregateCorrectionDocumentReports

void aggregateCorrectionDocumentReports(GeneralLedgerCorrectionProcessDocument document)

findExistingCorrectionOutputFilesForDocument

String[] findExistingCorrectionOutputFilesForDocument(String documentNumber)
Finds any existing output files for the given document. Used to prevent double-processing.

Parameters:
documentNumber -
Returns:


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.