/** * Validates the contents of the passed {@link StringMatchingExpression} without the need to * create corresponding editing controls. * * @param expression * {@link StringMatchingExpression} to validate * @return a set of {@link ValidationState} instances. */ public static Set<ValidationState> validate(StringMatchingExpression expression) { Set<ValidationState> resultSet = new HashSet<>(); HttpParameterValueSource httpParameterValueSource = (HttpParameterValueSource) expression.getStringValueSource(); if (StringUtils.isBlank(httpParameterValueSource.getParameterName())) { resultSet.add(new ValidationState(PARAMETER_NAME_VALIDATOR_ID, false, PARAMETER_NAME_VALIDATION_ERROR_MESSAGE)); } resultSet.addAll(AbstractStringMatchingRuleEditingElement.validate(expression, SOURCE_NAME)); return resultSet; }
/** * * {@inheritDoc} */ @Override protected void executeSpecificInitialization(StringMatchingExpression expression) { if (isValidExpression(expression)) { super.executeSpecificInitialization(expression); parameterNameText.setText(getStringValueSource().getParameterName()); } }
/** * {@inheritDoc} */ @Override public String[] getStringValues(InvocationSequenceData invocSequence, ICachedDataService cachedDataService) { if (InvocationSequenceDataHelper.hasHttpTimerData(invocSequence)) { HttpTimerData httpData = (HttpTimerData) invocSequence.getTimerData(); if (null != httpData.getParameters()) { String[] result = httpData.getParameters().get(this.getParameterName()); return null == result ? new String[0] : result; } } return new String[0]; }
case HTTP_PARAMETER: createHttpParameterControls(); String parameterName = ((HttpParameterValueSource) nameExtractionExpression.getStringValueSource()).getParameterName(); if (null == parameterName) { parameterName = "";