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

public abstract class FWAbstractFunctionality extends Thread
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
  • Constructor Details

    • FWAbstractFunctionality

      protected FWAbstractFunctionality()
      Default constructor is protected for beeing overwritte by implementation - used for ClassForName implementation
  • Method Details

    • initialize

      protected void initialize(Map<String,Object> aParameterMap)
      method initializes the Functionality implementation with jdom Element
      Parameters:
      aParameterMap -
    • initialize

      protected void initialize(FWFunctionalityModel aFunctionModel)
      method initializes the Functionality implementation with jdom Element
      Parameters:
      aFunctionModel -
    • startFunctionality

      protected abstract void startFunctionality() throws Exception
      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

      public FWObservable runFunctionality() throws Exception
      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
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • getID

      public String getID()
      Returns:
      Identifier of this Functionality
    • getSystemID

      public String getSystemID()
      Returns:
      Identifier of this Functionality
    • getOID

      public String getOID()
      Returns:
      Objectidentifierer of this Functionaliy - allways unique!
    • getUserGroup

      public String getUserGroup()
      Returns:
      usergroup which is allowed to use this function
    • getStringParameterValue

      public String getStringParameterValue(String aKey)
      Parameters:
      aKey -
      Returns:
      one parameter value for given key - null if key was not set
    • getParameter

      public Object getParameter(String aKey)
      Parameters:
      aKey -
      Returns:
      parameter specified by aKey
    • getMainFrame

      public FWMainFrame getMainFrame()
      Returns:
      MainFrame of application
    • getMainComponent

      public Component getMainComponent()
      Returns:
      selected tab panel of TabView
    • getObservable

      public FWObservable getObservable()
      Returns:
      the output parameter map != input parameter map
    • getNextFunction

      public String getNextFunction()
      evaluating the expression for nextFunction and returning it
      Returns:
      the next Function ID String
    • getPreviousFunction

      public String getPreviousFunction()
      evaluating the expression for previousFunction and returning it
      Returns:
      the previous Function ID String
    • shouldFunctionBeRun

      public boolean shouldFunctionBeRun() throws PipeLineException
      Returns:
      if this function should be run
      Throws:
      PipeLineException
    • setOutputParameter

      public void setOutputParameter(String aKey, Object aValue)
      Parameters:
      aKey -
      aValue -
    • setObservable

      public void setObservable(FWObservable aOservable)
      Parameters:
      aOservable -
    • getLocaleValue

      protected String getLocaleValue(String aKey)
      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

      protected void setCurrentThread(Thread aCurrentThread)
      Parameters:
      aCurrentThread - the currentThread to set
    • hasInfoElements

      public boolean hasInfoElements()
      Returns:
      true, if InfoElements are contained
    • getInfoElements

      public Collection<org.jdom2.Element> getInfoElements()
      Returns:
      collection of InfoElements
    • getCenterPanel

      public JPanel getCenterPanel()
      Returns:
      center Panel
    • setCenterPanel

      public void setCenterPanel(JPanel aCenterPanel)
      Parameters:
      aCenterPanel -
    • getCurrentThread

      public Thread getCurrentThread()
      Returns:
      the current Thread
    • toXML

      public org.jdom2.Element toXML()
      Returns:
      the generated XML as description of this functionality