Package org.apache.hadoop.gateway.filter.rewrite.api

Examples of org.apache.hadoop.gateway.filter.rewrite.api.UrlRewriteFilterGroupDescriptor


  }

  private class FilterApplyFactory extends FactoryRule {
    @Override
    public Object create( String namespace, String name, Attributes attributes ) {
      UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
      UrlRewriteFilterPathDescriptor child = new UrlRewriteFilterApplyDescriptorImpl();
      child.path( attributes.getValue( "path" ) );
      parent.addSelector( child );
      return child;
    }
View Full Code Here


  }

  private class FilterScopeFactory extends FactoryRule {
    @Override
    public Object create( String namespace, String name, Attributes attributes ) {
      UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
      UrlRewriteFilterPathDescriptor child = new UrlRewriteFilterScopeDescriptorImpl();
      child.path( attributes.getValue( "path" ) );
      parent.addSelector( child );
      return child;
    }
View Full Code Here

  }

  private class FilterBufferFactory extends FactoryRule {
    @Override
    public Object create( String namespace, String name, Attributes attributes ) {
      UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
      UrlRewriteFilterPathDescriptor child = new UrlRewriteFilterBufferDescriptorImpl();
      child.path( attributes.getValue( "path" ) );
      parent.addSelector( child );
      return child;
    }
View Full Code Here

  }

  private class FilterDetectFactory extends FactoryRule {
    @Override
    public Object create( String namespace, String name, Attributes attributes ) {
      UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
      UrlRewriteFilterPathDescriptor child = new UrlRewriteFilterDetectDescriptorImpl();
      child.path( attributes.getValue( "path" ) );
      parent.addSelector( child );
      return child;
    }
View Full Code Here

    }
  }

  protected boolean startBuffering( Level node ) {
    boolean buffered = false;
    UrlRewriteFilterGroupDescriptor scope = node.scopeConfig;
    if( scope != null ) {
      for( UrlRewriteFilterPathDescriptor selector : scope.getSelectors() ) {
        JsonPath.Expression path = (JsonPath.Expression)selector.compiledPath( JPATH_COMPILER );
        List<JsonPath.Match> matches = path.evaluate( node.scopeNode );
        if( matches != null && matches.size() > 0 ) {
          if( selector instanceof UrlRewriteFilterBufferDescriptor ) {
            bufferingLevel = node;
View Full Code Here

      value = node.node.get( 0 ).asText();
    } else {
      value = node.node.get( node.field ).asText();
    }
    String rule = null;
    UrlRewriteFilterGroupDescriptor scope = node.scopeConfig;
    //TODO: Scan the top level apply rules for the first match.
    if( scope != null ) {
      for( UrlRewriteFilterPathDescriptor selector : scope.getSelectors() ) {
        JsonPath.Expression path = (JsonPath.Expression)selector.compiledPath( JPATH_COMPILER );
        List<JsonPath.Match> matches = path.evaluate( node.scopeNode );
        if( matches != null && matches.size() > 0 ) {
          JsonPath.Match match = matches.get( 0 );
          if( match.getNode().isTextual() ) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.gateway.filter.rewrite.api.UrlRewriteFilterGroupDescriptor

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.