Klasse FWObservable

java.lang.Object
net.simplace.core.FWObservable

public class FWObservable extends Object
Autor:
Andreas Enders
  • Konstruktordetails

    • FWObservable

      public FWObservable(Map<String,Object> aFormInputParameterMap, FWAbstractFunctionality aFormFunctionality)
      Parameter:
      aFormInputParameterMap -
      aFormFunctionality -
    • FWObservable

      public FWObservable()
      Parameter:
      aParameterMap -
  • Methodendetails

    • addObserver

      public void addObserver(FWObserver aObserver)
      Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.
      Parameter:
      aObserver -
      o - an observer to be added.
      Löst aus:
      NullPointerException - if the parameter o is null.
    • getParameterMap

      public Map<String,Object> getParameterMap()
      Gibt zurück:
      the parameterMap
    • getStringParameterValue

      public String getStringParameterValue(String aKey)
      Parameter:
      aKey -
      Gibt zurück:
      one parameter value for given key - null if key was not set
    • getIntegerParameterValue

      public Integer getIntegerParameterValue(String aKey)
      Parameter:
      aKey -
      Gibt zurück:
      one parameter converted to Integer value for given key - null if key was not set or value not convertible
    • getDoubleParameterValue

      public Double getDoubleParameterValue(String aKey)
      Parameter:
      aKey -
      Gibt zurück:
      one parameter converted to Double value for given key - null if key was not set or value not convertible
    • getBooleanParameterValue

      public boolean getBooleanParameterValue(String aParamKey, boolean aDefault)
      Parameter:
      aParamKey -
      aDefault -
      Gibt zurück:
      boolean parameter value
    • replaceParamTokens

      public String replaceParamTokens(String aString, Object aDefault)
      replaces Parameters
      Parameter:
      aString -
      aDefault -
      Gibt zurück:
      aNewValue
    • replaceParamTokens

      public String replaceParamTokens(String aString, Object aDefault, boolean aIgnoreNull)
      replaces Parameters
      Parameter:
      aString -
      aDefault -
      aIgnoreNull -
      Gibt zurück:
      aNewValue
    • getParameter

      public Object getParameter(String aKey)
      Parameter:
      aKey -
      Gibt zurück:
      parameter by aKey
    • getParameter

      public Object getParameter(String aKey, Object aDefault)
      Parameter:
      aKey -
      aDefault -
      Gibt zurück:
      parameter by aKey or default value
    • setParameterValue

      public void setParameterValue(String aKey, Object aValue)
      Parameter:
      aKey -
      aValue -
    • setParameterValue

      public void setParameterValue(String aKey, Object aValue, boolean aShouldNotify)
      Parameter:
      aKey -
      aValue -
      aShouldNotify -
    • getSystemID

      public String getSystemID()
      Gibt zurück:
      Identifier of this Functionality
    • notifyObservers

      public void notifyObservers()
      If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

      Each observer has its update method called with two arguments: this observable object and null. In other words, this method is equivalent to:

      notifyObservers(null)
      Siehe auch:
    • notifyObservers

      public void notifyObservers(Object arg)
      If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

      Each observer has its update method called with two arguments: this observable object and the arg argument.

      Parameter:
      arg - any object.
      Siehe auch:
    • setChanged

      protected void setChanged()
      Marks this Observable object as having been changed; the hasChanged method will now return true.
    • clearChanged

      protected void clearChanged()
      Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false. This method is called automatically by the notifyObservers methods.
      Siehe auch:
    • hasChanged

      public boolean hasChanged()
      Tests if this object has changed.
      Gibt zurück:
      true if and only if the setChanged method has been called more recently than the clearChanged method on this object; false otherwise.
      Siehe auch:
    • countObservers

      public int countObservers()
      Returns the number of observers of this Observable object.
      Gibt zurück:
      the number of observers of this object.
    • getFunctionality

      public FWAbstractFunctionality getFunctionality()
      Returns the number of observers of this Observable object.
      Gibt zurück:
      the number of observers of this object.
    • clone

      public FWObservable clone()
      Returns the number of observers of this Observable object.
      Setzt außer Kraft:
      clone in Klasse Object
      Gibt zurück:
      the number of observers of this object.
    • removeParameter

      public void removeParameter(String aElement)
      Parameter:
      aElement -
    • putAllParameters

      public void putAllParameters(Map<String,Object> aParamMap)
      Parameter:
      aParamMap -
    • isParameterSet

      public boolean isParameterSet(String aKey)
      Parameter:
      aKey -
      Gibt zurück:
      true, is the parameter is set, otherwise returns false
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object