Package net.sourceforge.urlrewriter4j.core

Examples of net.sourceforge.urlrewriter4j.core.RewriteProcessing


  public IRewriteAction parse(Node pNode, RewriterConfiguration pConfig)
      throws ConfigurationException {
    Node oRewriteNode = pNode.getAttributes().getNamedItem(Constants.ATTR_REWRITE);
    if (oRewriteNode == null) {
      Node oProcessingNode = pNode.getAttributes().getNamedItem(Constants.ATTR_PROCESSING);
      RewriteProcessing oProcessing = ParserHelper.parseProcessing(oProcessingNode, RewriteProcessing.ContinueProcessing);
      return new RewriteAction(oRewriteNode.getNodeValue(), oProcessing);
    }
    return null;
  }
View Full Code Here


  @Override
  public IRewriteAction parse(Node pNode, RewriterConfiguration pConfig)
      throws ConfigurationException {
    Node oToNode = ParserHelper.getAttribute(pNode, Constants.ATTR_TO, true);
    Node oProcessingNode = pNode.getAttributes().getNamedItem(Constants.ATTR_PROCESSING);
    RewriteProcessing oProcessing = ParserHelper.parseProcessing(oProcessingNode, RewriteProcessing.ContinueProcessing);
    RewriteAction oAction = new RewriteAction(oToNode.getNodeValue(), oProcessing);
    parseConditions(pNode, oAction.getConditions(), false, pConfig);
    return oAction;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see net.urlrewriter.actions.IRewriteAction#execute(net.urlrewriter.RewriteContext)
   */
  public RewriteProcessing execute(RewriteContext pContext) throws RewriteException {
    RewriteProcessing oResult = RewriteProcessing.ContinueProcessing;
    for (int i = 0; i < mActions.size() && oResult == RewriteProcessing.ContinueProcessing; i++) {
      Object oItem = mActions.get(i);
      if (oItem instanceof IRewriteCondition) {
        IRewriteCondition oCondition = (IRewriteCondition) oItem;
        if (!oCondition.isMatch(pContext)) continue;
View Full Code Here

  public ParserHelper() {
    super();
  }
 
  public static RewriteProcessing parseProcessing(Node pNode, RewriteProcessing pDefault) throws ConfigurationException {
    RewriteProcessing oResult = pDefault;
    if (pNode != null) {
      if (Constants.ATTRVALUE_RESTART.equalsIgnoreCase(pNode.getNodeValue())) {
        oResult = RewriteProcessing.RestartProcessing;
      } else if (Constants.ATTRVALUE_STOP.equalsIgnoreCase(pNode.getNodeValue())) {
        oResult = RewriteProcessing.StopProcessing;
View Full Code Here

    Document oDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    mAttribute = oDoc.createAttribute("processingTest");
  }
 
  public void parsingTest(RewriteProcessing pExpected, RewriteProcessing pDefault) throws Exception {
    RewriteProcessing oResult = ParserHelper.parseProcessing(mAttribute, pDefault);
    assertEquals(pExpected, oResult);
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.urlrewriter4j.core.RewriteProcessing

Copyright © 2018 www.massapicom. 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.