Class OnlineTxnList
java.lang.Object
com.infinitekind.moneydance.model.MoneydanceSyncableItem
com.infinitekind.moneydance.model.OnlineTxnList
- All Implemented Interfaces:
com.infinitekind.tiksync.SyncableItem
public class OnlineTxnList extends MoneydanceSyncableItem
This class contains a set of transactions that are used for
online banking and bill-payment.
This information is very fluid and the structure will probably
change, so all of the information is represented in a SyncRecord
structure that can easily be serialized and deserialized from the
data file.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SYNCABLE_TYPE_VALUE
Fields inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
book, info, SECURITY_SUBTYPES_ITEM_TYPE
-
Constructor Summary
Constructors Constructor Description OnlineTxnList(AccountBook book)
OnlineTxnList(AccountBook book, StreamTable info)
-
Method Summary
Modifier and Type Method Description void
addListener(OnlineTxnListener listener)
void
addNewTxn(OnlineTxn txn)
long
getOFXLastTxnUpdate()
long
getOnlineAvailBalance()
Returns the available balance that was acquired from an online source, or zero if no balance was acquired.long
getOnlineAvailBalanceDate()
Returns the 'as of' date for the available balance that was acquired from an online source, or zero if no balance was acquired.long
getOnlineLedgerBalance()
Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired.long
getOnlineLedgerBalanceDate()
Returns the 'as of' date for the ledger balance that was acquired from an online source, or zero if no balance was acquired.java.lang.String
getSyncItemType()
Subclasses should override this to return a static string identifying their type of objectOnlineTxn
getTxn(int i)
Get a service object for the service at the specified index.int
getTxnCount()
Get the number of online services that the user has access to.boolean
hasOnlineAvailBalance()
Returns the available balance that was acquired from an online source, or zero if no balance was acquired.boolean
hasOnlineLedgerBalance()
Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired.int
indexOf(OnlineTxn txn)
returns true if the service information for this service is already in the service list.protected void
itemWasUpdated()
This is called after an item is updated by calling itemWasUpdated(SyncRecord).protected void
itemWillSync()
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called.OnlineTxn
newTxn()
Create a new OnlineTxn that is associated, but not yet a member of, this list.OnlineTxn
newTxnFromString(java.lang.String serializedTxn)
Create a new OnlineTxn that is associated, but not yet a member of, this list.void
removeListener(OnlineTxnListener listener)
void
removeTxn(int i)
Remove the txn object at the specified index.boolean
removeTxn(OnlineTxn txn)
Remove the given txn object from the list.void
setOFXLastTxnUpdate(long date)
void
setOnlineAvailBalance(long onlineBalance, long asOfDate)
Sets the available balance that was acquired from an online source.void
setOnlineLedgerBalance(long onlineBalance, long asOfDate)
Sets the ledger balance that was acquired from an online source.void
sortTransactions()
Methods inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
addParameters, addTags, autoSyncsChanges, decodeKeywordList, deleteItem, doesParameterExist, duplicate, encodeKeywordList, equals, getAccountParameter, getAddress, getAddressParameter, getBook, getBooleanParameter, getCurrencyParameter, getCurrencyParameter, getCurrencyParameter, getDoubleParameter, getIntParameter, getKeywords, getLongParameter, getOriginalItem, getParameter, getParameter, getParameterCount, getParameterKeys, getPreference, getPreferenceBoolean, getPreferenceDouble, getPreferenceInt, getPreferenceIntArray, getPreferenceLong, getPreferenceStringList, getPreferenceSublist, getPreferenceSubset, getStringListParameter, getSyncInfo, getSyncTimestamp, getUUID, hasBeenSynced, hashCode, hasKeywordSubstring, initialize, isInEditingMode, isSyncable, itemWasUpdated, itemWillSync, makeSyncableItem, removeParameter, setAccountParameter, setAddress, setAddressParameter, setCurrencyParameter, setCurrencyParameter, setCurrencyParameter, setDirty, setEditingMode, setKeywords, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setPreference, setPreference, setPreference, syncItem
-
Field Details
-
SYNCABLE_TYPE_VALUE
public static final java.lang.String SYNCABLE_TYPE_VALUE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getSyncItemType
public final java.lang.String getSyncItemType()Description copied from class:MoneydanceSyncableItem
Subclasses should override this to return a static string identifying their type of object- Specified by:
getSyncItemType
in interfacecom.infinitekind.tiksync.SyncableItem
- Overrides:
getSyncItemType
in classMoneydanceSyncableItem
-
itemWasUpdated
protected void itemWasUpdated()Description copied from class:MoneydanceSyncableItem
This is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.- Overrides:
itemWasUpdated
in classMoneydanceSyncableItem
-
itemWillSync
protected void itemWillSync()Description copied from class:MoneydanceSyncableItem
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called. Override this method to be notified or if you'd like to store anything into the info record to be synced.- Overrides:
itemWillSync
in classMoneydanceSyncableItem
-
getTxnCount
public int getTxnCount()Get the number of online services that the user has access to. -
getTxn
Get a service object for the service at the specified index. Returns null if the index is out of bounds. -
indexOf
returns true if the service information for this service is already in the service list. -
removeTxn
public void removeTxn(int i)Remove the txn object at the specified index. -
removeTxn
Remove the given txn object from the list. Returns true if the value was found in the list. -
newTxn
Create a new OnlineTxn that is associated, but not yet a member of, this list. Call addNewTxn() to add the newly created transaction to the list. -
newTxnFromString
Create a new OnlineTxn that is associated, but not yet a member of, this list. The transaction is deserialized from the given string that should be created using the toSerializedString() method of OnlineTxn. Call addNewTxn() to add the newly created transaction to the list. -
addNewTxn
-
hasOnlineLedgerBalance
public boolean hasOnlineLedgerBalance()Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired. -
getOFXLastTxnUpdate
public long getOFXLastTxnUpdate() -
setOFXLastTxnUpdate
public void setOFXLastTxnUpdate(long date) -
getOnlineLedgerBalance
public long getOnlineLedgerBalance()Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired. -
getOnlineLedgerBalanceDate
public long getOnlineLedgerBalanceDate()Returns the 'as of' date for the ledger balance that was acquired from an online source, or zero if no balance was acquired. -
setOnlineLedgerBalance
public void setOnlineLedgerBalance(long onlineBalance, long asOfDate)Sets the ledger balance that was acquired from an online source. -
hasOnlineAvailBalance
public boolean hasOnlineAvailBalance()Returns the available balance that was acquired from an online source, or zero if no balance was acquired. -
getOnlineAvailBalance
public long getOnlineAvailBalance()Returns the available balance that was acquired from an online source, or zero if no balance was acquired. -
getOnlineAvailBalanceDate
public long getOnlineAvailBalanceDate()Returns the 'as of' date for the available balance that was acquired from an online source, or zero if no balance was acquired. -
setOnlineAvailBalance
public void setOnlineAvailBalance(long onlineBalance, long asOfDate)Sets the available balance that was acquired from an online source. -
addListener
-
removeListener
-
sortTransactions
public void sortTransactions()
-