Package net.simplace.pipe.control
Klasse FWProcessor
java.lang.Object
net.simplace.pipe.control.FWProcessor
- Bekannte direkte Unterklassen:
AsciiToDatabaseTableProcessor,AsciiToMapProcessor,BrowseFolderProcessor,ConsoleOutProcessor,CopyFilesProcessor,CopyFolderProcessor,CopyTableProcessor,CreateDBConnectionProcessor,CreateFileListProcessor,CreateScenarioToLoopProcessor,DatasetLoaderProcessor,DateListCreatorProcessor,DateTableCreatorProcessor,DB2HSSFWorkbookProcessor,DeleteFilesProcessor,DownloadFileProcessor,EncodingConverterProcessor,FillParameterProcessor,FilterParameterProcessor,FWLoopProcessor,GetXLSValueProcessor,HashValueFromFileProcessor,HSSFWorkbook2DBProcessor,JDOMParserProcessor,JDOMUnparseProcessor,ListReducerProcessor,ListToDatabaseTableProcessor,LoadScenarioProcessor,MathCalculatorProcessor,MoveFileProcessor,ReadFileProcessor,ReadHSSFWorkbookProcessor,ReadXLSValueProcessor,RecalcXLSProcessor,ReleaseDBConnectionProcessor,RequestSimplaceServerProcessor,RunAppProcessor,SaveProjectTemplateProcessor,SaveScenarioProcessor,SetXLSValueProcessor,SolutionToXMLProcessor,SQLResultToCsvProcessor,SQLStatementProcessor,UnzipFolderProcessor,WriteFileProcessor,WriteProjectXMLProcessor,XSLTTransformerProcessor
Abstract superclass for all standard and custom processors.
- Autor:
- Andreas Enders
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected intIndicates the count of loops this Processor was run through: -1protected FWPipeLinesContainerHolds an instance of the Kernel.protected FWObservableMap of parameters worked with in this processor.protected FWObservableMap of parameters put to output for next processor.protected ArrayList<FWProgressTask> The progressTasks of this Processor. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleanCan be overridden to perform semantic checks on the pipeline Input.protected booleanCan be overridden to perform semantic checks on the pipeline Input.clone()Creates a connectlet by dynamically instancing the class given in the JDM element.protected booleancontainsParameter(String aSourceKey) static FWProcessorcreateProcessor(String aClassName) Creates a processor by dynamically instancing the class given in the JDM element.static FWProcessorcreateProcessor(org.jdom2.Element aProcessorElement, FWPipeLinesContainer aContainer) Creates a processor by dynamically instancing the class given in the JDM element.protected voidfireTaskEvent(JPanel aSourcePanel) fires TaskEvent to listening Panels.getAllStringInParameters(String aKeyPrefix, boolean aElimKeyPrefix) Returns all string in parameters, whose keys start with a given prefix.protected org.jdom2.Elementgets the detailed configuration of the Processor.protected ObjectgetInParameter(String aKey) Returns the value of specified parameter or null if not set.protected ObjectgetInParameter(String aKey, Object aDefault) Returns the value of specified parameter.protected FWObservableReturns the map of all parameters.protected ObjectgetOutParameter(String aKey) gets a parameter from the output map.gets a keySet of parameters in the output map.protected FWPipeLinegetPipeLine(String aPipeLineID) protected StringgetStringInParameter(String aKey) Returns the value of specified channel as string.protected StringgetStringInParameter(String aKey, String aDefault) Returns the value of specified key as string.protected Stringprotected booleangets the detailed configuration of the Processor.booleanSets the end of pipe flag.pipe(FWObservable aObservabe, Integer aAllreadyLoopedCount) Pipes aIncommingObject through this pipe element.protected abstract booleanprocess()Must be overridden to implement concrete pipe procedure.protected voidremoveOutParameter(String aElement) removes a Parameter form Mapprotected voidsetConfiguration(String aClassname, org.jdom2.Element aConfigurationElement) sets the detailed configuration of a Processor.protected voidSets the end of pipe flag.protected voidsetInitialParameters(Map<String, Object> aInitialParameterMap) protected voidsetInParameterMap(FWObservable aObservable) protected voidsetLoopedCount(int aNumberOfAllreadyLooped) protected voidsetOutParameter(String aKey, Object aValue) sets a parameter to the output map.protected voidsetStateOfTask(String aStatusOfTask) protected voidsetStateProgressing(int aPercentDone, String aMessage) org.jdom2.ElementtoXML()
-
Felddetails
-
iContainer
Holds an instance of the Kernel. -
iProgressTasks
The progressTasks of this Processor. -
iInObservable
Map of parameters worked with in this processor. -
iObservable
Map of parameters put to output for next processor. -
iAllreadyLoopedCount
protected int iAllreadyLoopedCountIndicates the count of loops this Processor was run through: -1
-
-
Konstruktordetails
-
FWProcessor
public FWProcessor()
-
-
Methodendetails
-
createProcessor
public static FWProcessor createProcessor(org.jdom2.Element aProcessorElement, FWPipeLinesContainer aContainer) throws PipeLineCreationException Creates a processor by dynamically instancing the class given in the JDM element.- Parameter:
aProcessorElement-aContainer-- Gibt zurück:
- the created Processor
- Löst aus:
PipeLineCreationException
-
createProcessor
Creates a processor by dynamically instancing the class given in the JDM element.- Parameter:
aClassName-- Gibt zurück:
- the created Processor
- Löst aus:
PipeLineCreationException
-
clone
Creates a connectlet by dynamically instancing the class given in the JDM element. -
setInitialParameters
- Parameter:
aInitialParameterMap-
-
getInitialParameters
- Gibt zurück:
- the initial parameters of this processor
-
process
Must be overridden to implement concrete pipe procedure.- Gibt zurück:
- success
- Löst aus:
PipeLineException
-
checkInParameterMap
protected boolean checkInParameterMap()Can be overridden to perform semantic checks on the pipeline Input.- Gibt zurück:
- true if not overridden by implementations
-
containsParameter
- Parameter:
aSourceKey-- Gibt zurück:
- if the source is contained in In-Parameter set
-
setEndOfPipeFlag
protected void setEndOfPipeFlag()Sets the end of pipe flag. Pipe line is aborted after this processor. -
isEndOfPipe
public boolean isEndOfPipe()Sets the end of pipe flag. Pipeline is aborted after this processor.- Gibt zurück:
- if pipe has ended
-
checkOutParameterMap
protected boolean checkOutParameterMap()Can be overridden to perform semantic checks on the pipeline Input.- Gibt zurück:
- true if not overridden
-
getInParameter
Returns the value of specified parameter or null if not set.- Parameter:
aKey-- Gibt zurück:
- the object from the in parameter map
-
getInParameters
Returns the map of all parameters.- Gibt zurück:
- the in parameter map
-
getInParameter
Returns the value of specified parameter. Returns aDefault if the parameter is null.- Parameter:
aKey-aDefault-- Gibt zurück:
- the object from the in parameter map
-
getStringInParameter
Returns the value of specified key as string. Returns aDefault if the key is null or not a string.- Parameter:
aKey-aDefault-- Gibt zurück:
- the object from the in parameter map if it is a string, else the default
-
getAllStringInParameters
Returns all string in parameters, whose keys start with a given prefix.- Parameter:
aKeyPrefix- prefix the "wanted" parameters must start withaElimKeyPrefix- iffalsethe keys of the found parameters are used unchanged for the returned map. Iftruethe prefix is eliminated for the use in the destination map.- Gibt zurück:
- an empty map, when
aKeyPrefixisnull
-
getStringInParameter
Returns the value of specified channel as string. Returns aDefault if the parameter is null or not a string.- Parameter:
aKey-- Gibt zurück:
- the In parameter as string from observable
-
setOutParameter
sets a parameter to the output map.- Parameter:
aKey-aValue-
-
setInParameterMap
- Parameter:
aObservable-
-
getOutParameter
gets a parameter from the output map.- Parameter:
aKey-- Gibt zurück:
- the out parameter
-
getOutParameterKeys
gets a keySet of parameters in the output map.- Gibt zurück:
- out parameter keys
-
removeOutParameter
removes a Parameter form Map- Parameter:
aElement- of OutParameterMap
-
pipe
public FWObservable pipe(FWObservable aObservabe, Integer aAllreadyLoopedCount) throws PipeLineException Pipes aIncommingObject through this pipe element.- Parameter:
aObservabe-aAllreadyLoopedCount-- Gibt zurück:
- the resulting observable
- Löst aus:
PipeLineException
-
getConfiguration
protected org.jdom2.Element getConfiguration()gets the detailed configuration of the Processor.- Gibt zurück:
- the processors configration element
-
setConfiguration
sets the detailed configuration of a Processor.- Parameter:
aClassname-aConfigurationElement-
-
hasConfiguration
protected boolean hasConfiguration()gets the detailed configuration of the Processor.- Gibt zurück:
- if has additional configuration
-
fireTaskEvent
fires TaskEvent to listening Panels.- Parameter:
aSourcePanel-
-
getNewProgressTask
- Gibt zurück:
- the progressTask for given LoopCount (1-n)
-
getProgressTask
- Gibt zurück:
- the progressTask for integrated LoopCount
-
getPipeLine
- Parameter:
aPipeLineID-- Gibt zurück:
- the the count of loops, invoked by this processor
-
getSystemID
- Gibt zurück:
- the SystemID from PipelineContainer
-
setStateProgressing
- Parameter:
aPercentDone-aMessage-the- statusOfTask is set to progressing. percentDone (0-100).
-
setStateOfTask
- Parameter:
aStatusOfTask- the statusOfTask to set - use Variables in class State
-
setLoopedCount
protected void setLoopedCount(int aNumberOfAllreadyLooped) - Parameter:
aNumberOfAllreadyLooped-aLoopedCount- - has to be set from the looping processor because of thread safety
-
toXML
public org.jdom2.Element toXML()- Gibt zurück:
- the Element explaining which processor this is
-