Package net.simplace.sim.check
Klasse FWCheckHelper
java.lang.Object
net.simplace.sim.check.FWCheckHelper
Checks the setting of values and other tasks in the system due to 4 different checking levels.
Main idea of the levels is explained in
FWCheckHelper.CHECK_LEVEL.- Autor:
- Andreas Enders
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFWCheckHelper(FWCheckHelper.CHECK_LEVEL aLevel, String aCustomCheckerClassName, FWSimSession aSession) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidcheckCondition(Boolean aCheckResult, String aMessage, FWSimFieldContainer aInstance) Called from inside the FWSimFieldContainer to log the initialization Errors.checkLimits(FWSimVariable<?> aSource, Number aValue, Number aMin, Number aMax) Returns false if aValue is NaN or outside limits.booleancheckOnlyMode(String aSimulationID) booleancheckParametersInScript(Collection<String> aAllowedFields, Collection<String> aForbiddenFields, String aJexlScript, FWSimFieldContainer aSource) Returns false if the content type makes the variable write protectedbooleancheckResource(Map<String, FWSimInputAdapter> aResourceCreators, FWSimVarMap aVarMap, Map<String, FWSimResourceCache> aResourcesCacheMap) booleancheckSource(FWSimVariable<?> aTarget, FWSimFieldContainer aSimFieldContainer, FWSimFieldContainer aSource) Returns false if the owning container: .booleancheckWriteProtectionOnContentType(FWSimVariable<?> aTarget, FWSimVariable.CONTENT_TYPE aContentType, FWSimFieldContainer aSource) Returns false if the content type makes the variable write protectedvoidfinalize()booleanvoidsetCheckLevel(FWCheckHelper.CHECK_LEVEL aCheckLevel)
-
Konstruktordetails
-
FWCheckHelper
public FWCheckHelper(FWCheckHelper.CHECK_LEVEL aLevel, String aCustomCheckerClassName, FWSimSession aSession) - Parameter:
aLevel-aCustomCheckerClassName-aSession-
-
-
Methodendetails
-
getCheckLevel
- Gibt zurück:
- the checkLevel
-
setCheckLevel
- Parameter:
aCheckLevel- the checkLevel to set
-
checkLimits
public 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.- Parameter:
aSource-aValue-aMin-aMax-- Gibt zurück:
- if limits are checked valid - if level Ungültige Eingabe: "<" LAZY no check is performed (return true)
- Löst aus:
SimValueOutOfRangeException
-
checkSource
public boolean checkSource(FWSimVariable<?> aTarget, FWSimFieldContainer aSimFieldContainer, FWSimFieldContainer aSource) throws SimLinkInvalidException Returns false if the owning container: .- Parameter:
aTarget-aSimFieldContainer- is same as the writing sourceaSource-- Gibt zurück:
- if check is valid - if level Ungültige Eingabe: "<" LAZY no check is performed (return true)
- Löst aus:
SimLinkInvalidException
-
checkWriteProtectionOnContentType
public boolean checkWriteProtectionOnContentType(FWSimVariable<?> aTarget, FWSimVariable.CONTENT_TYPE aContentType, FWSimFieldContainer aSource) throws SimLinkInvalidException Returns false if the content type makes the variable write protected- Parameter:
aTarget-aContentType-aSource-- Gibt zurück:
- if check is valid - if level Ungültige Eingabe: "<" LAZY no check is performed (return true)
- Löst aus:
SimLinkInvalidException
-
checkResource
public boolean checkResource(Map<String, FWSimInputAdapter> aResourceCreators, FWSimVarMap aVarMap, Map<String, FWSimResourceCache> aResourcesCacheMap) -
isConditionCheck
public boolean isConditionCheck() -
checkCondition
Called from inside the FWSimFieldContainer to log the initialization Errors.- Parameter:
aCheckResult-aMessage-aInstance-
-
checkOnlyMode
-
checkParametersInScript
public boolean checkParametersInScript(Collection<String> aAllowedFields, Collection<String> aForbiddenFields, String aJexlScript, FWSimFieldContainer aSource) Returns false if the content type makes the variable write protected- Parameter:
aAllowedFields-aForbiddenFields-aJexlScript-aSource-aContentType-- Gibt zurück:
- if check is valid - if level Ungültige Eingabe: "<" LAZY no check is performed (return true)
-
finalize
public void finalize()
-