Examples of IHttpConditionMatchAction


Examples of com.subgraph.vega.api.model.conditions.match.IHttpConditionMatchAction

    conditionSet.appendTemporaryCondition(condition, false);
  }
 
  private void addPathCondition(IHttpConditionSet conditionSet, String path) {
    final IHttpConditionType type = conditionSet.getConditionManager().getConditionTypeByName("request path");
    final IHttpConditionMatchAction matchAction = type.getMatchActionByName("starts with");
    matchAction.setArgumentFromString(path);
    final IHttpCondition condition = type.createConditionInstance(matchAction);
    conditionSet.appendTemporaryCondition(condition, false);
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.match.IHttpConditionMatchAction

    if(contentProvider == null || contentProvider.getConditionSet() == null) {
      return;
    }
    final IHttpConditionSet conditionSet = contentProvider.getConditionSet();
    final IHttpConditionType type = conditionSet.getConditionManager().getConditionTypeByName("request id");
    final IHttpConditionMatchAction matchAction = type.getMatchActionByName("equals");

    ((IHttpConditionIntegerMatchAction) matchAction).setInteger((int) requestId);
   
    if(requestIdCondition != null) {
      conditionSet.removeTemporaryCondition(requestIdCondition, false);
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.match.IHttpConditionMatchAction

    handleWebPathSelected(conditionSet, response.getPathEntity());
  }

  private void addHostnameCondition(IHttpConditionSet conditionSet, String hostname) {
    final IHttpConditionType type = conditionSet.getConditionManager().getConditionTypeByName("hostname");
    final IHttpConditionMatchAction matchAction = type.getMatchActionByName("contains");
    matchAction.setArgumentFromString(hostname);
    final IHttpCondition condition = type.createConditionInstance(matchAction);
    conditionSet.appendTemporaryCondition(condition, false);
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.match.IHttpConditionMatchAction

  }

  @Override
  protected void setValue(Object element, Object value) {
    final IHttpCondition condition = (IHttpCondition) element;
    final IHttpConditionMatchAction newMatchAction = (IHttpConditionMatchAction) value;
    final IHttpConditionMatchAction oldMatchAction = condition.getMatchAction();
    if(newMatchAction.getLabel().equals(oldMatchAction.getLabel()))
      return;
    // Input will be quietly rejected if it doesn't make sense  (ie: an integer input to a range match action)
    newMatchAction.setArgumentFromString(oldMatchAction.getArgumentAsString());
    condition.setMatchAction(newMatchAction);
    viewer.refresh(true);
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.match.IHttpConditionMatchAction

    conditionTypeViewer.reset();
    matchActionViewer.reset();
  }

  public IHttpCondition createConditionFromData() {
    final IHttpConditionMatchAction matchAction = matchActionViewer.getSelectedMatchAction();
    final IHttpConditionType conditionType = conditionTypeViewer.getSelectedConditionType();
    if(matchAction == null || conditionType == null)
      return null;
   
    switch(matchAction.getArgumentType()) {
    case ARGUMENT_STRING:
      return createStringCondition(conditionType, matchAction, matchActionArguments.getStringText());
    case ARGUMENT_REGEX:
      return createStringCondition(conditionType, matchAction, matchActionArguments.getRegexText());
    case ARGUMENT_INTEGER:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.