Class Markdown4jHtmlProducer

java.lang.Object
com.reallifedeveloper.common.infrastructure.Markdown4jHtmlProducer
All Implemented Interfaces:
HtmlProducer

public final class Markdown4jHtmlProducer extends Object implements HtmlProducer
An implementation of HtmlProducer that converts Markdown documents to HTML using Markdown4j.
Author:
RealLifeDeveloper
  • Constructor Details

    • Markdown4jHtmlProducer

      public Markdown4jHtmlProducer()
  • Method Details

    • produce

      public String produce(String resourceName) throws IOException
      Description copied from interface: HtmlProducer
      Produces HTML from the named resource on classpath.
      Specified by:
      produce in interface HtmlProducer
      Parameters:
      resourceName - the name of the resource to convert to HTML
      Returns:
      the HTML produced
      Throws:
      IOException - if converting the resource failed
    • canHandle

      public boolean canHandle(String resourceName)
      Description copied from interface: HtmlProducer
      Shows if this HtmlProducer can handle the given resource or not.
      Specified by:
      canHandle in interface HtmlProducer
      Parameters:
      resourceName - the name of the resource to check
      Returns:
      true if the resource can be handled, false otherwise