Class SvgShapesRenderer

java.lang.Object
com.hybris.backoffice.workflow.designer.renderer.SvgShapesRenderer

public class SvgShapesRenderer extends Object
Resolves svg shapes stored as velocity templates
  • Field Details

  • Constructor Details

    • SvgShapesRenderer

      public SvgShapesRenderer()
  • Method Details

    • getSvgShape

      public String getSvgShape(String shapeResource, String shapeResourceIeFallback, Map<String,Object> ctx)
      Resolves svg shapes stored as velocity templates and returns their parsed representation. Moreover, it takes an extra argument for particular svg shape resource prepared for Internet Explorer and takes the proper resource depending which browser is being used.
      Parameters:
      shapeResource - path to the resource containing svg shape in velocity template
      shapeResourceIeFallback - path to the resource containing svg shape in velocity template with svg elements supported by Internet Explorer
      ctx - with additional information necessary for parsing svg shape
      Returns:
      parsed svg shape
    • getSvgShape

      public String getSvgShape(String shapeResource, Map<String,Object> ctx)
      Resolves svg shapes stored as velocity templates and returns their parsed representation
      Parameters:
      shapeResource - path to the resource containing svg shape in velocity template
      ctx - with additional information necessary for parsing svg shape
      Returns:
      parsed svg shape
    • resolveResource

      protected Optional<InputStreamReader> resolveResource(String resourcePath)
    • setVelocityEngine

      public void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)