org.homeunix.thecave.buddi.plugin.api.model
Interface MutableDocument

All Superinterfaces:
java.lang.Comparable<ImmutableModelObject>, ImmutableDocument, ImmutableModelObject
All Known Implementing Classes:
MutableDocumentImpl

public interface MutableDocument
extends ImmutableDocument


Method Summary
 void addAccount(MutableAccount account)
          Adds an account to the model
 void addAccountType(MutableAccountType type)
          Adds a type to the model
 void addBudgetCategory(MutableBudgetCategory budgetCategory)
          Adds a budget category to the model
 void addScheduledTransaction(MutableScheduledTransaction scheduledTransaction)
          Adds a scheduled transaction to the model
 void addTransaction(MutableTransaction transaction)
          Adds a transaction to the model
 MutableAccount getAccount(java.lang.String name)
          Returns the account referenced by the given name.
 MutableAccountType getAccountType(java.lang.String name)
          Returns the type referenced by the given name.
 MutableBudgetCategory getBudgetCategory(java.lang.String fullName)
          Returns the budget category referenced by the given full name.
 Document getModel()
          Returns the wrapped object from the underlying data model.
 java.util.List<MutableAccount> getMutableAccounts()
          Returns a list of all immutable accounts in the model
 java.util.List<MutableAccountType> getMutableAccountTypes()
          Returns a list of all immutable types in the model
 java.util.List<MutableBudgetCategory> getMutableBudgetCategories()
          Returns a list of all immutable budget categories in the model
 java.util.List<MutableTransaction> getMutableTransactions()
          Returns a list of all immutable transactions in the model
 java.util.List<MutableTransaction> getMutableTransactions(java.util.Date startDate, java.util.Date endDate)
          Returns a list of all immutable transactions in the model which are between startDate and endDate
 java.util.List<MutableTransaction> getMutableTransactions(MutableSource source)
          Returns a list of all immutable transactions in the model which are associatd with the given source
 java.util.List<MutableTransaction> getMutableTransactions(MutableSource source, java.util.Date startDate, java.util.Date endDate)
          Returns a list of all immutable transactions in the model which are associated with source and between startDate and endDate
 void removeAccount(MutableAccount account)
          Removes the given account from the model
 void removeBudgetCategory(MutableBudgetCategory budgetCategory)
          Removes the given budget category from the model
 void removeScheduledTransaction(MutableScheduledTransaction scheduledTransaction)
          Removes the given scheduled transaction from the model
 void removeTransaction(MutableTransaction transaction)
          Removes the given transaction from the model
 void removeType(MutableAccountType type)
          Removes the given type from the model
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableDocument
getBudgetCategoryType, getBudgetCategoryType, getImmutableAccounts, getImmutableAccountTypes, getImmutableBudgetCategories, getImmutableTransactions, getImmutableTransactions, getImmutableTransactions, getImmutableTransactions, getNetWorth
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableModelObject
getModified, getRaw, getUid
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getAccount

MutableAccount getAccount(java.lang.String name)
Returns the account referenced by the given name.

Specified by:
getAccount in interface ImmutableDocument
Parameters:
name -
Returns:

getMutableAccounts

java.util.List<MutableAccount> getMutableAccounts()
Returns a list of all immutable accounts in the model

Returns:

getMutableBudgetCategories

java.util.List<MutableBudgetCategory> getMutableBudgetCategories()
Returns a list of all immutable budget categories in the model

Returns:

getBudgetCategory

MutableBudgetCategory getBudgetCategory(java.lang.String fullName)
Returns the budget category referenced by the given full name.

Specified by:
getBudgetCategory in interface ImmutableDocument
Parameters:
fullName -
Returns:

getModel

Document getModel()
Returns the wrapped object from the underlying data model. By accessing this method, you bypass all protection which the Buddi API gives you; it is not recommended to use this method unless you understand the risks associated with it.

Specified by:
getModel in interface ImmutableDocument
Returns:

getMutableTransactions

java.util.List<MutableTransaction> getMutableTransactions()
Returns a list of all immutable transactions in the model

Returns:

getMutableTransactions

java.util.List<MutableTransaction> getMutableTransactions(java.util.Date startDate,
                                                          java.util.Date endDate)
Returns a list of all immutable transactions in the model which are between startDate and endDate

Returns:

getMutableTransactions

java.util.List<MutableTransaction> getMutableTransactions(MutableSource source)
Returns a list of all immutable transactions in the model which are associatd with the given source

Returns:

getMutableTransactions

java.util.List<MutableTransaction> getMutableTransactions(MutableSource source,
                                                          java.util.Date startDate,
                                                          java.util.Date endDate)
Returns a list of all immutable transactions in the model which are associated with source and between startDate and endDate

Returns:

getAccountType

MutableAccountType getAccountType(java.lang.String name)
Returns the type referenced by the given name.

Specified by:
getAccountType in interface ImmutableDocument
Parameters:
name -
Returns:

getMutableAccountTypes

java.util.List<MutableAccountType> getMutableAccountTypes()
Returns a list of all immutable types in the model

Returns:

addAccount

void addAccount(MutableAccount account)
                throws ModelException
Adds an account to the model

Parameters:
account -
Throws:
ModelException

addAccountType

void addAccountType(MutableAccountType type)
                    throws ModelException
Adds a type to the model

Parameters:
type -
Throws:
ModelException

addBudgetCategory

void addBudgetCategory(MutableBudgetCategory budgetCategory)
                       throws ModelException
Adds a budget category to the model

Parameters:
budgetCategory -
Throws:
ModelException

addScheduledTransaction

void addScheduledTransaction(MutableScheduledTransaction scheduledTransaction)
                             throws ModelException
Adds a scheduled transaction to the model

Parameters:
scheduledTransaction -
Throws:
ModelException

addTransaction

void addTransaction(MutableTransaction transaction)
                    throws ModelException
Adds a transaction to the model

Parameters:
transaction -
Throws:
ModelException

removeAccount

void removeAccount(MutableAccount account)
                   throws ModelException
Removes the given account from the model

Parameters:
account -
Throws:
ModelException

removeBudgetCategory

void removeBudgetCategory(MutableBudgetCategory budgetCategory)
                          throws ModelException
Removes the given budget category from the model

Parameters:
budgetCategory -
Throws:
ModelException

removeScheduledTransaction

void removeScheduledTransaction(MutableScheduledTransaction scheduledTransaction)
                                throws ModelException
Removes the given scheduled transaction from the model

Parameters:
scheduledTransaction -
Throws:
ModelException

removeTransaction

void removeTransaction(MutableTransaction transaction)
                       throws ModelException
Removes the given transaction from the model

Parameters:
transaction -
Throws:
ModelException

removeType

void removeType(MutableAccountType type)
                throws ModelException
Removes the given type from the model

Parameters:
type -
Throws:
ModelException