org.homeunix.thecave.buddi.plugin.api.model
Class MutableModelFactory

java.lang.Object
  extended by org.homeunix.thecave.buddi.plugin.api.model.MutableModelFactory

public class MutableModelFactory
extends java.lang.Object


Constructor Summary
MutableModelFactory()
           
 
Method Summary
static MutableDocument createDocument()
          Creates a new MutableModel, with the default budget categories, types, etc.
static MutableDocument createDocument(java.io.File file)
          Loads an existing MutableModel from the specified file.
static MutableAccount createMutableAccount(java.lang.String name, long startingBalance, MutableAccountType type)
          Creates a new MutableAccount with the given details.
static MutableAccountType createMutableAccountType(java.lang.String name, boolean credit)
          Creates a new MutableAccountType with the given details.
static MutableBudgetCategory createMutableBudgetCategory(java.lang.String name, ImmutableBudgetCategoryType periodType, boolean isIncome)
          Creates a new MutableBudgetCategory with the given details.
static MutableScheduledTransaction createMutableScheduledTransaction(java.lang.String name, java.lang.String message, java.util.Date startDate, java.util.Date endDate, java.lang.String frequencyType, int scheduleDay, int scheduleWeek, int scheduleMonth, java.util.Date date, java.lang.String description, long amount, MutableSource from, MutableSource to)
          Creates a new MutableScheduledTransaction
static MutableTransaction createMutableTransaction(java.util.Date date, java.lang.String description, long amount, MutableSource from, MutableSource to)
          Creates a new MutableTransaction with the given details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableModelFactory

public MutableModelFactory()
Method Detail

createDocument

public static MutableDocument createDocument()
                                      throws ModelException
Creates a new MutableModel, with the default budget categories, types, etc.

Returns:
Throws:
ModelException

createDocument

public static MutableDocument createDocument(java.io.File file)
                                      throws DocumentLoadException,
                                             OperationCancelledException
Loads an existing MutableModel from the specified file.

Parameters:
file -
Returns:
Throws:
DocumentLoadException
OperationCancelledException

createMutableAccount

public static MutableAccount createMutableAccount(java.lang.String name,
                                                  long startingBalance,
                                                  MutableAccountType type)
                                           throws ModelException
Creates a new MutableAccount with the given details.

Parameters:
name -
startingBalance -
type -
Returns:
Throws:
ModelException

createMutableAccountType

public static MutableAccountType createMutableAccountType(java.lang.String name,
                                                          boolean credit)
                                                   throws ModelException
Creates a new MutableAccountType with the given details.

Parameters:
name -
credit -
Returns:
Throws:
ModelException

createMutableBudgetCategory

public static MutableBudgetCategory createMutableBudgetCategory(java.lang.String name,
                                                                ImmutableBudgetCategoryType periodType,
                                                                boolean isIncome)
                                                         throws ModelException
Creates a new MutableBudgetCategory with the given details.

Parameters:
name -
periodType -
isIncome -
Returns:
Throws:
ModelException

createMutableScheduledTransaction

public static MutableScheduledTransaction createMutableScheduledTransaction(java.lang.String name,
                                                                            java.lang.String message,
                                                                            java.util.Date startDate,
                                                                            java.util.Date endDate,
                                                                            java.lang.String frequencyType,
                                                                            int scheduleDay,
                                                                            int scheduleWeek,
                                                                            int scheduleMonth,
                                                                            java.util.Date date,
                                                                            java.lang.String description,
                                                                            long amount,
                                                                            MutableSource from,
                                                                            MutableSource to)
                                                                     throws ModelException
Creates a new MutableScheduledTransaction

Returns:
Throws:
ModelException

createMutableTransaction

public static MutableTransaction createMutableTransaction(java.util.Date date,
                                                          java.lang.String description,
                                                          long amount,
                                                          MutableSource from,
                                                          MutableSource to)
                                                   throws ModelException
Creates a new MutableTransaction with the given details.

Parameters:
date -
description -
amount -
from -
to -
Returns:
Throws:
ModelException