com.usefullittlethings.saw.controller
Interface AppControllerIfc

All Known Implementing Classes:
Main

public interface AppControllerIfc

Interface for a Search and Whatever application controller.


Method Summary
 void copyAction(int from, int to)
          Duplicates the action indicated by the from index, placing the copy in the collection at the index specified by to.
 void copyFilter(int from, int to)
          Duplicates the filter indicated by the from index, placing the copy in the collection at the index specified by to.
 void exit(int i)
          Requests that the application terminate.
 PluginCollection getActionsModel()
          Returns a reference to the actions model
 SearchControllerIfc getCurrentSearchController()
          Returns the currently selected search controller plug-in.
 PluginCollection getFiltersModel()
          Returns a reference to the filters model
 java.lang.String getLogFileName()
          Returns the (relative) path and filename of the currently assigned logfile.
 SearchControllerIfc[] getSearchControllers()
          Returns a list of the currently installed search controller plug-ins.
 void interruptSearch(boolean exit)
          Interrupts the currently executing search
 boolean isAutoSaveEnabled()
          Indicates whether or not sessions are automatically saved and restored on exit and start-up.
 boolean isLoggingEnabled()
          Indicates whether or not session events are automatically logged.
 void load()
          Loads the current state of the application.
 void moveActionPlugIn(int oldIndex, int newIndex)
          Moves the action indicated by the oldIndex value to the newIndex value location.
 void moveFilterPlugIn(int oldIndex, int newIndex)
          Moves the filter indicated by the oldIndex value to the newIndex value location.
 void removeAction(int index)
          Removes the action indicated by the index value.
 void removeFilter(int index)
          Removes the filter indicated by the index value.
 void reset()
          Resets the current state of the application, similar to a New action.
 void resetActionPlugIns()
          Resets the list of action plug-ins, adding back removed ones and removing duplicates.
 void resetFilterPlugIns()
          Resets the list of filter plug-ins, adding back removed ones and removing duplicates.
 void save()
          Saves the current state of the application.
 void saveConfig()
          Attempts to save the current configuration.
 void search(int[] repeat)
          Performs the search operation using the selected search plug-in, filters, and actions.
 void setAutoSaveEnabled(boolean enable)
          Attempts to set the auto-save flag to the value specified.
 void setCurrentSearchController(SearchControllerIfc controller)
          Attempts to set the currently selected search controller to the controller passed in to the method.
 void setLogFileName(java.lang.String name)
          Attempts to set the log file to the name specified.
 void setLoggingEnabled(boolean enable)
          Attempts to turn on/off event logging.
 void setSearchPatternPreferences(int[] preferences)
          Attempts to set the preferred order of search routines
 

Method Detail

exit

public void exit(int i)
Requests that the application terminate.


search

public void search(int[] repeat)
Performs the search operation using the selected search plug-in, filters, and actions.


save

public void save()
Saves the current state of the application.


load

public void load()
Loads the current state of the application.


reset

public void reset()
Resets the current state of the application, similar to a New action.


copyFilter

public void copyFilter(int from,
                       int to)
Duplicates the filter indicated by the from index, placing the copy in the collection at the index specified by to.


copyAction

public void copyAction(int from,
                       int to)
Duplicates the action indicated by the from index, placing the copy in the collection at the index specified by to.


removeFilter

public void removeFilter(int index)
Removes the filter indicated by the index value.


removeAction

public void removeAction(int index)
Removes the action indicated by the index value.


resetFilterPlugIns

public void resetFilterPlugIns()
Resets the list of filter plug-ins, adding back removed ones and removing duplicates.


resetActionPlugIns

public void resetActionPlugIns()
Resets the list of action plug-ins, adding back removed ones and removing duplicates.


moveFilterPlugIn

public void moveFilterPlugIn(int oldIndex,
                             int newIndex)
Moves the filter indicated by the oldIndex value to the newIndex value location.


moveActionPlugIn

public void moveActionPlugIn(int oldIndex,
                             int newIndex)
Moves the action indicated by the oldIndex value to the newIndex value location.


interruptSearch

public void interruptSearch(boolean exit)
Interrupts the currently executing search


setSearchPatternPreferences

public void setSearchPatternPreferences(int[] preferences)
Attempts to set the preferred order of search routines


getSearchControllers

public SearchControllerIfc[] getSearchControllers()
Returns a list of the currently installed search controller plug-ins.


getCurrentSearchController

public SearchControllerIfc getCurrentSearchController()
Returns the currently selected search controller plug-in.


setCurrentSearchController

public void setCurrentSearchController(SearchControllerIfc controller)
Attempts to set the currently selected search controller to the controller passed in to the method.


getLogFileName

public java.lang.String getLogFileName()
Returns the (relative) path and filename of the currently assigned logfile.


setLogFileName

public void setLogFileName(java.lang.String name)
Attempts to set the log file to the name specified.


isAutoSaveEnabled

public boolean isAutoSaveEnabled()
Indicates whether or not sessions are automatically saved and restored on exit and start-up.


isLoggingEnabled

public boolean isLoggingEnabled()
Indicates whether or not session events are automatically logged.


setAutoSaveEnabled

public void setAutoSaveEnabled(boolean enable)
Attempts to set the auto-save flag to the value specified.


setLoggingEnabled

public void setLoggingEnabled(boolean enable)
Attempts to turn on/off event logging.


saveConfig

public void saveConfig()
Attempts to save the current configuration.


getFiltersModel

public PluginCollection getFiltersModel()
Returns a reference to the filters model


getActionsModel

public PluginCollection getActionsModel()
Returns a reference to the actions model