Package net.simplace.pipe.functionality
Class FWAbstractFunctionality
java.lang.Object
java.lang.Thread
net.simplace.pipe.functionality.FWAbstractFunctionality
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
BrowserFunctionality
,ConsoleOutFunctionality
,DatabaseAccessFunctionality
,EditXMLFunctionality
,FormFunctionality
,PDFViewerFunctionality
,PipeLineFunctionality
,ShowImageFunctionality
,SimEnvGraphFunctionality
Functionality is used to start functions in Framework by class for name instatiation. Method
startFunctionaltiy is allways called when functionality starts.
Abstract implemented parts:
Parameters are handled by AbstractFuncitonality. You have access to Mainframe and the MainTab
in TabViewModule. Additionally you can create new Tab for started Functionaliatimplementation.
For instantiation use FunctionalityFactory with specific FunctionModel.
- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor is protected for beeing overwritte by implementation - used for ClassForName implementation -
Method Summary
Modifier and TypeMethodDescriptionprotected org.jdom2.Element
getID()
Collection<org.jdom2.Element>
protected String
getLocaleValue
(String aKey) This method limits the coding for reading values from the locale.evaluating the expression for nextFunction and returning itgetOID()
getParameter
(String aKey) evaluating the expression for previousFunction and returning itboolean
protected void
initialize
(Map<String, Object> aParameterMap) method initializes the Functionality implementation with jdom Elementprotected void
initialize
(FWFunctionalityModel aFunctionModel) method initializes the Functionality implementation with jdom Elementvoid
run()
abstract method which has to be implemented in implementation - allways executed in Framework while this class is usedabstract method which has to be implemented in implementation - always executed in Framework while this class is usedvoid
setCenterPanel
(JPanel aCenterPanel) protected void
setCurrentThread
(Thread aCurrentThread) void
setObservable
(FWObservable aOservable) void
setOutputParameter
(String aKey, Object aValue) boolean
protected abstract void
abstract method which has to be implemented in implementation - allways executed in Framework while this class is usedboolean
stopping current Thread if it is still runningorg.jdom2.Element
toXML()
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
FWAbstractFunctionality
protected FWAbstractFunctionality()Default constructor is protected for beeing overwritte by implementation - used for ClassForName implementation
-
-
Method Details
-
initialize
method initializes the Functionality implementation with jdom Element- Parameters:
aParameterMap
-
-
initialize
method initializes the Functionality implementation with jdom Element- Parameters:
aFunctionModel
-
-
startFunctionality
abstract method which has to be implemented in implementation - allways executed in Framework while this class is used- Throws:
Exception
-
getFunctionElement
protected org.jdom2.Element getFunctionElement()- Returns:
- returns the Functionelement saved in this Functionality
-
runFunctionality
abstract method which has to be implemented in implementation - always executed in Framework while this class is used- Returns:
- FWObservable
- Throws:
Exception
-
run
public void run()abstract method which has to be implemented in implementation - allways executed in Framework while this class is used -
getID
- Returns:
- Identifier of this Functionality
-
getSystemID
- Returns:
- Identifier of this Functionality
-
getOID
- Returns:
- Objectidentifierer of this Functionaliy - allways unique!
-
getUserGroup
- Returns:
- usergroup which is allowed to use this function
-
getStringParameterValue
- Parameters:
aKey
-- Returns:
- one parameter value for given key - null if key was not set
-
getParameter
- Parameters:
aKey
-- Returns:
- parameter specified by aKey
-
getMainFrame
- Returns:
- MainFrame of application
-
getMainComponent
- Returns:
- selected tab panel of TabView
-
getObservable
- Returns:
- the output parameter map != input parameter map
-
getNextFunction
evaluating the expression for nextFunction and returning it- Returns:
- the next Function ID String
-
getPreviousFunction
evaluating the expression for previousFunction and returning it- Returns:
- the previous Function ID String
-
shouldFunctionBeRun
- Returns:
- if this function should be run
- Throws:
PipeLineException
-
setOutputParameter
- Parameters:
aKey
-aValue
-
-
setObservable
- Parameters:
aOservable
-
-
getLocaleValue
This method limits the coding for reading values from the locale.- Parameters:
aKey
-- Returns:
- LocaleValue specified by aKey
-
stopThread
public boolean stopThread()stopping current Thread if it is still running- Returns:
- true, if the Thread was running and it is stopped, false if it was already stopped
-
setCurrentThread
- Parameters:
aCurrentThread
- the currentThread to set
-
hasInfoElements
public boolean hasInfoElements()- Returns:
- true, if InfoElements are contained
-
getInfoElements
- Returns:
- collection of InfoElements
-
getCenterPanel
- Returns:
- center Panel
-
setCenterPanel
- Parameters:
aCenterPanel
-
-
getCurrentThread
- Returns:
- the current Thread
-
toXML
public org.jdom2.Element toXML()- Returns:
- the generated XML as description of this functionality
-