jeters.core
Class Core

java.lang.Object
  extended by jeters.core.Core
All Implemented Interfaces:
Configurable

public class Core
extends java.lang.Object
implements Configurable

the core class - its task is the coordination of the components


Constructor Summary
Core()
           
 
Method Summary
 java.lang.Class<InputComponent> getActiveComponentClass_Input()
          get the class of the active Input component object
 java.lang.Class<OutputComponent> getActiveComponentClass_Output()
          get the class of the active Output component object
 java.lang.Class<ReplacerComponent> getActiveComponentClass_Replacer()
          get the class of the active Replacer component object
 java.lang.Class<UIComponent> getActiveComponentClass_UI()
          get the class of the active UI component object
<T> java.lang.Class<T>[]
getAvailableComponentClasses(java.lang.Class<T> desiredClass)
          method that provides an array of available component classes.
 NamedDataSet getConfiguration()
          this method is called to retrieve the current configuration for this component.
 void quit()
          Using this method, UI components can stop program execution.
 void run(java.lang.String[] arguments)
          starts the core's activities; called by main, not relevant for components accessing the core.
 boolean setActiveComponentClass_Input(java.lang.Class<InputComponent> newComponentClass_Input)
          set the active Input component to a new object of the given class
 boolean setActiveComponentClass_Output(java.lang.Class<OutputComponent> newComponentClass_Output)
          set the active Output component to a new object of the given class
 boolean setActiveComponentClass_Replacer(java.lang.Class<ReplacerComponent> newComponentClass_Replacer)
          set the active Replacer component to a new object of the given class
 boolean setActiveComponentClass_UI(java.lang.Class<UIComponent> newComponentClass_UI)
          set the active UI component to a new object of the given class
 void setConfiguration(NamedDataSet configurationSet)
          sets the configuration for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Core

public Core()
Method Detail

quit

public void quit()
Using this method, UI components can stop program execution.


getActiveComponentClass_Input

public java.lang.Class<InputComponent> getActiveComponentClass_Input()
get the class of the active Input component object


getActiveComponentClass_Replacer

public java.lang.Class<ReplacerComponent> getActiveComponentClass_Replacer()
get the class of the active Replacer component object


getActiveComponentClass_Output

public java.lang.Class<OutputComponent> getActiveComponentClass_Output()
get the class of the active Output component object


getActiveComponentClass_UI

public java.lang.Class<UIComponent> getActiveComponentClass_UI()
get the class of the active UI component object


setActiveComponentClass_Input

public boolean setActiveComponentClass_Input(java.lang.Class<InputComponent> newComponentClass_Input)
set the active Input component to a new object of the given class

Parameters:
newComponentClass_Input - the class for the new Input component object. If null, the call has no effect.
Returns:
true if the component is successfully changed or if no change is necessary (because newComponentClass_Input is null or equals the class of the currently active component object), otherwise false.

setActiveComponentClass_Replacer

public boolean setActiveComponentClass_Replacer(java.lang.Class<ReplacerComponent> newComponentClass_Replacer)
set the active Replacer component to a new object of the given class

Parameters:
newComponentClass_Replacer - the class for the new Replacer component object. If null, the call has no effect.
Returns:
true if the component is successfully changed or if no change is necessary (because newComponentClass_Replacer is null or equals the class of the currently active component object), otherwise false.

setActiveComponentClass_Output

public boolean setActiveComponentClass_Output(java.lang.Class<OutputComponent> newComponentClass_Output)
set the active Output component to a new object of the given class

Parameters:
newComponentClass_Output - the class for the new Output component object. If null, the call has no effect.
Returns:
true if the component is successfully changed or if no change is necessary (because newComponentClass_Output is null or equals the class of the currently active component object), otherwise false.

setActiveComponentClass_UI

public boolean setActiveComponentClass_UI(java.lang.Class<UIComponent> newComponentClass_UI)
set the active UI component to a new object of the given class

Parameters:
newComponentClass_UI - the class for the new UI component object. If null, the call has no effect.
Returns:
true if the component is successfully changed or if no change is necessary (because newComponentClass_UI is null or equals the class of the currently active component object), otherwise false.

getAvailableComponentClasses

public <T> java.lang.Class<T>[] getAvailableComponentClasses(java.lang.Class<T> desiredClass)
method that provides an array of available component classes.

Parameters:
desiredClass - The method will only return those classes which are an instance of desiredClass. For example, if you want to get only UI components, your call would be getAvailableComponentClasses(UIComponent.class), for all components providing UI configuration, use Configurable_UIAccess.class as parameter, if you simply want all components, the argument would be Component.class.
Returns:
array containing all avaliable components of the desired type, can be null if reading the component direcory failed

run

public void run(java.lang.String[] arguments)
starts the core's activities; called by main, not relevant for components accessing the core. After the first call, there will be no effect if run is used again.

Parameters:
arguments - all command line arguments that haven't been dealt with in main

setConfiguration

public void setConfiguration(NamedDataSet configurationSet)
Description copied from interface: Configurable
sets the configuration for this object. If setConfiguration is not called, the component must work properly nevertheless, using default settings.

Specified by:
setConfiguration in interface Configurable
Parameters:
configurationSet - the configuration data to be used by the component if null, the object has to use default settings

getConfiguration

public NamedDataSet getConfiguration()
Description copied from interface: Configurable
this method is called to retrieve the current configuration for this component. It will e.g. be used for generating the configuration file.

Specified by:
getConfiguration in interface Configurable
Returns:
configuration data, null is allowed (doesn't make much sense however)