org.ferris.journal.gui.model
Class ModelForApplication

java.lang.Object
  extended by org.ferris.journal.gui.model.ModelForApplication
All Implemented Interfaces:
Model

public class ModelForApplication
extends Object
implements Model


Constructor Summary
ModelForApplication()
           
 
Method Summary
 Model deleteJournal(Journal j)
          User wants to remove data of an existing journal
 Model deleteJournalEntry(JournalEntry j)
          Delete JournalEntry
 Model editJournal(Journal editMe)
          User wants to edit data of an existing journal
 Model editJournalEntry(JournalEntry editMe)
          Edit this journal entry
 Account getAccount()
          Get the account logged in, null if not logged in or if login failed.
 List<Journal> getActiveJournals()
          Get all the active journals for the account
 List<Journal> getAllJournals()
          Get all the journals for the account
 Model insertJournal(Journal j)
          Add Journal to the list
 Model insertJournalEntry(JournalEntry je)
          Created JournalEntry
 Model newJournal()
          User wants to enter data for a new journal
 Model newJournalEntry()
          New JournalEntry
 Model performingOperation(String description)
          Application is performing these operations which the model can log, store, etc., and notify it's observers.
 Model registerObserver(JournalEntryObserver observer)
          Register JournalEntryObserver
 Model registerObserver(JournalEntrySearchObserver observer)
          Register JournalEntrySearchObserver
 Model registerObserver(JournalObserver observer)
          Register JournalObserver
 Model registerObserver(OperationObserver observer)
          Register OperationObserver
 Model registerObserver(ReleaseObserver observer)
          Register ReleaseObserver
 Model release()
          Model will no longer be used, typically this is done when the program is exited.
 JournalEntryObserver removeObserver(JournalEntryObserver observer)
          Remove JournalEntryObserver
 JournalEntrySearchObserver removeObserver(JournalEntrySearchObserver observer)
          Remove JournalEntrySearchObserver
 JournalObserver removeObserver(JournalObserver observer)
          Remove JournalObserver
 OperationObserver removeObserver(OperationObserver observer)
          Remove OperationObserver
 ReleaseObserver removeObserver(ReleaseObserver observer)
          Remove ReleaseObserver
 Model setAccount(Account iAmLoggedIn)
          Store the account
 Model setJournalEntrySearchResults(List<JournalEntry> searchResults)
          Journal entries matching search criteria are found.
 Model setJournals(List<Journal> allJournals)
          Store list of all journals
 Model updateJournal(Journal j)
          Update Journal in the list
 Model updateJournalEntry(JournalEntry je)
          Updated JournalEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelForApplication

public ModelForApplication()
Method Detail

performingOperation

public Model performingOperation(String description)
Description copied from interface: Model
Application is performing these operations which the model can log, store, etc., and notify it's observers.

Specified by:
performingOperation in interface Model

release

public Model release()
Description copied from interface: Model
Model will no longer be used, typically this is done when the program is exited.

Specified by:
release in interface Model
Returns:
Reference to this instance.

getAccount

public Account getAccount()
Description copied from interface: Model
Get the account logged in, null if not logged in or if login failed.

Specified by:
getAccount in interface Model

setAccount

public Model setAccount(Account iAmLoggedIn)
Description copied from interface: Model
Store the account

Specified by:
setAccount in interface Model

getAllJournals

public List<Journal> getAllJournals()
Description copied from interface: Model
Get all the journals for the account

Specified by:
getAllJournals in interface Model

setJournals

public Model setJournals(List<Journal> allJournals)
Description copied from interface: Model
Store list of all journals

Specified by:
setJournals in interface Model

insertJournal

public Model insertJournal(Journal j)
Description copied from interface: Model
Add Journal to the list

Specified by:
insertJournal in interface Model

updateJournal

public Model updateJournal(Journal j)
Description copied from interface: Model
Update Journal in the list

Specified by:
updateJournal in interface Model

newJournal

public Model newJournal()
Description copied from interface: Model
User wants to enter data for a new journal

Specified by:
newJournal in interface Model

editJournal

public Model editJournal(Journal editMe)
Description copied from interface: Model
User wants to edit data of an existing journal

Specified by:
editJournal in interface Model

editJournalEntry

public Model editJournalEntry(JournalEntry editMe)
Description copied from interface: Model
Edit this journal entry

Specified by:
editJournalEntry in interface Model

deleteJournal

public Model deleteJournal(Journal j)
Description copied from interface: Model
User wants to remove data of an existing journal

Specified by:
deleteJournal in interface Model

getActiveJournals

public List<Journal> getActiveJournals()
Description copied from interface: Model
Get all the active journals for the account

Specified by:
getActiveJournals in interface Model

insertJournalEntry

public Model insertJournalEntry(JournalEntry je)
Description copied from interface: Model
Created JournalEntry

Specified by:
insertJournalEntry in interface Model

updateJournalEntry

public Model updateJournalEntry(JournalEntry je)
Description copied from interface: Model
Updated JournalEntry

Specified by:
updateJournalEntry in interface Model

newJournalEntry

public Model newJournalEntry()
Description copied from interface: Model
New JournalEntry

Specified by:
newJournalEntry in interface Model

deleteJournalEntry

public Model deleteJournalEntry(JournalEntry j)
Description copied from interface: Model
Delete JournalEntry

Specified by:
deleteJournalEntry in interface Model

setJournalEntrySearchResults

public Model setJournalEntrySearchResults(List<JournalEntry> searchResults)
Description copied from interface: Model
Journal entries matching search criteria are found.

Specified by:
setJournalEntrySearchResults in interface Model

registerObserver

public Model registerObserver(ReleaseObserver observer)
Description copied from interface: Model
Register ReleaseObserver

Specified by:
registerObserver in interface Model
Returns:
Reference to this instance.

removeObserver

public ReleaseObserver removeObserver(ReleaseObserver observer)
Description copied from interface: Model
Remove ReleaseObserver

Specified by:
removeObserver in interface Model
Returns:
Reference to observer removed or null if observer not registered

registerObserver

public Model registerObserver(OperationObserver observer)
Description copied from interface: Model
Register OperationObserver

Specified by:
registerObserver in interface Model
Returns:
Reference to this instance.

removeObserver

public OperationObserver removeObserver(OperationObserver observer)
Description copied from interface: Model
Remove OperationObserver

Specified by:
removeObserver in interface Model
Returns:
Reference to observer removed or null if observer not registered

registerObserver

public Model registerObserver(JournalObserver observer)
Description copied from interface: Model
Register JournalObserver

Specified by:
registerObserver in interface Model
Returns:
Reference to this instance.

removeObserver

public JournalObserver removeObserver(JournalObserver observer)
Description copied from interface: Model
Remove JournalObserver

Specified by:
removeObserver in interface Model
Returns:
Reference to observer removed or null if observer not registered

registerObserver

public Model registerObserver(JournalEntryObserver observer)
Description copied from interface: Model
Register JournalEntryObserver

Specified by:
registerObserver in interface Model
Returns:
Reference to this instance.

removeObserver

public JournalEntryObserver removeObserver(JournalEntryObserver observer)
Description copied from interface: Model
Remove JournalEntryObserver

Specified by:
removeObserver in interface Model
Returns:
Reference to observer removed or null if observer not registered

registerObserver

public Model registerObserver(JournalEntrySearchObserver observer)
Description copied from interface: Model
Register JournalEntrySearchObserver

Specified by:
registerObserver in interface Model
Returns:
Reference to this instance.

removeObserver

public JournalEntrySearchObserver removeObserver(JournalEntrySearchObserver observer)
Description copied from interface: Model
Remove JournalEntrySearchObserver

Specified by:
removeObserver in interface Model
Returns:
Reference to observer removed or null if observer not registered


Copyright © March 15, 2008-2011 The Ferris Foundation. All Rights Reserved.