| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ScheduledTransaction |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Created on Jul 30, 2007 by wyatt | |
| 3 | */ | |
| 4 | package org.homeunix.thecave.buddi.model; | |
| 5 | ||
| 6 | import java.util.Date; | |
| 7 | ||
| 8 | import org.homeunix.thecave.buddi.plugin.api.exception.InvalidValueException; | |
| 9 | ||
| 10 | /** | |
| 11 | * @author wyatt | |
| 12 | * | |
| 13 | */ | |
| 14 | public interface ScheduledTransaction extends Transaction { | |
| 15 | ||
| 16 | /** | |
| 17 | * Returns the end date | |
| 18 | * @return | |
| 19 | */ | |
| 20 | public Date getEndDate(); | |
| 21 | ||
| 22 | /** | |
| 23 | * Sets the frequency type | |
| 24 | * @return | |
| 25 | */ | |
| 26 | public String getFrequencyType(); | |
| 27 | ||
| 28 | /** | |
| 29 | * Gets the last day on which a transaction was created. If there have been | |
| 30 | * no transactions created from this schedule yet, return null. | |
| 31 | * @return | |
| 32 | */ | |
| 33 | public Date getLastDayCreated(); | |
| 34 | ||
| 35 | /** | |
| 36 | * Returns the message with this scheduled transaction. | |
| 37 | * @return | |
| 38 | */ | |
| 39 | public String getMessage(); | |
| 40 | ||
| 41 | /** | |
| 42 | * Returns the scheduled day. This may have different meanings depending on the | |
| 43 | * frequency type. | |
| 44 | * @return | |
| 45 | */ | |
| 46 | public int getScheduleDay(); | |
| 47 | ||
| 48 | /** | |
| 49 | * Returns the scheduled month. This may have different meanings depending on the | |
| 50 | *frequency type. | |
| 51 | * @return | |
| 52 | */ | |
| 53 | public int getScheduleMonth(); | |
| 54 | ||
| 55 | /** | |
| 56 | * Returns the name of this scheduled transaction. This is the name which shows up | |
| 57 | * in the main scheduled transaction list. | |
| 58 | * @return | |
| 59 | */ | |
| 60 | public String getScheduleName(); | |
| 61 | ||
| 62 | /** | |
| 63 | * Returns the scheduled week. This may have different meanings depending on the | |
| 64 | * frequency type. | |
| 65 | * @return | |
| 66 | */ | |
| 67 | public int getScheduleWeek(); | |
| 68 | ||
| 69 | /** | |
| 70 | * Returns the date on which this scheduled transaction is to start. | |
| 71 | * @return | |
| 72 | */ | |
| 73 | public Date getStartDate(); | |
| 74 | ||
| 75 | /** | |
| 76 | * Sets the end date for this scheduled transaction. | |
| 77 | * @param endDate | |
| 78 | * @throws InvalidValueException | |
| 79 | */ | |
| 80 | public void setEndDate(Date endDate) throws InvalidValueException; | |
| 81 | ||
| 82 | /** | |
| 83 | * Sets the frequency type for this scheduled transaction. This must | |
| 84 | * be the string representation of one of the ScheduleFrequency enum | |
| 85 | * values. | |
| 86 | * @param frequencyType | |
| 87 | * @throws InvalidValueException | |
| 88 | */ | |
| 89 | public void setFrequencyType(String frequencyType) throws InvalidValueException; | |
| 90 | ||
| 91 | /** | |
| 92 | * Sets the last day created. This is used to keep track of where we left | |
| 93 | * off with the last scheduled transaction, to avoid duplicates and keep | |
| 94 | * the time needed to run schedule checks to a minimum. | |
| 95 | * @param lastDayCreated | |
| 96 | * @throws InvalidValueException | |
| 97 | */ | |
| 98 | public void setLastDayCreated(Date lastDayCreated) throws InvalidValueException; | |
| 99 | ||
| 100 | /** | |
| 101 | * Sets the message | |
| 102 | * @param message | |
| 103 | * @throws InvalidValueException | |
| 104 | */ | |
| 105 | public void setMessage(String message) throws InvalidValueException; | |
| 106 | ||
| 107 | /** | |
| 108 | * Sets the schedule day. This has different meanings based on the schedule frequency. | |
| 109 | * @param scheduleDay | |
| 110 | * @throws InvalidValueException | |
| 111 | */ | |
| 112 | public void setScheduleDay(int scheduleDay) throws InvalidValueException; | |
| 113 | ||
| 114 | /** | |
| 115 | * Sets the schedule month. This has different meanings based on the schedule frequency. | |
| 116 | * @param scheduleMonth | |
| 117 | * @throws InvalidValueException | |
| 118 | */ | |
| 119 | public void setScheduleMonth(int scheduleMonth) throws InvalidValueException; | |
| 120 | ||
| 121 | /** | |
| 122 | * Sets the scheduled transaction name | |
| 123 | * @param scheduleName | |
| 124 | * @throws InvalidValueException | |
| 125 | */ | |
| 126 | public void setScheduleName(String scheduleName) throws InvalidValueException; | |
| 127 | ||
| 128 | /** | |
| 129 | * Sets the schedule week. This has different meanings based on the schedule frequency. | |
| 130 | * @param scheduleWeek | |
| 131 | * @throws InvalidValueException | |
| 132 | */ | |
| 133 | public void setScheduleWeek(int scheduleWeek) throws InvalidValueException; | |
| 134 | ||
| 135 | /** | |
| 136 | * Sets the start date for this scheduled transaction. | |
| 137 | * @param startDate | |
| 138 | * @throws InvalidValueException | |
| 139 | */ | |
| 140 | public void setStartDate(Date startDate) throws InvalidValueException; | |
| 141 | } |