/** * {@inheritDoc} * * @see org.xwiki.rendering.transformation.TransformationManager#performTransformations(org.xwiki.rendering.block.XDOM, * org.xwiki.rendering.syntax.Syntax) */ public void performTransformations(XDOM dom, Syntax syntax) throws TransformationException { performTransformations(dom, new TransformationContext(dom, syntax)); }
/** * {@inheritDoc} * * @see org.xwiki.rendering.transformation.TransformationManager#performTransformations(org.xwiki.rendering.block.Block, * org.xwiki.rendering.transformation.TransformationContext) */ public void performTransformations(Block block, TransformationContext context) throws TransformationException { boolean error = false; for (Transformation transformation : this.configuration.getTransformations()) { try { transformation.transform(block, context); } catch (Exception e) { // Continue running the other transformations getLogger().error("Failed to execute transformation", e); error = true; } } if (error) { throw new TransformationException("One or several transformations failed to execute properly. " + "See the logs for details."); } } }