Package org.concordion.internal
Class ConcordionBuilder
java.lang.Object
org.concordion.internal.ConcordionBuilder
- All Implemented Interfaces:
ConcordionExtender
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()build(boolean fullBuild) static FilewithAssertEqualsListener(AssertEqualsListener listener) Adds a listener toconcordion:assertEqualscommands.withAssertFalseListener(AssertFalseListener listener) Adds a listener toconcordion:assertFalsecommands.withAssertTrueListener(AssertTrueListener listener) Adds a listener toconcordion:assertTruecommands.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 theTargetto 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:executecommands.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:runcommands.withRunnerFactory(RunnerFactory runnerFactory) withRunStrategy(RunStrategy runStrategy) Sets the strategy for theRunCommand.withSetListener(SetListener setListener) Adds a listener toconcordion:setcommands.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 uncaughtThrowableis thrown by a command, including commands that have been added usingConcordionExtender.withCommand(String, String, Command).withVerifyRowsListener(VerifyRowsListener listener) Adds a listener toconcordion:verifyRowscommands.
-
Field Details
-
NAMESPACE_CONCORDION_2007
- See Also:
-
-
Constructor Details
-
ConcordionBuilder
public ConcordionBuilder()
-
-
Method Details
-
withSource
Description copied from interface:ConcordionExtenderOverrides the source that the Concordion specifications are read from.- Specified by:
withSourcein interfaceConcordionExtender- Parameters:
source- the new source- Returns:
- this
-
withSource
-
withTarget
Description copied from interface:ConcordionExtenderOverrides the target that the Concordion specifications are written to.- Specified by:
withTargetin interfaceConcordionExtender- Parameters:
target- the new target- Returns:
- this
-
withBreadcrumbRenderer
Description copied from interface:ConcordionExtenderOverrides the listener for rendering bread crumbs.- Specified by:
withBreadcrumbRendererin interfaceConcordionExtender- Parameters:
breadcrumbRenderer- the new bread crumb renderer- Returns:
- this
-
withRunnerFactory
-
withSpecificationLocator
Description copied from interface:ConcordionExtenderOverrides the locator for Concordion specifications.- Specified by:
withSpecificationLocatorin interfaceConcordionExtender- Parameters:
specificationLocator- the new specification locator- Returns:
- this
-
withEvaluatorFactory
-
withThrowableListener
Description copied from interface:ConcordionExtenderAdds a listener that is invoked when an uncaughtThrowableis thrown by a command, including commands that have been added usingConcordionExtender.withCommand(String, String, Command).- Specified by:
withThrowableListenerin interfaceConcordionExtender- Parameters:
throwableListener- the listener- Returns:
- this
-
withAssertEqualsListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:assertEqualscommands.- Specified by:
withAssertEqualsListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withAssertTrueListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:assertTruecommands.- Specified by:
withAssertTrueListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withAssertFalseListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:assertFalsecommands.- Specified by:
withAssertFalseListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withVerifyRowsListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:verifyRowscommands.- Specified by:
withVerifyRowsListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withRunListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:runcommands.- Specified by:
withRunListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withRunStrategy
Description copied from interface:ConcordionExtenderSets the strategy for theRunCommand.- Specified by:
withRunStrategyin interfaceConcordionExtender- Parameters:
runStrategy- the new strategy for running the specifications- Returns:
- this
-
withExecuteListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:executecommands.- Specified by:
withExecuteListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withSetListener
Description copied from interface:ConcordionExtenderAdds a listener toconcordion:setcommands.- Specified by:
withSetListenerin interfaceConcordionExtender- Parameters:
setListener- the listener- Returns:
- this
-
withDocumentParsingListener
Description copied from interface:ConcordionExtenderAdds a listener that is invoked when Concordion parses the specification document, providing access to the parsed document.- Specified by:
withDocumentParsingListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withSpecificationProcessingListener
public ConcordionBuilder withSpecificationProcessingListener(SpecificationProcessingListener listener) Description copied from interface:ConcordionExtenderAdds a listener that is invoked before and after Concordion has processed the specification, providing access to the specification resource and root element.- Specified by:
withSpecificationProcessingListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withBuildListener
Description copied from interface:ConcordionExtenderAdds a listener that is invoked when a Concordion instance is built, providing access to theTargetto which resources can be written.- Specified by:
withBuildListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withCommand
Description copied from interface:ConcordionExtenderAdds a command to Concordion.- Specified by:
withCommandin 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 thenamespaceURIandcommandNamemust be used to reference the command in the Concordion specification.command- the command to be executed- Returns:
- this
-
withResource
Description copied from interface:ConcordionExtenderCopies a resource to the Concordion output.- Specified by:
withResourcein interfaceConcordionExtender- Parameters:
sourcePath- Storage PathtargetResource- Target Resource- Returns:
- this
-
withEmbeddedCSS
Description copied from interface:ConcordionExtenderEmbeds the given CSS in the Concordion output.- Specified by:
withEmbeddedCSSin interfaceConcordionExtender- Parameters:
css- CSS- Returns:
- this
-
withEmbeddedCSS
Description copied from interface:ConcordionExtenderEmbeds the given CSS in the Concordion output.- Specified by:
withEmbeddedCSSin 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:ConcordionExtenderCopies 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:
withLinkedCSSin interfaceConcordionExtender- Parameters:
cssPath- CSS PathtargetResource- Target Resource- Returns:
- this
-
withEmbeddedJavaScript
Description copied from interface:ConcordionExtenderEmbeds the given JavaScript in the Concordion output.- Specified by:
withEmbeddedJavaScriptin interfaceConcordionExtender- Parameters:
javaScript- javaScript- Returns:
- this
-
withLinkedJavaScript
Description copied from interface:ConcordionExtenderCopies 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:
withLinkedJavaScriptin 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:ConcordionExtenderAdds a listener that is invoked before and after Concordion has processed the example, providing access to the example node.- Specified by:
withExampleListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withImplementationStatusModifier
public ConcordionExtender withImplementationStatusModifier(ImplementationStatusModifier statusModifier) Description copied from interface:ConcordionExtenderAdds a status modifier which Concordion can apply to each specification example to override their status.- Specified by:
withImplementationStatusModifierin interfaceConcordionExtender- Parameters:
statusModifier- the status modifier- Returns:
- this
-
withOuterExampleListener
Description copied from interface:ConcordionExtenderAdds 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:
withOuterExampleListenerin interfaceConcordionExtender- Parameters:
listener- the listener- Returns:
- this
-
withSpecificationType
Description copied from interface:ConcordionExtenderAdds a new specification type to the types that can be handled (by default HTML and Markdown are supported).- Specified by:
withSpecificationTypein interfaceConcordionExtender- Parameters:
typeSuffix- the suffix of the file type to map this toconverter- converts the specification to HTML format- Returns:
- this
-