public class MockTemplateFactory extends Object implements TemplateFactory
| Constructor and Description |
|---|
MockTemplateFactory(Model m)
Make a new factory that is not strict.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(Script scr,
String tplName,
Element e,
Map<String,String> attrs)
Build an element.
|
Set<String> |
getAvailables()
Get the available templates.
|
boolean |
isAvailable(String id)
Test if a template is available.
|
Template |
register(Template tpl)
Register a template.
|
public MockTemplateFactory(Model m)
m - the model to rely onpublic Set<String> getAvailables()
TemplateFactorygetAvailables in interface TemplateFactorypublic boolean isAvailable(String id)
TemplateFactoryisAvailable in interface TemplateFactoryid - the template identifiertrue iff the template is availablepublic void check(Script scr, String tplName, Element e, Map<String,String> attrs) throws ElementBuilderException
TemplateFactorycheck in interface TemplateFactoryscr - the script the element belongs to.tplName - the template name for the elemente - the element associated to the templateattrs - the attributes related to the element. @return the built element if succeedElementBuilderException - if an error occurredpublic Template register(Template tpl)
TemplateFactoryregister in interface TemplateFactorytpl - the template to registertpl.Copyright © 2016 University of Nice-Sophia Antipolis. All Rights Reserved.