public final class WuicFacade extends Object
This class is a facade which exposes the WUIC features by simplifying them within some exposed methods.
Modifier and Type | Class and Description |
---|---|
static class |
WuicFacade.WarmupStrategy
This enumeration allows to indicate how the
Context should be initialized when
ContextBuilder.build() is called. |
Modifier and Type | Method and Description |
---|---|
Boolean |
allowsMultipleConfigInTagSupport()
Indicates to view templates if multiple configurations are allowed.
|
void |
clearTag(String tag)
Clears the given tag in the
ContextBuilder . |
void |
configure(Boolean useDefault,
ContextBuilderConfigurator... configurators)
Configures the internal builder with the given configurators.
|
void |
configure(ContextBuilderConfigurator... configurators)
Configures the internal builder with the given configurators.
|
String |
getContextPath()
Returns the context path.
|
ObjectBuilder<NutDao> |
newNutDaoBuilder(String type)
Builds a new
NutDao builder. |
boolean |
refreshContext()
Refresh the context if necessary.
|
List<ConvertibleNut> |
runWorkflow(String id,
ProcessContext processContext,
EngineType... skip)
Gets the nuts processed by the given workflow identified by the specified ID inside a specified context.
|
ConvertibleNut |
runWorkflow(String id,
String path,
ProcessContext processContext,
EngineType... skip)
Gets the nut with the given path processed by the given workflow identified by the specified ID.
|
ConvertibleNut |
runWorkflow(String id,
String path,
UrlProviderFactory urlProviderFactory,
ProcessContext processContext,
EngineType... skip)
Gets the nut with the given path processed by the given workflow identified by the specified ID.
|
List<ConvertibleNut> |
runWorkflow(String id,
UrlProviderFactory urlProviderFactory,
ProcessContext processContext,
EngineType... skip)
Gets the nuts processed by the given workflow identified by the specified ID.
|
Set<String> |
workflowIds()
Returns the workflow IDs.
|
public ObjectBuilder<NutDao> newNutDaoBuilder(String type)
Builds a new NutDao
builder.
type
- the type of DAOpublic void clearTag(String tag)
Clears the given tag in the ContextBuilder
.
tag
- the tag to clearpublic void configure(Boolean useDefault, ContextBuilderConfigurator... configurators) throws WuicException
Configures the internal builder with the given configurators.
useDefault
- injects default configuration for each known engine and DAO type or notconfigurators
- the configuratorsWuicException
- if an I/O error occurs or context can't be builtpublic void configure(ContextBuilderConfigurator... configurators) throws WuicException
Configures the internal builder with the given configurators. By default, injects default configuration for each known engine and DAO type or not
configurators
- the configuratorsWuicException
- if an I/O error occurs or context can't be builtpublic ConvertibleNut runWorkflow(String id, String path, UrlProviderFactory urlProviderFactory, ProcessContext processContext, EngineType... skip) throws WuicException
Gets the nut with the given path processed by the given workflow identified by the specified ID.
The path should be used with the name of one nut returned when invoking
runWorkflow(String, UrlProviderFactory, ProcessContext, com.github.wuic.engine.EngineType...)
.
id
- the workflow IDpath
- the requested path, null
to retrieve all pathsurlProviderFactory
- the URL providerprocessContext
- the process contextskip
- the engine typesWuicException
- if the context can't be processedpublic ConvertibleNut runWorkflow(String id, String path, ProcessContext processContext, EngineType... skip) throws WuicException
Gets the nut with the given path processed by the given workflow identified by the specified ID.
The path should be used with the name of nuts returned when invoking
runWorkflow(String, String, UrlProviderFactory, ProcessContext, EngineType...)
.
id
- the workflow IDpath
- the requested path, null
to retrieve all pathsprocessContext
- the process contextskip
- the engine typesWuicException
- if the context can't be processedpublic List<ConvertibleNut> runWorkflow(String id, UrlProviderFactory urlProviderFactory, ProcessContext processContext, EngineType... skip) throws WuicException
Gets the nuts processed by the given workflow identified by the specified ID.
id
- the workflow IDurlProviderFactory
- the URL providerprocessContext
- the process contextskip
- the engine typesWuicException
- if the context can't be processedpublic List<ConvertibleNut> runWorkflow(String id, ProcessContext processContext, EngineType... skip) throws WuicException
Gets the nuts processed by the given workflow identified by the specified ID inside a specified context.
id
- the workflow IDskip
- the engine typesprocessContext
- the process contextWuicException
- if the context can't be processedpublic boolean refreshContext() throws WuicException
Refresh the context if necessary.
true
if the context is re-built,false
otherwiseWuicException
- context can't be builtpublic String getContextPath()
Returns the context path.
public Boolean allowsMultipleConfigInTagSupport()
Indicates to view templates if multiple configurations are allowed.
true
if allowed, false
otherwiseCopyright © 2012-2015. All Rights Reserved.