jgnash.engine
Class ReconcileManager

java.lang.Object
  extended by jgnash.engine.ReconcileManager

public class ReconcileManager
extends java.lang.Object

Manages the reconciliation options.

Both reconcileIncomeExpense and reconcileBothSides can be false, but only one can be true

Version:
$Id$
Author:
Craig Cavanaugh

Field Summary
private static java.lang.String RECONCILE_BOTHSIDES
           
private static java.lang.String RECONCILE_INCOMEEXPENSE
           
private static boolean reconcileBothSides
           
private static boolean reconcileIncomeExpense
           
 
Constructor Summary
private ReconcileManager()
           
 
Method Summary
static boolean getAutoReconcileBothSides()
          Determines if both sides of a transaction should be automatically reconciled
static boolean getAutoReconcileIncomeExpense()
          Determines if the income or expense side of a transaction should be automatically reconciled
static boolean isAutoReconcileDisabled()
           
static void reconcileTransaction(Account account, Transaction t, boolean reconciled)
          Sets the reconciled state of the transaction using the rules set by the user
static void reconcileTransaction(Account account, Transaction t, ReconciledState reconciled)
          Sets the reconciled state of the transaction using the rules set by the user
static void setAutoReconcileBothSides(boolean reconcile)
          Set so both sides of a double entry transaction are automatically reconciled
static void setAutoReconcileIncomeExpense(boolean reconcile)
          Set so the income or expense side of a transaction is automatically reconciled
static void setDoNotAutoReconcile()
          Disables auto reconciliation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECONCILE_INCOMEEXPENSE

private static final java.lang.String RECONCILE_INCOMEEXPENSE
See Also:
Constant Field Values

RECONCILE_BOTHSIDES

private static final java.lang.String RECONCILE_BOTHSIDES
See Also:
Constant Field Values

reconcileIncomeExpense

private static boolean reconcileIncomeExpense

reconcileBothSides

private static boolean reconcileBothSides
Constructor Detail

ReconcileManager

private ReconcileManager()
Method Detail

setAutoReconcileIncomeExpense

public static void setAutoReconcileIncomeExpense(boolean reconcile)
Set so the income or expense side of a transaction is automatically reconciled

Parameters:
reconcile - true if income and expense accounts should be automatically reconciled

getAutoReconcileIncomeExpense

public static boolean getAutoReconcileIncomeExpense()
Determines if the income or expense side of a transaction should be automatically reconciled

Returns:
true if income and expense accounts should automatically be reconciled.

setAutoReconcileBothSides

public static void setAutoReconcileBothSides(boolean reconcile)
Set so both sides of a double entry transaction are automatically reconciled

Parameters:
reconcile - true if income and expense accounts should be automatically reconciled

getAutoReconcileBothSides

public static boolean getAutoReconcileBothSides()
Determines if both sides of a transaction should be automatically reconciled

Returns:
true if income and expense accounts should automatically be reconciled.

isAutoReconcileDisabled

public static boolean isAutoReconcileDisabled()

setDoNotAutoReconcile

public static void setDoNotAutoReconcile()
Disables auto reconciliation


reconcileTransaction

public static void reconcileTransaction(Account account,
                                        Transaction t,
                                        ReconciledState reconciled)
Sets the reconciled state of the transaction using the rules set by the user

Parameters:
account - Base account
t - Transaction to reconcile
reconciled - Reconciled state

reconcileTransaction

public static void reconcileTransaction(Account account,
                                        Transaction t,
                                        boolean reconciled)
Sets the reconciled state of the transaction using the rules set by the user

Parameters:
account - Base account
t - Transaction to reconcile
reconciled - ReconciledState.RECONCILED if true; ReconciledState.NOT_RECONCILED if false