Package eu.europa.ted.efx.interfaces
Interface MarkupGenerator
-
public interface MarkupGeneratorThe role of this interface is to allow the reuse of the Sdk6EfxTemplateTranslator to generate markup for any target template language, The methods provided by this interface cover two needs: a) Take anExpressionas a parameter and generate the target template markup necessary for rendering it; and b) Take multipleMarkupobjects already generated by other method calls and generate the markup to properly combine them in the target template.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MarkupcomposeFragmentDefinition(String name, String number, Markup content)Given a fragment name (identifier) and some pre-rendered content, this method returns the code that encapsulates it in the target template.MarkupcomposeOutputFile(List<Markup> content, List<Markup> fragments)Given a body (main content) and a set of fragments, this method returns the full content of the target template file.MarkuprenderFragmentInvocation(String name, Expression.PathExpression context)Given a fragment name (identifier), and an evaluation context, this method returns the code that invokes (uses) the fragment.MarkuprenderFreeText(String freeText)Given a string of free text, this method returns the template code that adds this text in the target template.MarkuprenderLabelFromExpression(Expression expression)Given an expression (which will eventually, at runtime, be evaluated to a label key and subsequently dereferenced to a label text), this method returns the template code that renders this label in the target template language.MarkuprenderLabelFromKey(Expression.StringExpression key)Given a label key (which will eventually, at runtime, be dereferenced to a label text), this method returns the template code that renders this label in the target template language.MarkuprenderVariableExpression(Expression variableExpression)Given an expression (which will eventually, at runtime, evaluate to the value of a field), this method returns the template code that dereferences it (retrieves the value) in the target template.
-
-
-
Method Detail
-
composeOutputFile
Markup composeOutputFile(List<Markup> content, List<Markup> fragments)
Given a body (main content) and a set of fragments, this method returns the full content of the target template file.
-
renderVariableExpression
Markup renderVariableExpression(Expression variableExpression)
Given an expression (which will eventually, at runtime, evaluate to the value of a field), this method returns the template code that dereferences it (retrieves the value) in the target template.
-
renderLabelFromKey
Markup renderLabelFromKey(Expression.StringExpression key)
Given a label key (which will eventually, at runtime, be dereferenced to a label text), this method returns the template code that renders this label in the target template language.
-
renderLabelFromExpression
Markup renderLabelFromExpression(Expression expression)
Given an expression (which will eventually, at runtime, be evaluated to a label key and subsequently dereferenced to a label text), this method returns the template code that renders this label in the target template language.
-
renderFreeText
Markup renderFreeText(String freeText)
Given a string of free text, this method returns the template code that adds this text in the target template.
-
composeFragmentDefinition
Markup composeFragmentDefinition(String name, String number, Markup content)
Given a fragment name (identifier) and some pre-rendered content, this method returns the code that encapsulates it in the target template.
-
renderFragmentInvocation
Markup renderFragmentInvocation(String name, Expression.PathExpression context)
Given a fragment name (identifier), and an evaluation context, this method returns the code that invokes (uses) the fragment.
-
-