|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bitmechanic.maxq.generator.TemplateLogic
public class TemplateLogic
A helper object that can be used in the test templates.
The TemplateCodeGenerator
renders the themeTest.vm template, evaluating
the #set()
expressions contained in there. If $templateLogic
variable
is set, it's value is used as a name of the class to be instantiated. A single instance of the
class is associated with a TemplateCodeGenerator
throughout its lifetime, therefore
it is strongly recommended for the logic class to be stateless. The instance will be available
during rendering themeNewScenario.vm and themeInterchange.vm templates in the
$logic
variable.
No interface requirements are imposed on the class selected using $templateLogic
variable.
Constructor Summary | |
---|---|
TemplateLogic()
Creates new TemplateLogic instance. |
Method Summary | |
---|---|
java.lang.String |
escapeParam(java.lang.String param)
Escape a form parameter value in a way suitable for a String literal. |
java.lang.String |
getBaseUrl()
Returns the applications base URL. |
protected Config |
getConfig()
Returns the MaxQ config. |
java.lang.String |
getRelativeUrl(java.lang.String url)
Returns an URL relative to the configured base URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateLogic()
Method Detail |
---|
public java.lang.String getBaseUrl()
public java.lang.String getRelativeUrl(java.lang.String url)
url
- the URL.
public java.lang.String escapeParam(java.lang.String param)
" and \ characters will be escaped with a leading \.
param
- parameter value.
protected Config getConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |