Interface ConcordionExtender

All Known Implementing Classes:
ConcordionBuilder

public interface ConcordionExtender
Allows ConcordionExtensions to add features to Concordion.
  • Method Details

    • withCommand

      ConcordionExtender withCommand(String namespaceURI, String commandName, Command command)
      Adds a command to Concordion.
      Parameters:
      namespaceURI - the URI to be used for the namespace of the command. Must not be concordion.org.
      commandName - the name to be used for the command. The fully qualified name composed of the namespaceURI and commandName must be used to reference the command in the Concordion specification.
      command - the command to be executed
      Returns:
      this
    • withAssertEqualsListener

      ConcordionExtender withAssertEqualsListener(AssertEqualsListener listener)
      Adds a listener to concordion:assertEquals commands.
      Parameters:
      listener - the listener
      Returns:
      this
    • withAssertTrueListener

      ConcordionExtender withAssertTrueListener(AssertTrueListener listener)
      Adds a listener to concordion:assertTrue commands.
      Parameters:
      listener - the listener
      Returns:
      this
    • withAssertFalseListener

      ConcordionExtender withAssertFalseListener(AssertFalseListener listener)
      Adds a listener to concordion:assertFalse commands.
      Parameters:
      listener - the listener
      Returns:
      this
    • withExecuteListener

      ConcordionExtender withExecuteListener(ExecuteListener executeListener)
      Adds a listener to concordion:execute commands.
      Parameters:
      executeListener - the listener
      Returns:
      this
    • withSetListener

      ConcordionExtender withSetListener(SetListener setListener)
      Adds a listener to concordion:set commands.
      Parameters:
      setListener - the listener
      Returns:
      this
    • withRunListener

      ConcordionExtender withRunListener(RunListener listener)
      Adds a listener to concordion:run commands.
      Parameters:
      listener - the listener
      Returns:
      this
    • withVerifyRowsListener

      ConcordionExtender withVerifyRowsListener(VerifyRowsListener listener)
      Adds a listener to concordion:verifyRows commands.
      Parameters:
      listener - the listener
      Returns:
      this
    • withThrowableListener

      ConcordionExtender withThrowableListener(ThrowableCaughtListener throwableListener)
      Adds a listener that is invoked when an uncaught Throwable is thrown by a command, including commands that have been added using withCommand(String, String, Command).
      Parameters:
      throwableListener - the listener
      Returns:
      this
    • withDocumentParsingListener

      ConcordionExtender withDocumentParsingListener(DocumentParsingListener listener)
      Adds a listener that is invoked when Concordion parses the specification document, providing access to the parsed document.
      Parameters:
      listener - the listener
      Returns:
      this
    • withSpecificationProcessingListener

      ConcordionExtender withSpecificationProcessingListener(SpecificationProcessingListener listener)
      Adds a listener that is invoked before and after Concordion has processed the specification, providing access to the specification resource and root element.
      Parameters:
      listener - the listener
      Returns:
      this
    • withExampleListener

      ConcordionExtender withExampleListener(ExampleListener listener)
      Adds a listener that is invoked before and after Concordion has processed the example, providing access to the example node.
      Parameters:
      listener - the listener
      Returns:
      this
    • withImplementationStatusModifier

      ConcordionExtender withImplementationStatusModifier(ImplementationStatusModifier statusModifier)
      Adds a status modifier which Concordion can apply to each specification example to override their status.
      Parameters:
      statusModifier - the status modifier
      Returns:
      this
    • withOuterExampleListener

      ConcordionExtender withOuterExampleListener(OuterExampleListener listener)
      Adds a listener that is invoked before and after Concordion has processed the "outer" example (which includes all commands in a specification not inside an example command).
      Parameters:
      listener - the listener
      Returns:
      this
      Since:
      2.0.2
    • withBuildListener

      ConcordionExtender withBuildListener(ConcordionBuildListener listener)
      Adds a listener that is invoked when a Concordion instance is built, providing access to the Target to which resources can be written.
      Parameters:
      listener - the listener
      Returns:
      this
    • withResource

      ConcordionExtender withResource(String sourcePath, Resource targetResource)
      Copies a resource to the Concordion output.
      Parameters:
      sourcePath - Storage Path
      targetResource - Target Resource
      Returns:
      this
    • withEmbeddedCSS

      ConcordionExtender withEmbeddedCSS(String css)
      Embeds the given CSS in the Concordion output.
      Parameters:
      css - CSS
      Returns:
      this
    • withEmbeddedCSS

      ConcordionExtender withEmbeddedCSS(String css, boolean append)
      Embeds the given CSS in the Concordion output.
      Parameters:
      css - CSS
      append - if true appends as last element in head section, else inserts as first element
      Returns:
      this
    • withLinkedCSS

      ConcordionExtender withLinkedCSS(String cssPath, Resource targetResource)
      Copies the given CSS file to the Concordion output folder, and adds a link to the CSS in the <head> section of the Concordion HTML.
      Parameters:
      cssPath - CSS Path
      targetResource - Target Resource
      Returns:
      this
    • withEmbeddedJavaScript

      ConcordionExtender withEmbeddedJavaScript(String javaScript)
      Embeds the given JavaScript in the Concordion output.
      Parameters:
      javaScript - javaScript
      Returns:
      this
    • withLinkedJavaScript

      ConcordionExtender withLinkedJavaScript(String jsPath, Resource targetResource)
      Copies the given JavaScript file to the Concordion output folder, and adds a link to the JavaScript in the <head> section of the Concordion HTML.
      Parameters:
      jsPath - path to javascript
      targetResource - target resource
      Returns:
      this
    • withSource

      ConcordionExtender withSource(Source source)
      Overrides the source that the Concordion specifications are read from.
      Parameters:
      source - the new source
      Returns:
      this
    • withTarget

      ConcordionExtender withTarget(Target target)
      Overrides the target that the Concordion specifications are written to.
      Parameters:
      target - the new target
      Returns:
      this
    • withSpecificationLocator

      ConcordionExtender withSpecificationLocator(SpecificationLocator locator)
      Overrides the locator for Concordion specifications.
      Parameters:
      locator - the new specification locator
      Returns:
      this
    • withRunStrategy

      ConcordionExtender withRunStrategy(RunStrategy runStrategy)
      Sets the strategy for the RunCommand.
      Parameters:
      runStrategy - the new strategy for running the specifications
      Returns:
      this
    • withBreadcrumbRenderer

      ConcordionExtender withBreadcrumbRenderer(BreadcrumbRenderer breadcrumbRenderer)
      Overrides the listener for rendering bread crumbs.
      Parameters:
      breadcrumbRenderer - the new bread crumb renderer
      Returns:
      this
    • withSpecificationType

      ConcordionExtender withSpecificationType(String typeSuffix, SpecificationConverter specificationConverter)
      Adds a new specification type to the types that can be handled (by default HTML and Markdown are supported).
      Parameters:
      typeSuffix - the suffix of the file type to map this to
      specificationConverter - converts the specification to HTML format
      Returns:
      this