public abstract class TemplatingExtension extends Object implements ITemplatingExtension
Modifier and Type | Field and Description |
---|---|
protected String |
abbreviation
The default abbreviation (namespace) to use when referencing specific
custom tags and xpath functions in this platform extension
|
protected String |
extensionId
The extension ID in the form of a java package name.
|
protected ArrayList<DefinedFunction> |
functions
A cache of XPath functions defined in this extension.
|
protected String |
label |
static String |
META_FILE_NAME |
protected String |
provider |
Constructor and Description |
---|
TemplatingExtension(String extensionID)
Constructs an extension with the given ID
|
Modifier and Type | Method and Description |
---|---|
void |
addFunction(DefinedFunction definedFunction) |
protected abstract String |
getConfig() |
ITagHandler |
getCustomTagHandler(String tagName) |
String |
getDefaultAbbreviation() |
protected abstract ClassLoader |
getExtensionClassloader() |
String |
getExtensionId() |
IFileStore |
getFileStore(String fileStoreId)
Returns the IFileStore implementation for the given ID.
|
XPathFunction |
getFunction(String name,
int arity) |
DefinedTag |
getTagDef(String tagName) |
boolean |
hasCustomTagHandler(String tagName) |
Class |
loadClass(String fullyQualifiedName) |
void |
loadMeta() |
void |
setDefaultAbbreviation(String abbreviation) |
void |
setExtensionId(String id) |
protected String extensionId
protected String abbreviation
protected String label
protected String provider
protected ArrayList<DefinedFunction> functions
public static final String META_FILE_NAME
public TemplatingExtension(String extensionID) throws InvalidTemplateExtensionException
extensionID
- InvalidTemplateExtensionException
public void loadMeta() throws InvalidTemplateExtensionException
protected abstract ClassLoader getExtensionClassloader() throws Exception
Exception
public Class loadClass(String fullyQualifiedName) throws ClassNotFoundException, Exception
loadClass
in interface ITemplatingExtension
ClassNotFoundException
Exception
public void addFunction(DefinedFunction definedFunction)
public XPathFunction getFunction(String name, int arity)
getFunction
in interface ITemplatingExtension
public void setDefaultAbbreviation(String abbreviation)
public String getDefaultAbbreviation()
getDefaultAbbreviation
in interface ITemplatingExtension
public void setExtensionId(String id)
public String getExtensionId()
getExtensionId
in interface ITemplatingExtension
public ITagHandler getCustomTagHandler(String tagName) throws NoSuchCustomTagException
getCustomTagHandler
in interface ITemplatingExtension
NoSuchCustomTagException
public DefinedTag getTagDef(String tagName) throws NoSuchCustomTagException
getTagDef
in interface ITemplatingExtension
NoSuchCustomTagException
public boolean hasCustomTagHandler(String tagName)
hasCustomTagHandler
in interface ITemplatingExtension
public IFileStore getFileStore(String fileStoreId) throws NoSuchFileStoreException
ITemplatingExtension
getFileStore
in interface ITemplatingExtension
NoSuchFileStoreException
Copyright © 2015. All rights reserved.