use of com.enonic.xp.portal.postprocess.HtmlTag in project xp by enonic.
the class PostProcessEvaluator method processContributions.
private HtmlBlocks processContributions(final HtmlBlocks htmlBlocks) {
final HtmlBlocks.Builder processedHtmlBlocks = HtmlBlocks.builder();
for (HtmlBlock htmlBlock : htmlBlocks) {
if (isTagMarker(htmlBlock)) {
final HtmlTag htmlTag = ((TagMarker) htmlBlock).getTag();
final StaticHtml injectionHtml = evalPostProcessInjection(htmlTag);
if (injectionHtml != null) {
processedHtmlBlocks.add(injectionHtml);
}
} else {
processedHtmlBlocks.add(htmlBlock);
}
}
return processedHtmlBlocks.build();
}
use of com.enonic.xp.portal.postprocess.HtmlTag in project xp by enonic.
the class PortalResponseMapper method serializePageContributions.
private void serializePageContributions(final MapGenerator gen) {
gen.map("pageContributions");
for (final HtmlTag tag : HtmlTag.values()) {
final ImmutableList<String> contributions = response.getContributions(tag);
if (contributions.isEmpty()) {
continue;
}
gen.array(tag.id());
contributions.forEach(gen::value);
gen.end();
}
gen.end();
}
Aggregations