jeters.components
Class RegExReplacer_User

java.lang.Object
  extended by jeters.components.RegExReplacer
      extended by jeters.components.RegExReplacer_User
All Implemented Interfaces:
Component, Configurable, ReplacerComponent<EditableText,MediaWikiText>

public class RegExReplacer_User
extends RegExReplacer

an replacer class for JETERS that applies a regex expression the user directly enters.


Nested Class Summary
 
Nested classes/interfaces inherited from class jeters.components.RegExReplacer
RegExReplacer.DescriptionEntry, RegExReplacer.DescriptionList, RegExReplacer.Replacement, RegExReplacer.ReplacementElement, RegExReplacer.ReplacementGroup
 
Field Summary
protected  java.lang.Boolean conf_confirmChangesByDefault
          whether change-confirmation-requests will be sent to the user interface by default.
protected  java.lang.String conf_defaultSummary
          the default summary for user-defined edits.
 
Fields inherited from class jeters.components.RegExReplacer
conf_minRatingDescription, conf_minRatingSummary, conf_minTotalRatingDescription, conf_minTotalRatingSummary, conf_summaryEntryLimit, conf_summaryEntryLimitBrackets, confirmationDescriptionList, replacements, summaryDescriptionList
 
Constructor Summary
RegExReplacer_User()
           
 
Method Summary
 MediaWikiText edit(EditableText text, UIComponent uiForRequests)
          applies the regular expressions to a text.
 NamedDataSet getConfiguration()
          this method is called to retrieve the current configuration for this component.
 void setConfiguration(NamedDataSet configurationSet)
          sets the configuration for this object.
 
Methods inherited from class jeters.components.RegExReplacer
applyReplacementGroup, applyReplacementList, applySingleReplacement, split
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conf_defaultSummary

protected java.lang.String conf_defaultSummary
the default summary for user-defined edits.


conf_confirmChangesByDefault

protected java.lang.Boolean conf_confirmChangesByDefault
whether change-confirmation-requests will be sent to the user interface by default.

Constructor Detail

RegExReplacer_User

public RegExReplacer_User()
Method Detail

edit

public MediaWikiText edit(EditableText text,
                          UIComponent uiForRequests)
Description copied from class: RegExReplacer
applies the regular expressions to a text.

Specified by:
edit in interface ReplacerComponent<EditableText,MediaWikiText>
Overrides:
edit in class RegExReplacer
Parameters:
text - the input text that is supposed to be edited
uiForRequests - UI-component for communication with the user.
Returns:
the text resulting from the edit, together with information for MediaWiki. Most importantly, it contains a description of the edit by listing the descriptions (the order is determined by the ratings).

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
Overrides:
setConfiguration in class RegExReplacer
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
Overrides:
getConfiguration in class RegExReplacer
Returns:
configuration data, null is allowed (doesn't make much sense however)