Examples of decide()


Examples of org.apache.log4j.spi.Filter.decide()

        LoggingEvent event = new LoggingEvent("org.apache.log4j.Logger",
                Logger.getLogger(DenyAllFilterTest.class),
                System.currentTimeMillis(), Level.INFO, "Hello, World", null);
        Filter filter = new DenyAllFilter();
        filter.activateOptions();
        assertEquals(Filter.DENY, filter.decide(event));
    }

}
View Full Code Here

Examples of org.apache.log4j.spi.Filter.decide()

        LoggingEvent event = new LoggingEvent("org.apache.log4j.Logger",
                Logger.getRootLogger(),
                System.currentTimeMillis(), Level.INFO, "Hello, World", null);
        Filter filter = new LoggerMatchFilter();
        filter.activateOptions();
        assertEquals(Filter.ACCEPT, filter.decide(event));
    }

    /**
     * Check that LoggerMatchFilter.decide() with unspecified level
     *    returns Filter.DENY for root logger when accept on match is false.
View Full Code Here

Examples of org.apache.log4j.spi.Filter.decide()

        LoggingEvent event = new LoggingEvent("org.apache.log4j.Logger",
                Logger.getLogger("org.apache.log4j.filter.LoggerMatchFilterTest"),
                System.currentTimeMillis(), Level.INFO, "Hello, World", null);
        Filter filter = new LoggerMatchFilter();
        filter.activateOptions();
        assertEquals(Filter.NEUTRAL, filter.decide(event));
    }

    /**
     * Check that LoggerMatchFilter.decide()
     *    returns Filter.ACCEPT for matching logger.
View Full Code Here

Examples of org.apache.log4j.spi.Filter.decide()

        LoggingEvent event = new LoggingEvent("org.apache.log4j.Logger",
                Logger.getLogger(AndFilterTest.class),
                System.currentTimeMillis(), Level.INFO, "Hello, World", null);
        Filter filter = new AndFilter();
        filter.activateOptions();
        assertEquals(Filter.ACCEPT, filter.decide(event));
    }

    /**
     * Check that AndFilter.decide() returns Filter.ACCEPT if
     *    only nested filter returns Filter.ACCEPT.
View Full Code Here

Examples of org.apache.log4j.spi.Filter.decide()

        LoggingEvent event = new LoggingEvent("org.apache.log4j.Logger",
                Logger.getLogger(StringMatchFilterTest.class),
                System.currentTimeMillis(), Level.INFO, "Hello, World", null);
        Filter filter = new StringMatchFilter();
        filter.activateOptions();
        assertEquals(Filter.NEUTRAL, filter.decide(event));
    }

    /**
     * Check that StringMatchFilter.decide() returns Filter.NEUTRAL
     *   when string to match does not appear in message.
View Full Code Here

Examples of org.jboss.arquillian.graphene.spi.location.LocationDecider.decide()

        if (decider == null) {
            throw new UnsupportedOperationException(String.format("There is not any registered location decider "
                + "which can decide '%s' scheme.", location.scheme().toString()));
        }

        browser.get(decider.decide(location.value()));
    }

    /**
     * Returns the index of the first parameter which contains the <code>annotation</code>
     *
 
View Full Code Here

Examples of org.jbpm.api.jpdl.DecisionHandler.decide()

      usedDecisionHandler = (DecisionHandler) object;
    } else {
      throw new JbpmException("no decision handler specified");
    }
   
    transitionName = usedDecisionHandler.decide(execution);

    Transition transition = activity.getOutgoingTransition(transitionName);
    if (transition==null) {
      throw new JbpmException("handler in decision '"+activity.getName()+"' returned unexisting outgoing transition name: "+transitionName);
    }
View Full Code Here

Examples of org.jbpm.graph.node.DecisionHandler.decide()

   */
  public String decide(ExecutionContext executionContext) throws Exception {
    DecisionHandler handler = (DecisionHandler) lookupBean(DecisionHandler.class);
    if (logger.isDebugEnabled())
      logger.debug("using Spring-managed decisionHandler=" + handler);
    return handler.decide(executionContext);
  }

  /**
   * @see org.jbpm.taskmgmt.def.TaskControllerHandler#getTaskFormParameters(org.jbpm.taskmgmt.exe.TaskInstance)
   */
 
View Full Code Here

Examples of org.jbpm.graph.node.DecisionHandler.decide()

   */
  public String decide(ExecutionContext executionContext) throws Exception {
    DecisionHandler handler = (DecisionHandler) lookupBean(DecisionHandler.class);
    if (logger.isDebugEnabled())
      logger.debug("using Spring-managed decisionHandler=" + handler);
    return handler.decide(executionContext);
  }

  /**
   * @see org.jbpm.graph.def.ActionHandler#execute(org.jbpm.graph.exe.ExecutionContext)
   */
 
View Full Code Here

Examples of org.jbpm.graph.node.DecisionHandler.decide()

      String transitionName = null;
      try {
        Delegation decisionDelegation = getDecision().getDecisionDelegation();
        if (decisionDelegation != null) {
          DecisionHandler decisionHandler = (DecisionHandler) decisionDelegation.instantiate();
          transitionName = decisionHandler.decide(new JpdlExecutionContext());
        } else if (getDecision().getDecisionExpression() != null) {
          String decisionExpression = getDecision().getDecisionExpression();
          Object result = JbpmExpressionEvaluator.evaluate(
          decisionExpression, new JpdlExecutionContext());
          if (result == null) {
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.