public class Template extends Object
Template represents an NCS template, that is a template loaded
from the directory templates of the package.| Constructor and Description |
|---|
Template(Maapi aMaapi,
String aTemplateName) |
Template(NavuContext aContext,
String aTemplateName) |
Template(ServiceContext aServiceContext,
String aTemplateName)
Construct a Template.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Maapi maapi,
int tid,
ConfPath rootPath,
TemplateVariables variables)
Apply a template in the specified context
|
void |
apply(NavuNode root,
TemplateVariables variables)
Apply a template in the specified context
|
static boolean |
exists(Maapi maapi,
String template) |
static boolean |
exists(NavuContext context,
String template) |
static boolean |
exists(ServiceContext context,
String template)
Tests for existence of a template.
|
static Set<String> |
getTemplates(Maapi maapi) |
static Set<String> |
getTemplates(NavuContext context) |
static Set<String> |
getTemplates(ServiceContext aServiceContext)
Returns a set consisting of the loaded templates.
|
String[] |
getVariables() |
public Template(ServiceContext aServiceContext, String aTemplateName) throws ConfException
aServiceContext - the context is which this call is made.aTemplateName - name of the template.ConfExceptionpublic Template(NavuContext aContext, String aTemplateName) throws ConfException
ConfExceptionpublic Template(Maapi aMaapi, String aTemplateName) throws ConfException
ConfExceptionpublic static Set<String> getTemplates(ServiceContext aServiceContext) throws ConfException
aServiceContext - the context in which this call is made.Set of loaded templates.ConfExceptionpublic static Set<String> getTemplates(NavuContext context) throws ConfException
ConfExceptionpublic static Set<String> getTemplates(Maapi maapi) throws ConfException
ConfExceptionpublic String[] getVariables() throws ConfException
ConfExceptionpublic static boolean exists(ServiceContext context, String template) throws ConfException
context - the context in which this call is made.template - name of the template.true or false depending on whether the
template is loaded or not.ConfExceptionpublic static boolean exists(NavuContext context, String template) throws ConfException
ConfExceptionpublic static boolean exists(Maapi maapi, String template) throws ConfException
ConfExceptionpublic void apply(NavuNode root, TemplateVariables variables) throws ConfException
root - the initial context and root context for evaluation of
XPath expressionsvariables - a set of key value pairs where each key will be
an XPath variable.ConfExceptionpublic void apply(Maapi maapi, int tid, ConfPath rootPath, TemplateVariables variables) throws ConfException
maapi - a maapi connection to the NCS servertid - a transaction id which should be attached to the maapi
connectionrootPath - the initial context and root context for evaluation of
XPath expressionsvariables - a set of key value pairs where each key will be
an XPath variable.ConfException