Class InputDependency

java.lang.Object
com.motivewave.platform.sdk.common.desc.InputDependency
Direct Known Subclasses:
EnabledDependency, TradeLotsDependency, ValueDependency

public class InputDependency extends Object
  • Field Details

  • Constructor Details

    • InputDependency

      public InputDependency(String src, String... fields)
    • InputDependency

      public InputDependency(List<String> sources, String... fields)
  • Method Details

    • onSourceUpdated

      public void onSourceUpdated(Settings settings, Map<String,Object> fields)
      Override this method to implement a dependency between fields.
    • getSource

      public String getSource()
      Gets the identifier for the primary source of this dependency.
    • getSources

      public List<String> getSources()
    • setSource2

      public void setSource2(String src)
      Sets an option secondary source. If set the fields will be enabled if the source and source2 are enabled.
      Parameters:
      src - identifier of the secondary source
    • getSource2

      public String getSource2()
      Gets an option secondary source. If set the fields will be enabled if the source and source2 are enabled.
      Returns:
      identifier of the secondary source
    • setSource3

      public void setSource3(String src)
      Sets an option tertiary source. If set the fields will be enabled if the source and source2 and source3 are enabled.
      Parameters:
      src - identifier of the tertiary source
    • getSource3

      public String getSource3()
      Gets an option tertiary source. If set the fields will be enabled if the source and source2 and source3 are enabled.
      Returns:
      identifier of the tertiary source
    • getDependentFields

      public List<String> getDependentFields()
    • getSettingsDescriptor

      public SettingsDescriptor getSettingsDescriptor()
    • setSettingsDescriptor

      public void setSettingsDescriptor(SettingsDescriptor sd)
    • areConditionsMet

      public boolean areConditionsMet(Settings settings)
    • isHideControl

      public boolean isHideControl()
      Gets the hide control option. If true the controls will be hidden when the dependency is not met, otherwise it will be disabled. By default this option is false.
      Returns:
      true if the control should be hidden when the dependency is not met.
    • setHideControl

      public void setHideControl(boolean b)
      Sets the option to hide the control when the dependency is not met. Otherwise the control will be hidden.
      Parameters:
      b - true if the control be hidden