Package org.concordion.internal
Class ConcordionBuilder
java.lang.Object
org.concordion.internal.ConcordionBuilder
- All Implemented Interfaces:
ConcordionExtender
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
build
(boolean fullBuild) static File
withAssertEqualsListener
(AssertEqualsListener listener) Adds a listener toconcordion:assertEquals
commands.withAssertFalseListener
(AssertFalseListener listener) Adds a listener toconcordion:assertFalse
commands.withAssertTrueListener
(AssertTrueListener listener) Adds a listener toconcordion:assertTrue
commands.withBreadcrumbRenderer
(BreadcrumbRenderer breadcrumbRenderer) Overrides the listener for rendering bread crumbs.withBuildListener
(ConcordionBuildListener listener) Adds a listener that is invoked when a Concordion instance is built, providing access to theTarget
to which resources can be written.withCommand
(String namespaceURI, String commandName, Command command) Adds a command to Concordion.Adds a listener that is invoked when Concordion parses the specification document, providing access to the parsed document.withEmbeddedCSS
(String css) Embeds the given CSS in the Concordion output.withEmbeddedCSS
(String css, boolean append) Embeds the given CSS in the Concordion output.withEmbeddedJavaScript
(String javaScript) Embeds the given JavaScript in the Concordion output.withEvaluatorFactory
(EvaluatorFactory evaluatorFactory) withExampleListener
(ExampleListener listener) Adds a listener that is invoked before and after Concordion has processed the example, providing access to the example node.withExecuteListener
(ExecuteListener listener) Adds a listener toconcordion:execute
commands.withFailFast
(Class<? extends Throwable>[] failFastExceptions) withFixture
(Fixture fixture) withFixtureType
(FixtureType fixtureType) withImplementationStatusModifier
(ImplementationStatusModifier statusModifier) Adds a status modifier which Concordion can apply to each specification example to override their status.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.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.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).withPageFooterRenderer
(SpecificationProcessingListener pageFooterRenderer) withResource
(String sourcePath, Resource targetResource) Copies a resource to the Concordion output.withRunListener
(RunListener listener) Adds a listener toconcordion:run
commands.withRunnerFactory
(RunnerFactory runnerFactory) withRunStrategy
(RunStrategy runStrategy) Sets the strategy for theRunCommand
.withSetListener
(SetListener setListener) Adds a listener toconcordion:set
commands.withSource
(Source source) Overrides the source that the Concordion specifications are read from.withSource
(Source source, SourceType sourceType) withSpecificationLocator
(SpecificationLocator specificationLocator) Overrides the locator for Concordion specifications.Adds a listener that is invoked before and after Concordion has processed the specification, providing access to the specification resource and root element.withSpecificationType
(String typeSuffix, SpecificationConverter converter) Adds a new specification type to the types that can be handled (by default HTML and Markdown are supported).withTarget
(Target target) Overrides the target that the Concordion specifications are written to.withThrowableListener
(ThrowableCaughtListener throwableListener) Adds a listener that is invoked when an uncaughtThrowable
is thrown by a command, including commands that have been added usingConcordionExtender.withCommand(String, String, Command)
.withVerifyRowsListener
(VerifyRowsListener listener) Adds a listener toconcordion:verifyRows
commands.
-
Field Details
-
NAMESPACE_CONCORDION_2007
- See Also:
-
-
Constructor Details
-
ConcordionBuilder
public ConcordionBuilder()
-
-
Method Details
-
withSource
Description copied from interface:ConcordionExtender
Overrides the source that the Concordion specifications are read from.- Specified by:
withSource
in interfaceConcordionExtender
- Parameters:
source
- the new source- Returns:
- this
-
withSource
-
withTarget
Description copied from interface:ConcordionExtender
Overrides the target that the Concordion specifications are written to.- Specified by:
withTarget
in interfaceConcordionExtender
- Parameters:
target
- the new target- Returns:
- this
-
withBreadcrumbRenderer
Description copied from interface:ConcordionExtender
Overrides the listener for rendering bread crumbs.- Specified by:
withBreadcrumbRenderer
in interfaceConcordionExtender
- Parameters:
breadcrumbRenderer
- the new bread crumb renderer- Returns:
- this
-
withRunnerFactory
-
withSpecificationLocator
Description copied from interface:ConcordionExtender
Overrides the locator for Concordion specifications.- Specified by:
withSpecificationLocator
in interfaceConcordionExtender
- Parameters:
specificationLocator
- the new specification locator- Returns:
- this
-
withEvaluatorFactory
-
withThrowableListener
Description copied from interface:ConcordionExtender
Adds a listener that is invoked when an uncaughtThrowable
is thrown by a command, including commands that have been added usingConcordionExtender.withCommand(String, String, Command)
.- Specified by:
withThrowableListener
in interfaceConcordionExtender
- Parameters:
throwableListener
- the listener- Returns:
- this
-
withAssertEqualsListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:assertEquals
commands.- Specified by:
withAssertEqualsListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withAssertTrueListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:assertTrue
commands.- Specified by:
withAssertTrueListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withAssertFalseListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:assertFalse
commands.- Specified by:
withAssertFalseListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withVerifyRowsListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:verifyRows
commands.- Specified by:
withVerifyRowsListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withRunListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:run
commands.- Specified by:
withRunListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withRunStrategy
Description copied from interface:ConcordionExtender
Sets the strategy for theRunCommand
.- Specified by:
withRunStrategy
in interfaceConcordionExtender
- Parameters:
runStrategy
- the new strategy for running the specifications- Returns:
- this
-
withExecuteListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:execute
commands.- Specified by:
withExecuteListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withSetListener
Description copied from interface:ConcordionExtender
Adds a listener toconcordion:set
commands.- Specified by:
withSetListener
in interfaceConcordionExtender
- Parameters:
setListener
- the listener- Returns:
- this
-
withDocumentParsingListener
Description copied from interface:ConcordionExtender
Adds a listener that is invoked when Concordion parses the specification document, providing access to the parsed document.- Specified by:
withDocumentParsingListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withSpecificationProcessingListener
public ConcordionBuilder withSpecificationProcessingListener(SpecificationProcessingListener listener) Description copied from interface:ConcordionExtender
Adds a listener that is invoked before and after Concordion has processed the specification, providing access to the specification resource and root element.- Specified by:
withSpecificationProcessingListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withBuildListener
Description copied from interface:ConcordionExtender
Adds a listener that is invoked when a Concordion instance is built, providing access to theTarget
to which resources can be written.- Specified by:
withBuildListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withCommand
Description copied from interface:ConcordionExtender
Adds a command to Concordion.- Specified by:
withCommand
in interfaceConcordionExtender
- Parameters:
namespaceURI
- the URI to be used for the namespace of the command. Must not beconcordion.org
.commandName
- the name to be used for the command. The fully qualified name composed of thenamespaceURI
andcommandName
must be used to reference the command in the Concordion specification.command
- the command to be executed- Returns:
- this
-
withResource
Description copied from interface:ConcordionExtender
Copies a resource to the Concordion output.- Specified by:
withResource
in interfaceConcordionExtender
- Parameters:
sourcePath
- Storage PathtargetResource
- Target Resource- Returns:
- this
-
withEmbeddedCSS
Description copied from interface:ConcordionExtender
Embeds the given CSS in the Concordion output.- Specified by:
withEmbeddedCSS
in interfaceConcordionExtender
- Parameters:
css
- CSS- Returns:
- this
-
withEmbeddedCSS
Description copied from interface:ConcordionExtender
Embeds the given CSS in the Concordion output.- Specified by:
withEmbeddedCSS
in interfaceConcordionExtender
- Parameters:
css
- CSSappend
- if true appends as last element in head section, else inserts as first element- Returns:
- this
-
withLinkedCSS
Description copied from interface:ConcordionExtender
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.- Specified by:
withLinkedCSS
in interfaceConcordionExtender
- Parameters:
cssPath
- CSS PathtargetResource
- Target Resource- Returns:
- this
-
withEmbeddedJavaScript
Description copied from interface:ConcordionExtender
Embeds the given JavaScript in the Concordion output.- Specified by:
withEmbeddedJavaScript
in interfaceConcordionExtender
- Parameters:
javaScript
- javaScript- Returns:
- this
-
withLinkedJavaScript
Description copied from interface:ConcordionExtender
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.- Specified by:
withLinkedJavaScript
in interfaceConcordionExtender
- Parameters:
jsPath
- path to javascripttargetResource
- target resource- Returns:
- this
-
build
- Throws:
UnableToBuildConcordionException
-
build
- Throws:
UnableToBuildConcordionException
-
getBaseOutputDir
-
withFailFast
-
withFixtureType
-
withFixture
-
withExampleListener
Description copied from interface:ConcordionExtender
Adds a listener that is invoked before and after Concordion has processed the example, providing access to the example node.- Specified by:
withExampleListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withImplementationStatusModifier
public ConcordionExtender withImplementationStatusModifier(ImplementationStatusModifier statusModifier) Description copied from interface:ConcordionExtender
Adds a status modifier which Concordion can apply to each specification example to override their status.- Specified by:
withImplementationStatusModifier
in interfaceConcordionExtender
- Parameters:
statusModifier
- the status modifier- Returns:
- this
-
withOuterExampleListener
Description copied from interface:ConcordionExtender
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).- Specified by:
withOuterExampleListener
in interfaceConcordionExtender
- Parameters:
listener
- the listener- Returns:
- this
-
withSpecificationType
Description copied from interface:ConcordionExtender
Adds a new specification type to the types that can be handled (by default HTML and Markdown are supported).- Specified by:
withSpecificationType
in interfaceConcordionExtender
- Parameters:
typeSuffix
- the suffix of the file type to map this toconverter
- converts the specification to HTML format- Returns:
- this
-