org.tinyjee.maven.dim.extensions
Class InlineCssParameterTransformer

java.lang.Object
  extended by org.tinyjee.maven.dim.extensions.AbstractParameterTransformer
      extended by org.tinyjee.maven.dim.extensions.InlineCssParameterTransformer
All Implemented Interfaces:
RequestParameterTransformer

public class InlineCssParameterTransformer
extends AbstractParameterTransformer

This extension adds an inline CSS definition to the current page. Use this extension to define short-lived style classes or adjust existing styles for just one page.

Author:
Juergen_Kellerer, 2011-11-06

Field Summary
static String PARAM_INLINE_CSS
          Enables this extension and sets the content to place inside the inlined "<style>" element.
 
Fields inherited from interface org.tinyjee.maven.dim.spi.RequestParameterTransformer
TRANSFORMERS
 
Constructor Summary
InlineCssParameterTransformer()
           
 
Method Summary
protected  boolean doTransformParameters(Map<String,Object> requestParams)
           
 
Methods inherited from class org.tinyjee.maven.dim.extensions.AbstractParameterTransformer
isSourceSet, transformParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_INLINE_CSS

public static final String PARAM_INLINE_CSS
Enables this extension and sets the content to place inside the inlined "<style>" element.

Note: Setting this property has no effect in case of "source" or "source-class" were specified with the macro call. This behaviour ensures that the parameter "inline-css" can still be used with ordinary macro calls where a source or source-class was set.

Using this parameter has no effect when the used Sink does not support HTML markup.

This parameter supports the usage of "classpath:/path/to/css/to/inline" to load the css from the classpath instead of defining it with the macro call.

As the default brace style of "{}" is used to call macros in APT, the extension supports substituting the default CSS braces with "[]". This brace style is optional but it must be used when more than one style class is defined with the macro call as the APT parser swallows the "}" character, leading to invalid results.

Examples:

See Also:
Constant Field Values
Constructor Detail

InlineCssParameterTransformer

public InlineCssParameterTransformer()
Method Detail

doTransformParameters

protected boolean doTransformParameters(Map<String,Object> requestParams)
Specified by:
doTransformParameters in class AbstractParameterTransformer