public class ScriptBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CACHE_SIZE |
static String |
EXTENSION |
static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
ScriptBuilder(int cacheSize,
Model mo)
Make a new builder.
|
ScriptBuilder(Model mo)
Make a new builder with a default cache size.
|
| Modifier and Type | Method and Description |
|---|---|
Script |
build(File f)
Build a script from a file.
|
Script |
build(String description)
Build a script from a String.
|
ConstraintsCatalog |
getConstraintsCatalog()
Get the used catalog of constraints.
|
Includes |
getIncludes()
Get the possibles scripts that can be included
|
NamingService<Node> |
getNamingServiceNodes()
Get the naming service that is used to create Nodes.
|
NamingService<VM> |
getNamingServiceVMs()
Get the naming service that is used to create VMs.
|
TemplateFactory |
getTemplateFactory()
Get the template factory used to instantiate elements
when needed.
|
void |
setConstraintsCatalog(ConstraintsCatalog c)
Set the catalog of constraints to use.
|
void |
setErrorReporterBuilder(ErrorReporterBuilder b)
Indicate the
ErrorReporter to instantiate before parsing
a script. |
void |
setIncludes(Includes incs)
Set the include library.
|
void |
setTemplateFactory(TemplateFactory f)
Set the factory to use to instantiate elements
from template.
|
public static final int DEFAULT_CACHE_SIZE
public static final org.slf4j.Logger LOGGER
public static final String EXTENSION
public ScriptBuilder(Model mo)
mo - the model to rely onpublic ScriptBuilder(int cacheSize,
Model mo)
cacheSize - the size of the cachepublic Includes getIncludes()
public void setIncludes(Includes incs)
incs - the library to addpublic Script build(File f) throws ScriptBuilderException
f - the file to parseScriptBuilderException - if an error occurredpublic Script build(String description) throws ScriptBuilderException
description - the description of the scriptScriptBuilderException - if an error occurred while building the scriptpublic void setErrorReporterBuilder(ErrorReporterBuilder b)
ErrorReporter to instantiate before parsing
a script.b - the builder to usepublic NamingService<VM> getNamingServiceVMs()
public NamingService<Node> getNamingServiceNodes()
public TemplateFactory getTemplateFactory()
public void setTemplateFactory(TemplateFactory f)
f - the factory to usepublic ConstraintsCatalog getConstraintsCatalog()
public void setConstraintsCatalog(ConstraintsCatalog c)
c - the catalog to rely oneCopyright © 2016 University of Nice-Sophia Antipolis. All Rights Reserved.