org.kuali.kfs.gl.batch
Class BalanceForwardRuleHelper

java.lang.Object
  extended by org.kuali.kfs.gl.batch.BalanceForwardRuleHelper

public class BalanceForwardRuleHelper
extends Object

A class to hold significant state for a balance forward job; it also has the methods that actually accomplish the job


Nested Class Summary
static class BalanceForwardRuleHelper.BalanceForwardProcessState
          A container for the state of the balance forward process.
 
Constructor Summary
BalanceForwardRuleHelper()
          Constructs a BalanceForwardRuleHelper
BalanceForwardRuleHelper(Integer closingFiscalYear)
          Constructs a BalanceForwardRuleHelper, using a fiscal year.
BalanceForwardRuleHelper(Integer closingFiscalYear, Date transactionDate, String balanceForwardsclosedFileName, String balanceForwardsUnclosedFileName)
          Constructs a BalanceForwardRuleHelper, but this one goes whole hog: initializes all of the relevant parameters and the balance types to process
 
Method Summary
 OriginEntryFull generateCumulativeForwardOriginEntry(Balance balance)
          This method generates an origin entry for a given cumulative balance forward balance
 OriginEntryFull generateGeneralForwardOriginEntry(Balance balance)
          Creates an origin entry that will forward this "general" balance
 String getAnnualClosingDocType()
          Gets the annualClosingDocType attribute.
 String getBalanceForwardsclosedFileName()
           
 String getBalanceForwardsUnclosedFileName()
           
 Integer getClosingFiscalYear()
           
 String getGlOriginationCode()
          Gets the glOriginationCode attribute.
 BalanceForwardRuleHelper.BalanceForwardProcessState getState()
           
 Date getTransactionDate()
           
 void processCumulativeForwardBalance(Balance balance, PrintStream closedPs, PrintStream unclosedPs)
          This method creates an origin entry for a cumulative balance forward and saves it in its proper origin entry group
 void processGeneralForwardBalance(Balance balance, PrintStream closedPs, PrintStream unclosedPs)
          The balance to create a general balance forward origin entry for
 void setBalanceForwardsclosedFileName(String balanceForwardsclosedFileName)
           
 void setBalanceForwardsUnclosedFileName(String balanceForwardsUnclosedFileName)
           
 void setClosingFiscalYear(Integer fiscalYear)
           
 void setOriginEntryService(OriginEntryService originEntryService)
           
 void setPriorYearAccountService(PriorYearAccountService priorYearAccountService)
           
 void setSubFundGroupService(SubFundGroupService subFundGroupService)
           
 void setTransactionDate(Date transactionDate)
           
 void writeClosedAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService)
          Writes the ledger report for cumulative balance forward entries to the given reportWriterService
 void writeOpenAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService)
          Writes the ledger report for general balance forward entries to the given reportWriterService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BalanceForwardRuleHelper

public BalanceForwardRuleHelper()
Constructs a BalanceForwardRuleHelper


BalanceForwardRuleHelper

public BalanceForwardRuleHelper(Integer closingFiscalYear)
Constructs a BalanceForwardRuleHelper, using a fiscal year. This also initializes object type arrays based on the options of the closing fiscal year

Parameters:
closingFiscalYear - the fiscal year that is closing out

BalanceForwardRuleHelper

public BalanceForwardRuleHelper(Integer closingFiscalYear,
                                Date transactionDate,
                                String balanceForwardsclosedFileName,
                                String balanceForwardsUnclosedFileName)
Constructs a BalanceForwardRuleHelper, but this one goes whole hog: initializes all of the relevant parameters and the balance types to process

Parameters:
closingFiscalYear - the fiscal year to close
transactionDate - the date this job is being run
closedPriorYearAccountGroup - the group to put balance forwarding origin entries with closed accounts into
unclosedPriorYearAccountGroup - the group to put balance forwarding origin entries with open accounts into
Method Detail

processGeneralForwardBalance

public void processGeneralForwardBalance(Balance balance,
                                         PrintStream closedPs,
                                         PrintStream unclosedPs)
The balance to create a general balance forward origin entry for

Parameters:
balance - a balance to create an origin entry for
closedPriorYearAccountGroup - the group to put balance forwarding origin entries with closed accounts into
unclosedPriorYearAccountGroup - the group to put balance forwarding origin entries with open accounts into
Throws:
FatalErrorException

processCumulativeForwardBalance

public void processCumulativeForwardBalance(Balance balance,
                                            PrintStream closedPs,
                                            PrintStream unclosedPs)
This method creates an origin entry for a cumulative balance forward and saves it in its proper origin entry group

Parameters:
balance - a balance which needs to have a cumulative origin entry generated for it
closedPriorYearAccountGroup - the origin entry group where forwarding origin entries with closed prior year accounts go
unclosedPriorYearAcocuntGroup - the origin entry group where forwarding origin entries with open prior year accounts go

generateCumulativeForwardOriginEntry

public OriginEntryFull generateCumulativeForwardOriginEntry(Balance balance)
This method generates an origin entry for a given cumulative balance forward balance

Parameters:
balance - a balance to foward, cumulative style
Returns:
an OriginEntryFull to forward the given balance

generateGeneralForwardOriginEntry

public OriginEntryFull generateGeneralForwardOriginEntry(Balance balance)
Creates an origin entry that will forward this "general" balance

Parameters:
balance - the balance to create a general origin entry for
Returns:
the generated origin entry

writeOpenAccountBalanceForwardLedgerSummaryReport

public void writeOpenAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService)
Writes the ledger report for general balance forward entries to the given reportWriterService

Parameters:
reportWriteService - the reportWriterService to write to

writeClosedAccountBalanceForwardLedgerSummaryReport

public void writeClosedAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService)
Writes the ledger report for cumulative balance forward entries to the given reportWriterService

Parameters:
reportWriteService - the reportWriterService to write to

setPriorYearAccountService

public void setPriorYearAccountService(PriorYearAccountService priorYearAccountService)
Parameters:
priorYearAccountService - The priorYearAccountService to set.

setSubFundGroupService

public void setSubFundGroupService(SubFundGroupService subFundGroupService)
Parameters:
subFundGroupService - The subFundGroupService to set.

setOriginEntryService

public void setOriginEntryService(OriginEntryService originEntryService)
Parameters:
originEntryService - The originEntryService to set.

getClosingFiscalYear

public Integer getClosingFiscalYear()

setClosingFiscalYear

public void setClosingFiscalYear(Integer fiscalYear)

getTransactionDate

public Date getTransactionDate()

setTransactionDate

public void setTransactionDate(Date transactionDate)

getBalanceForwardsUnclosedFileName

public String getBalanceForwardsUnclosedFileName()

setBalanceForwardsUnclosedFileName

public void setBalanceForwardsUnclosedFileName(String balanceForwardsUnclosedFileName)

getBalanceForwardsclosedFileName

public String getBalanceForwardsclosedFileName()

setBalanceForwardsclosedFileName

public void setBalanceForwardsclosedFileName(String balanceForwardsclosedFileName)

getState

public BalanceForwardRuleHelper.BalanceForwardProcessState getState()

getGlOriginationCode

public String getGlOriginationCode()
Gets the glOriginationCode attribute.

Returns:
Returns the glOriginationCode.

getAnnualClosingDocType

public String getAnnualClosingDocType()
Gets the annualClosingDocType attribute.

Returns:
Returns the annualClosingDocType.


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