public class RegexpWhiteListRule extends PerformanceCareRule implements FUSRegexpAwareRule
EMPTY_ARRAY, FALSE, TRUE| Constructor and Description |
|---|
RegexpWhiteListRule(java.lang.String regexp) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asRegexp() |
ValidationResultType |
doValidate(java.lang.String data,
EventContext context)
Validates event id and event data before recording it locally.
|
static java.lang.String |
escapeText(java.lang.String text) |
boolean |
isValidRule() |
java.lang.String |
toString() |
validatepublic ValidationResultType doValidate(java.lang.String data, EventContext context)
PerformanceCareRuleValidates event id and event data before recording it locally. Used to ensure that no personal or proprietary data is recorded.
ValidationResultType.ACCEPTED - data is checked and should be recorded as is;ValidationResultType.THIRD_PARTY - data is correct but is implemented in an unknown third-party plugin, e.g. third-party file typePluginInfo#isDevelopedByJetBrains(), PluginInfo#isSafeToReport();ValidationResultType.REJECTED - unexpected data, e.g. cannot find run-configuration by provided id;doValidate in class PerformanceCareRuledata - what is validated. Event id or the value of event data field.context - whole event context, i.e. both event id and event data.public java.lang.String asRegexp()
asRegexp in interface FUSRegexpAwareRulepublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String escapeText(java.lang.String text)
public boolean isValidRule()
isValidRule in interface FUSRule