org.tinyjee.maven.dim.spi
Interface RequestParameterTransformer

All Known Implementing Classes:
AbstractAliasHandler, AbstractParameterTransformer, DirectoryLoader.AliasHandler, InlineCssParameterTransformer, InlineScriptParameterTransformer, InterfaceScanner.AliasHandler, JavaSourceLoader.AliasHandler, MacroPresetParameterTransformer, MessageBoxParameterTransformer, PropertiesLoader.AliasHandler, ScriptInvoker.AliasHandler, SvgLoader.AliasHandler, TabbedPanelParameterTransformer, TableLayoutParameterTransformer, XmlLoader.AliasHandler

public interface RequestParameterTransformer

RequestParameterTransformer defines an interface that may be implemented and registered via service loading to plug parameter transformers that adjust macro parameters on the fly before any other operation is triggered.

Implementation:

 package my.package;
 public class MyRequestParameterTransformer implements RequestParameterTransformer {
      public void transformParameters(Map<String, Object> requestParams) {
          Object value = requestParams.get("my-input-param");
          if (value != null) {
              requestParams.put("myText", value);
              requestParams.put("source", "classpath:my-template.vm");
          }
      }
 }
 

Register the implementation using service loading:

Since:
1.0
Version:
1.1
Author:
Juergen_Kellerer, 2010-09-08

Field Summary
static Iterable<RequestParameterTransformer> TRANSFORMERS
          Is an iterable over all transformers within the classpath.
 
Method Summary
 void transformParameters(Map<String,Object> requestParams)
          Transforms the specified request parameters.
 

Field Detail

TRANSFORMERS

static final Iterable<RequestParameterTransformer> TRANSFORMERS
Is an iterable over all transformers within the classpath.

Method Detail

transformParameters

void transformParameters(Map<String,Object> requestParams)
Transforms the specified request parameters.

Parameters:
requestParams - the request params to modify.