net.sf.jeters.components
Class MediaWikiIO

java.lang.Object
  extended by net.sf.jeters.util.AssistedComponent
      extended by net.sf.jeters.components.MediaWikiIO
All Implemented Interfaces:
Component, InputComponent<net.sf.jeters.componentInterface.editables.MediaWikiText>, InputComponent_Series<net.sf.jeters.componentInterface.editables.MediaWikiText>, OutputComponent<net.sf.jeters.componentInterface.editables.MediaWikiText>, Configurable, Translatable

public class MediaWikiIO
extends AssistedComponent
implements InputComponent_Series<net.sf.jeters.componentInterface.editables.MediaWikiText>, OutputComponent<net.sf.jeters.componentInterface.editables.MediaWikiText>

default implementation of a combined input and output component reading from and writing to any MediaWiki system.
For output, an user account on the MediaWiki is necessary.

Author:
Tobias Knerr

Constructor Summary
MediaWikiIO()
           
 
Method Summary
 net.sf.jeters.componentInterface.editables.MediaWikiText getInput(UIComponent uiForRequests)
          receive a text that can be edited by the program; the next call to getInput is expected to return another text if seriesComplete() returns false
 boolean hasNext()
          indicates if there are still texts left for editing
 void output(net.sf.jeters.componentInterface.editables.MediaWikiText text, UIComponent uiForRequests)
          receive a text that can be edited by the program
 void setConfiguration(Configuration configuration)
          sets the configuration for this object.
 
Methods inherited from class net.sf.jeters.util.AssistedComponent
getConfiguration, setLanguageResourceBundle, str, str
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaWikiIO

public MediaWikiIO()
Method Detail

getInput

public net.sf.jeters.componentInterface.editables.MediaWikiText getInput(UIComponent uiForRequests)
Description copied from interface: InputComponent_Series
receive a text that can be edited by the program; the next call to getInput is expected to return another text if seriesComplete() returns false

Specified by:
getInput in interface InputComponent<net.sf.jeters.componentInterface.editables.MediaWikiText>
Specified by:
getInput in interface InputComponent_Series<net.sf.jeters.componentInterface.editables.MediaWikiText>
Parameters:
uiForRequests - UI-component for communication with the user (if necessary)
Returns:
the text for editing, is allowed to be null in cases where loading fails for some reason

output

public void output(net.sf.jeters.componentInterface.editables.MediaWikiText text,
                   UIComponent uiForRequests)
Description copied from interface: OutputComponent
receive a text that can be edited by the program

Specified by:
output in interface OutputComponent<net.sf.jeters.componentInterface.editables.MediaWikiText>
Parameters:
text - the text that has been edited and should now be printed/written/etc. as the result
uiForRequests - UI-component for communication with the user (if necessary)

hasNext

public boolean hasNext()
Description copied from interface: InputComponent_Series
indicates if there are still texts left for editing

Specified by:
hasNext in interface InputComponent_Series<net.sf.jeters.componentInterface.editables.MediaWikiText>
Returns:
false if all texts which are part of the series have already been returned by getInput, otherwise true

setConfiguration

public void setConfiguration(Configuration configuration)
Description copied from interface: Configurable
sets the configuration for this object. The referenced configuration will not change after being passed to configurationSet. However, it is possible that setConfiguration is called again. This will not happen during execution of other component methods. Any config passed to setConfiguration is guaranteed to include at least those configuration entries that were included in a previous getConfiguration result, thus you needn't check for missing entries. The object must not rely on this method being called. Instead, it then has to work with a default configuration.

Specified by:
setConfiguration in interface Configurable
Overrides:
setConfiguration in class AssistedComponent
Parameters:
configuration - configuration to be used by the component; not null