Java Examples for org.thymeleaf.standard.inline.StandardTextInliner

The following java examples will help you to understand the usage of org.thymeleaf.standard.inline.StandardTextInliner. These source code samples are taken from different open source projects.

Example 1
Project: thymeleaf-master  File: StandardInlineHTMLTagProcessor.java View source code
@Override
protected IInliner getInliner(final ITemplateContext context, final StandardInlineMode inlineMode) {
    switch(inlineMode) {
        case NONE:
            return NoOpInliner.INSTANCE;
        case HTML:
            return new StandardHTMLInliner(context.getConfiguration());
        case TEXT:
            return new StandardTextInliner(context.getConfiguration());
        case JAVASCRIPT:
            return new StandardJavaScriptInliner(context.getConfiguration());
        case CSS:
            return new StandardCSSInliner(context.getConfiguration());
        default:
            throw new TemplateProcessingException("Invalid inline mode selected: " + inlineMode + ". Allowed inline modes in template mode " + getTemplateMode() + " are: " + "\"" + StandardInlineMode.HTML + "\", \"" + StandardInlineMode.TEXT + "\", " + "\"" + StandardInlineMode.JAVASCRIPT + "\", \"" + StandardInlineMode.CSS + "\" and " + "\"" + StandardInlineMode.NONE + "\"");
    }
}