Examples of operation()


Examples of net.kuujo.copycat.internal.log.OperationEntry.operation()

    SnapshotEntry entry = log.getEntry(3);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
    OperationEntry entry2 = log.getEntry(4);
    assertEquals(entry2.term(), 1);
    assertEquals("bar", entry2.operation());
    OperationEntry entry3 = log.getEntry(5);
    assertEquals(entry3.term(), 1);
    assertEquals("baz", entry3.operation());
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteActionRewriteDescriptorExt.operation()

  @Test
  public void testRewriteStep() throws Exception {
    UrlRewriteRulesDescriptor rules = UrlRewriteRulesDescriptorFactory.create();
    UrlRewriteRuleDescriptor rule = rules.addRule( "test-rule" );
    UrlRewriteActionRewriteDescriptorExt step = rule.addStep( "rewrite" );
    step.operation("test-operation").parameter( "test-param" );

    StringWriter writer = new StringWriter();
    UrlRewriteRulesDescriptorFactory.store( rules, "xml", writer );

    String str = writer.toString();
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptor.operation()

  @Test
  public void testCheckStep() throws Exception {
    UrlRewriteRulesDescriptor rules = UrlRewriteRulesDescriptorFactory.create();
    UrlRewriteRuleDescriptor rule = rules.addRule( "test-rule" );
    UrlRewriteCheckDescriptor step = rule.addStep( "check" );
    step.operation("test-operation").input("test-input").value("test-value").flow( "all" );

    StringWriter writer = new StringWriter();
    UrlRewriteRulesDescriptorFactory.store( rules, "xml", writer );

    String str = writer.toString();
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), nullValue() );
      assertThat( step.operation(), nullValue() );
      assertThat( step.input(), nullValue() );
      assertThat( step.value(), nullValue() );

      reader = new StringReader( "<rules><rule><check type=\"test-type\" op=\"test-op\" input=\"test-input\" value=\"test-value\"></check></rule></rules>" );
      config = digester.parse( reader );
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), is( "test-type" ) );
      assertThat( step.operation(), is( "test-op" ) );
      assertThat( step.input(), is( "test-input" ) );
      assertThat( step.value(), is( "test-value" ) );
    }

    @Test
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), nullValue() );
      assertThat( step.operation(), nullValue() );
      assertThat( step.input(), nullValue() );
      assertThat( step.value(), nullValue() );

      reader = new StringReader( "<rules><rule><check type=\"test-type\" op=\"test-op\" input=\"test-input\" value=\"test-value\"></check></rule></rules>" );
      config = digester.parse( reader );
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), is( "test-type" ) );
      assertThat( step.operation(), is( "test-op" ) );
      assertThat( step.input(), is( "test-input" ) );
      assertThat( step.value(), is( "test-value" ) );
    }

    @Test
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), nullValue() );
      assertThat( step.operation(), nullValue() );
      assertThat( step.input(), nullValue() );
      assertThat( step.value(), nullValue() );

      reader = new StringReader( "<rules><rule><check type=\"test-type\" op=\"test-op\" input=\"test-input\" value=\"test-value\"></check></rule></rules>" );
      config = digester.parse( reader );
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteCheckDescriptorExt.operation()

      assertThat( rule.steps(), notNullValue() );
      assertThat( rule.steps().size(), is( 1 ) );
      step = (UrlRewriteCheckDescriptorExt)rule.steps().get( 0 );
      assertThat( step, notNullValue() );
      //assertThat( step.type(), is( "test-type" ) );
      assertThat( step.operation(), is( "test-op" ) );
      assertThat( step.input(), is( "test-input" ) );
      assertThat( step.value(), is( "test-value" ) );
    }

    @Test
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.ext.UrlRewriteMatchDescriptor.operation()

  }

  @Override
  public void initialize( UrlRewriteEnvironment environment, UrlRewriteRuleDescriptor descriptor ) throws Exception {
    UrlRewriteMatchDescriptor matchDescriptor = new UrlRewriteMatchDescriptorExt();
    matchDescriptor.operation( "matches" );
    matchDescriptor.flow( descriptor.flow() );
    matchDescriptor.template( descriptor.template() );
    matchProcessor = new UrlRewriteMatchProcessorExt();
    matchProcessor.initialize( environment, matchDescriptor );
  }
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.