Class FWChecker

java.lang.Object
net.simplace.sim.check.FWChecker
Direct Known Subclasses:
DefaultChecker

public abstract class FWChecker extends Object
Class that implements different methods that are checked by FWCheckHelper Instances are controlled by the CheckHelper, too.
Author:
Andreas Enders
  • Constructor Details

    • FWChecker

      public FWChecker()
  • Method Details

    • checkLimits

      protected abstract Number checkLimits(FWSimVariable<?> aSource, Number aValue, Number aMin, Number aMax) throws SimValueOutOfRangeException
      Returns false if aValue is NaN or outside limits. Limits that are null are ignored.
      Parameters:
      aSource -
      aValue -
      aMin -
      aMax -
      Returns:
      if limits are checked valid - if level < LAZY no check is performed (return true)
      Throws:
      SimValueOutOfRangeException
    • checkSource

      protected abstract boolean checkSource(FWSimVariable<?> aTarget, FWSimFieldContainer aSimFieldContainer, FWSimFieldContainer aSource) throws SimLinkInvalidException
      Returns false if the owning container: .
      Parameters:
      aTarget -
      aSimFieldContainer - is same as the writing source
      aSource -
      Returns:
      if check is valid - if level < LAZY no check is performed (return true)
      Throws:
      SimLinkInvalidException
    • checkWriteProtectionOnContentType

      protected abstract boolean checkWriteProtectionOnContentType(FWSimVariable<?> aTarget, FWSimVariable.CONTENT_TYPE aContentType, FWSimFieldContainer aSource) throws SimLinkInvalidException
      Returns false if the content type makes the variable write protected
      Parameters:
      aTarget -
      aContentType -
      aSource -
      Returns:
      if check is valid - if level < LAZY no check is performed (return true)
      Throws:
      SimLinkInvalidException
    • checkParametersInScript

      protected abstract boolean checkParametersInScript(Collection<String> aAllowedFields, Collection<String> aForbiddenFields, String aJexlScript)
      Returns false if parameters in the Script are not in AllowedFields exclusive or they are in ForbiddenFields
      Parameters:
      aAllowedFields -
      aForbiddenFields -
      aJexlScript -
      Returns:
      if check is valid - if level < LAZY no check is performed (return true)