Examples of IHttpConditionType


Examples of com.subgraph.vega.api.model.conditions.IHttpConditionType

  private void addRequestIdConditionRule(long requestId) {
    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);
    }
    requestIdCondition = type.createConditionInstance(matchAction);
    requestIdCondition.setSufficient(true);
    conditionSet.appendTemporaryCondition(requestIdCondition, true);
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.IHttpConditionType

  private void handleWebResponseSelected(IHttpConditionSet conditionSet, IWebResponse response) {
    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.IHttpConditionType

    final IHttpCondition condition = type.createConditionInstance(matchAction);
    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.IHttpConditionType

      return;
    final IStructuredSelection ss = (IStructuredSelection) selection;
    if(!(ss.getFirstElement() instanceof IHttpConditionType))
      return;
   
    final IHttpConditionType conditionType = (IHttpConditionType) ss.getFirstElement();
    matchActionViewer.setMatchActionInput(conditionType.getMatchActions());
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.IHttpConditionType

        for(Object element: selection.toList()) {
          if(element instanceof IHttpCondition) {
            conditionSet.removeCondition((IHttpCondition) element, false);
            conditionSetDirty = true;
          } else if (element instanceof IHttpConditionType) {
            IHttpConditionType type = (IHttpConditionType) element;
            for(IHttpCondition c: conditionSet.getAllConditions()) {
              if(c.getType() == type) {
                conditionSet.removeCondition(c, false);
                conditionSetDirty = true;
              }
View Full Code Here

Examples of com.subgraph.vega.api.model.conditions.IHttpConditionType

    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:
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.