rewrite-impl-servlet 1.0.4.Final

org.ocpsoft.rewrite.servlet.config
Class EncodeQuery

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.config.EncodeQuery
All Implemented Interfaces:
ConfigurationElement, Operation

public class EncodeQuery
extends Object
implements Operation

Encodes any or many query-parameters into a single parameter using the given ChecksumStrategy and EncodingStrategy.

Author:
Lincoln Baxter, III

Method Summary
 EncodeQuery excluding(String... params)
          Exclude the given query-parameter names from encoding.
 DefaultOperationBuilder onChecksumFailure(Operation operation)
          Operation to be performed when the current ChecksumStrategy detects an inbound checksum failure.
static EncodeQuery params(String... params)
          Create a new EncodeQuery Operation for the given query-parameter names.
 void perform(Rewrite event, EvaluationContext context)
           
 EncodeQuery to(String param)
          The name of the composite query-parameter to hold the encoded parameters.
 EncodeQuery withChecksumStrategy(ChecksumStrategy strategy)
          Use the given ChecksumStrategy when calculating and embedding checksums.
 EncodeQuery withEncodingStrategy(EncodingStrategy strategy)
          Use the given EncodingStrategy when performing encoding.
 EncodeQuery withInboundCorrection(boolean enable)
          Redirect inbound requests to URLs containing matching query-parameters to the encoded URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

params

public static EncodeQuery params(String... params)
Create a new EncodeQuery Operation for the given query-parameter names. Only encode those given parameters. If no parameter names are supplied, this will encode all query-parameters found in the URL.


excluding

public EncodeQuery excluding(String... params)
Exclude the given query-parameter names from encoding.


withEncodingStrategy

public EncodeQuery withEncodingStrategy(EncodingStrategy strategy)
Use the given EncodingStrategy when performing encoding.


withChecksumStrategy

public EncodeQuery withChecksumStrategy(ChecksumStrategy strategy)
Use the given ChecksumStrategy when calculating and embedding checksums.


withInboundCorrection

public EncodeQuery withInboundCorrection(boolean enable)
Redirect inbound requests to URLs containing matching query-parameters to the encoded URL.


onChecksumFailure

public DefaultOperationBuilder onChecksumFailure(Operation operation)
Operation to be performed when the current ChecksumStrategy detects an inbound checksum failure.


to

public EncodeQuery to(String param)
The name of the composite query-parameter to hold the encoded parameters.


perform

public void perform(Rewrite event,
                    EvaluationContext context)
Specified by:
perform in interface Operation

rewrite-impl-servlet 1.0.4.Final

Copyright © 2012 OCPsoft. All Rights Reserved.