Coverage Report - org.homeunix.thecave.buddi.plugin.api.model.MutableBudgetCategory
 
Classes in this File Line Coverage Branch Coverage Complexity
MutableBudgetCategory
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.plugin.api.exception.InvalidValueException;
 10  
 
 11  
 public interface MutableBudgetCategory extends ImmutableBudgetCategory, MutableSource {
 12  
         /**
 13  
          * Sets the amount for the budget period which contains the given date.  This is 
 14  
          * defined by the currently selected BudgetCategoryType object associated with
 15  
          * this category.  
 16  
          * @param date
 17  
          * @param amount
 18  
          * @throws InvalidValueException
 19  
          */
 20  
         public void setAmount(Date date, long amount) throws InvalidValueException;
 21  
         
 22  
         /**
 23  
          * Sets the budget period type associated with this budget category.
 24  
          * @return
 25  
          */
 26  
         public void setBudgetCategoryType(ImmutableBudgetCategoryType budgetCategoryType) throws InvalidValueException;
 27  
         
 28  
         /**
 29  
          * Sets whether this budget category represents income or not.
 30  
          * @param income
 31  
          */
 32  
         public void setIncome(boolean income) throws InvalidValueException;
 33  
         
 34  
         /**
 35  
          * Sets the parent of this budget category.  Set to null for no parent.
 36  
          * @param parent
 37  
          */
 38  
         public void setParent(MutableBudgetCategory parent) throws InvalidValueException;        
 39  
         /**
 40  
          * Returns the parent of this ImmutableBudgetCategory, or null if there is no parent.
 41  
          * @return
 42  
          */
 43  
         public MutableBudgetCategory getParent();
 44  
         
 45  
         /**
 46  
          * Returns all visible children of this budget category.  'Visible Children' are
 47  
          * defined to be all children which do not have the deleted flag set, plus all 
 48  
          * children which have the deleted flag set IIF the Preferences define that the user
 49  
          * wants to see deleted sources.
 50  
          * 
 51  
          * This method is mostly used for GUI functions, such as reports and graphs; if you
 52  
          * want to access the model it is usually a better idea to use the getAllChildren()
 53  
          * method, which will return all children regardless of delete flag state.  
 54  
          * @return
 55  
          */
 56  
         public List<MutableBudgetCategory> getMutableChildren();
 57  
         
 58  
         /**
 59  
          * Returns all children of this budget category, regardless of delete flag state. 
 60  
          * @return
 61  
          */
 62  
         public List<MutableBudgetCategory> getAllMutableChildren();
 63  
 }