Package net.simplace.sim.check
Class FWChecker
java.lang.Object
net.simplace.sim.check.FWChecker
- Direct Known Subclasses:
DefaultChecker
Class that implements different methods that are checked by
FWCheckHelper
Instances are controlled by the CheckHelper, too.- Author:
- Andreas Enders
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Number
checkLimits
(FWSimVariable<?> aSource, Number aValue, Number aMin, Number aMax) Returns false if aValue is NaN or outside limits.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 ForbiddenFieldsprotected abstract boolean
checkSource
(FWSimVariable<?> aTarget, FWSimFieldContainer aSimFieldContainer, FWSimFieldContainer aSource) Returns false if the owning container: .protected abstract boolean
checkWriteProtectionOnContentType
(FWSimVariable<?> aTarget, FWSimVariable.CONTENT_TYPE aContentType, FWSimFieldContainer aSource) Returns false if the content type makes the variable write protected
-
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 sourceaSource
-- 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)
-