public class Context extends Object implements Observer
The context is the core element of WUIC which allows to process nuts inside workflow.
It is built thank to a ContextBuilder
and is linked to it during it life cycles to know if the context is
up to date regarding configuration changes since it has been built.
Modifier and Type | Method and Description |
---|---|
Workflow |
getWorkflow(String workflowId)
Returns the workflow associated to the given ID.
|
Boolean |
isUpToDate()
Indicates if this context is up to date regarding the changes performed on the builder that built it.
|
ConvertibleNut |
process(String contextPath,
String wId,
String path,
UrlProviderFactory urlProviderFactory,
ProcessContext processContext,
EngineType... skip)
Processes a workflow an returns the nut inside the result with a name that equals to the specified one.
|
List<ConvertibleNut> |
process(String contextPath,
String workflowId,
UrlProviderFactory urlProviderFactory,
ProcessContext processContext,
EngineType... skip)
Processes a workflow and returns the resulting nuts.
|
void |
update(Observable o,
Object arg) |
Set<String> |
workflowIds()
Returns the workflow IDs.
|
public List<ConvertibleNut> process(String contextPath, String workflowId, UrlProviderFactory urlProviderFactory, ProcessContext processContext, EngineType... skip) throws WuicException
Processes a workflow and returns the resulting nuts. If no workflow is associated to the given ID, then an exception will be thrown.
workflowId
- the workflow IDcontextPath
- the context path where nuts will be referencedurlProviderFactory
- the UrlProviderFactory
processContext
- the process contextskip
- the skipped enginesWuicException
- if any exception related to WUIC occurspublic ConvertibleNut process(String contextPath, String wId, String path, UrlProviderFactory urlProviderFactory, ProcessContext processContext, EngineType... skip) throws WuicException, IOException
Processes a workflow an returns the nut inside the result with a name that equals to the specified one.
skip
- the skipped engine typescontextPath
- the context path where nuts will be referencedwId
- the workflow IDpath
- the nut nameurlProviderFactory
- the URL providerprocessContext
- the process contextWuicException
- if workflow fails to be processedIOException
- if any I/O error occurspublic Boolean isUpToDate()
Indicates if this context is up to date regarding the changes performed on the builder that built it.
true
if this context is up to date, false
if the builder has been modified since the
context has been generatedpublic Workflow getWorkflow(String workflowId) throws WorkflowNotFoundException
Returns the workflow associated to the given ID.
workflowId
- the IDWorkflowNotFoundException
- if no workflow is associated to the ID.public void update(Observable o, Object arg)
Copyright © 2012-2015. All Rights Reserved.