Coverage Report - org.homeunix.thecave.buddi.plugin.api.model.MutableDocument
 
Classes in this File Line Coverage Branch Coverage Complexity
MutableDocument
N/A
N/A
1
 
 1  
 /*
 2  
  * Created on Aug 22, 2007 by wyatt
 3  
  */
 4  
 package org.homeunix.thecave.buddi.plugin.api.model;
 5  
 
 6  
 import java.util.Date;
 7  
 import java.util.List;
 8  
 
 9  
 import org.homeunix.thecave.buddi.model.Document;
 10  
 import org.homeunix.thecave.buddi.plugin.api.exception.ModelException;
 11  
 
 12  
 public interface MutableDocument extends ImmutableDocument {
 13  
 
 14  
         /**
 15  
          * Returns the account referenced by the given name.
 16  
          * @param name
 17  
          * @return
 18  
          */
 19  
         public MutableAccount getAccount(String name);
 20  
         
 21  
         /**
 22  
          * Returns a list of all immutable accounts in the model
 23  
          * @return
 24  
          */
 25  
         public List<MutableAccount> getMutableAccounts();
 26  
         
 27  
         /**
 28  
          * Returns a list of all immutable budget categories in the model
 29  
          * @return
 30  
          */
 31  
         public List<MutableBudgetCategory> getMutableBudgetCategories();
 32  
         
 33  
         /**
 34  
          * Returns the budget category referenced by the given full name.
 35  
          * @param fullName
 36  
          * @return
 37  
          */
 38  
         public MutableBudgetCategory getBudgetCategory(String fullName);
 39  
         
 40  
         /**
 41  
          * Returns the wrapped object from the underlying data model.  By 
 42  
          * accessing this method, you bypass all protection which the Buddi API
 43  
          * gives you; it is not recommended to use this method unless you understand
 44  
          * the risks associated with it. 
 45  
          * @return
 46  
          */
 47  
         public Document getModel();
 48  
         
 49  
         /**
 50  
          * Returns a list of all immutable transactions in the model
 51  
          * @return
 52  
          */
 53  
         public List<MutableTransaction> getMutableTransactions();
 54  
         
 55  
         /**
 56  
          * Returns a list of all immutable transactions in the model which are
 57  
          * between startDate and endDate
 58  
          * @return
 59  
          */
 60  
         public List<MutableTransaction> getMutableTransactions(Date startDate, Date endDate);
 61  
         
 62  
         /**
 63  
          * Returns a list of all immutable transactions in the model which are
 64  
          * associatd with the given source
 65  
          * @return
 66  
          */
 67  
         public List<MutableTransaction> getMutableTransactions(MutableSource source);
 68  
         
 69  
         /**
 70  
          * Returns a list of all immutable transactions in the model which are associated with
 71  
          * source and between startDate and endDate
 72  
          * @return
 73  
          */
 74  
         public List<MutableTransaction> getMutableTransactions(MutableSource source, Date startDate, Date endDate);
 75  
         
 76  
         /**
 77  
          * Returns the type referenced by the given name.
 78  
          * @param name
 79  
          * @return
 80  
          */
 81  
         public MutableAccountType getAccountType(String name);
 82  
         
 83  
         /**
 84  
          * Returns a list of all immutable types in the model
 85  
          * @return
 86  
          */
 87  
         public List<MutableAccountType> getMutableAccountTypes();
 88  
         
 89  
         
 90  
         
 91  
         
 92  
         /**
 93  
          * Adds an account to the model
 94  
          * @param account
 95  
          */
 96  
         public void addAccount(MutableAccount account) throws ModelException;
 97  
         
 98  
         /**
 99  
          * Adds a type to the model
 100  
          * @param type
 101  
          */
 102  
         public void addAccountType(MutableAccountType type) throws ModelException;
 103  
         
 104  
         /**
 105  
          * Adds a budget category to the model
 106  
          * @param budgetCategory
 107  
          */
 108  
         public void addBudgetCategory(MutableBudgetCategory budgetCategory) throws ModelException;
 109  
         
 110  
         /**
 111  
          * Adds a scheduled transaction to the model
 112  
          * @param scheduledTransaction
 113  
          */
 114  
         public void addScheduledTransaction(MutableScheduledTransaction scheduledTransaction) throws ModelException;
 115  
         
 116  
         /**
 117  
          * Adds a transaction to the model
 118  
          * @param transaction
 119  
          */
 120  
         public void addTransaction(MutableTransaction transaction) throws ModelException;
 121  
         
 122  
         /**
 123  
          * Removes the given account from the model
 124  
          * @param account
 125  
          */
 126  
         public void removeAccount(MutableAccount account) throws ModelException;
 127  
         
 128  
         /**
 129  
          * Removes the given budget category from the model
 130  
          * @param budgetCategory
 131  
          */
 132  
         public void removeBudgetCategory(MutableBudgetCategory budgetCategory) throws ModelException;
 133  
         
 134  
         /**
 135  
          * Removes the given scheduled transaction from the model
 136  
          * @param scheduledTransaction
 137  
          */
 138  
         public void removeScheduledTransaction(MutableScheduledTransaction scheduledTransaction) throws ModelException;
 139  
         
 140  
         /**
 141  
          * Removes the given transaction from the model
 142  
          * @param transaction
 143  
          */
 144  
         public void removeTransaction(MutableTransaction transaction) throws ModelException;
 145  
         
 146  
         /**
 147  
          * Removes the given type from the model
 148  
          * @param type
 149  
          */
 150  
         public void removeType(MutableAccountType type) throws ModelException;
 151  
 }