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.StringSYNCABLE_TYPE_VALUEFields 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 voidaddListener(OnlineTxnListener listener)voidaddNewTxn(OnlineTxn txn)longgetOFXLastTxnUpdate()longgetOnlineAvailBalance()Returns the available balance that was acquired from an online source, or zero if no balance was acquired.longgetOnlineAvailBalanceDate()Returns the 'as of' date for the available balance that was acquired from an online source, or zero if no balance was acquired.longgetOnlineLedgerBalance()Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired.longgetOnlineLedgerBalanceDate()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.StringgetSyncItemType()Subclasses should override this to return a static string identifying their type of objectOnlineTxngetTxn(int i)Get a service object for the service at the specified index.intgetTxnCount()Get the number of online services that the user has access to.booleanhasOnlineAvailBalance()Returns the available balance that was acquired from an online source, or zero if no balance was acquired.booleanhasOnlineLedgerBalance()Returns the ledger balance that was acquired from an online source, or zero if no balance was acquired.intindexOf(OnlineTxn txn)returns true if the service information for this service is already in the service list.protected voiditemWasUpdated()This is called after an item is updated by calling itemWasUpdated(SyncRecord).protected voiditemWillSync()This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called.OnlineTxnnewTxn()Create a new OnlineTxn that is associated, but not yet a member of, this list.OnlineTxnnewTxnFromString(java.lang.String serializedTxn)Create a new OnlineTxn that is associated, but not yet a member of, this list.voidremoveListener(OnlineTxnListener listener)voidremoveTxn(int i)Remove the txn object at the specified index.booleanremoveTxn(OnlineTxn txn)Remove the given txn object from the list.voidsetOFXLastTxnUpdate(long date)voidsetOnlineAvailBalance(long onlineBalance, long asOfDate)Sets the available balance that was acquired from an online source.voidsetOnlineLedgerBalance(long onlineBalance, long asOfDate)Sets the ledger balance that was acquired from an online source.voidsortTransactions()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:MoneydanceSyncableItemSubclasses should override this to return a static string identifying their type of object- Specified by:
getSyncItemTypein interfacecom.infinitekind.tiksync.SyncableItem- Overrides:
getSyncItemTypein classMoneydanceSyncableItem
-
itemWasUpdated
protected void itemWasUpdated()Description copied from class:MoneydanceSyncableItemThis 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:
itemWasUpdatedin classMoneydanceSyncableItem
-
itemWillSync
protected void itemWillSync()Description copied from class:MoneydanceSyncableItemThis 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:
itemWillSyncin 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()
-