public class DocumentationContextHandlerFactory extends Object implements ContextHandlerFactory
ContextHandlerFactory that creates a context
located at /docs if the necessary elements are
available in the provided environment.| Constructor and Description |
|---|
DocumentationContextHandlerFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
containsDocumentation(Path docsRoot)
Checks if the documentation root path contains actual
documentation.
|
org.eclipse.jetty.server.handler.ContextHandler |
createContextHandler(com.fredhopper.environment.Environment environment)
Creates an instance of
ContextHandler using the
provided Environment. |
protected org.eclipse.jetty.server.handler.ContextHandler |
createDocumentationContext(Path docsRoot)
Creates a
ContextHandler with
ResourceHandler using the root of documentation. |
public org.eclipse.jetty.server.handler.ContextHandler createContextHandler(com.fredhopper.environment.Environment environment)
ContextHandlerFactoryContextHandler using the
provided Environment.createContextHandler in interface ContextHandlerFactoryenvironment - the environment of the embedded serverContextHandler or
null of no context can be created.protected org.eclipse.jetty.server.handler.ContextHandler createDocumentationContext(Path docsRoot)
ContextHandler with
ResourceHandler using the root of documentation.docsRoot - the path to the documentation rootContextHandlerprotected boolean containsDocumentation(Path docsRoot)
docsRoot - the documentation root pathtrue if the documentation default
index.html is readable in the
documentation root path; otherwise
falseCopyright © 2015 SDL Fredhopper. All rights reserved.