|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.engine.ElementSupport
public class ElementSupport
The ElementSupport class provides all the methods to
communicate from inside an element with the context in which it is being
executed.
ElementAware| Constructor Summary | |
|---|---|
protected |
ElementSupport()
|
| Method Summary | ||
|---|---|---|
void |
addDateHeader(String name,
long date)
Sets a response header with the given name and date-value. |
|
void |
addHeader(String name,
String value)
Adds a response header with the given name and value. |
|
void |
addIntHeader(String name,
int value)
Adds a response header with the given name and integer value. |
|
void |
addOutputValue(String name,
boolean value)
Adds a boolean value to the current values of an output. |
|
void |
addOutputValue(String name,
char value)
Adds a char value to the current values of an output. |
|
void |
addOutputValue(String name,
char[] value)
Adds values from an array of chars to the current values
of an output. |
|
void |
addOutputValue(String name,
double value)
Adds a double value to the current values of an output. |
|
void |
addOutputValue(String name,
float value)
Adds a float value to the current values of an output. |
|
void |
addOutputValue(String name,
int value)
Adds a int value to the current values of an output. |
|
void |
addOutputValue(String name,
long value)
Adds a long value to the current values of an output. |
|
void |
addOutputValue(String name,
Object value)
Adds a generic object value to the current values of an
output. |
|
void |
addOutputValue(String name,
String value)
Adds a value to the current values of an output. |
|
void |
addOutputValues(String name,
String[] values)
Adds values to the current values of an output. |
|
void |
answer()
Resumes the execution in the calling element by providing no answer object. |
|
void |
answer(Object answer)
Resumes the execution in the calling element by providing an answer. |
|
Object |
call(String exit)
Pauses the execution of the element and creates a new continuation. |
|
void |
child()
Interrupts the execution in this element and transfers the execution to the child element. |
|
boolean |
childTriggered(String name,
String[] values)
Called by the engine when a child trigger occurs, this method should never be called explicitly. |
|
void |
clearBuffer()
Clears the request text output buffer, all buffered text will be discarded. |
|
void |
clearNamedOutputBean(String name)
Clears the outputs that correspond to the properties of a named output bean. |
|
void |
clearOutput(String name)
Clears the output value of an output. |
|
void |
clearOutputBean(Class beanClass)
Clears the outputs that correspond to the properties of an output bean. |
|
void |
clearOutputBean(Class beanClass,
String prefix)
Clears the outputs that correspond to the properties of an output bean, taking the provided prefix into account. |
|
Object |
clone()
When continuations are resumed, they are by default cloned to ensure that their state is properly isolated. |
|
boolean |
cloneContinuations()
Indicates whether continuations are cloned at each step. |
|
boolean |
containsHeader(String name)
Returns a boolean indicating whether the named response header has already been set. |
|
void |
defer()
Interrupts the execution in RIFE completely and defers it to the servlet container. |
|
boolean |
duringStepBack()
Indicates whether the current element execution is a step back. |
|
void |
enableTextBuffer(boolean enabled)
Enables or disables the response text buffer. |
|
String |
encodeHtml(String source)
Transforms a provided String object into a new string,
containing only valid HTML characters. |
|
String |
encodeXml(String source)
Transforms a provided String object into a new string,
containing only valid XML characters. |
|
List<String> |
evaluateExpressionRoleUserTags(Template template,
String id)
Evaluate the ROLEUSER expression tags in a template. |
|
void |
exit(String name)
Activates an exit. |
|
void |
fillSubmissionBean(Object bean)
Fills the properties of an existing bean with the parameter values of the submission that was sent. |
|
void |
fillSubmissionBean(Object bean,
String prefix)
Fills the properties of an existing bean with the parameter values of the submission that was sent, taking the provided prefix into account. |
|
void |
fillSubmissionBean(String submissionName,
Object bean)
Fills the properties of an existing bean with the parameter values of a submission. |
|
void |
fillSubmissionBean(String submissionName,
Object bean,
String prefix)
Fills the properties of an existing bean with the parameter values of a submission, taking the provided prefix into account. |
|
void |
flush()
Flushes the request text output buffer and the request output stream. |
|
void |
forward(String url)
Interrupts the execution in this element and forwards the entire request to another URL. |
|
void |
generateEmptyForm(Template template,
Class beanClass)
Generates a form that corresponds to an empty instance of a bean class. |
|
void |
generateEmptyForm(Template template,
Class beanClass,
String prefix)
Generates a form that corresponds to an empty instance of a bean class. |
|
void |
generateForm(Template template,
Object beanInstance)
Generates a form that corresponds to a bean instance. |
|
void |
generateForm(Template template,
Object beanInstance,
String prefix)
Generates a form that corresponds to a bean instance. |
|
String |
getContentType()
Returns the MIME type of the body of the request, or null
if the type is not known. |
|
String |
getContinuationId()
Returns the unique identifier of the current continuation. |
|
Cookie |
getCookie(String name)
Retrieves a cookie. |
|
String |
getCookieValue(String name)
Retrieves the value of a cookie. |
|
String |
getCookieValue(String name,
String defaultValue)
Retrieves the value of a named cookie, using a default value as fallback. |
|
boolean |
getCookieValueBoolean(String name)
Retrieves the value of a named cookie and converts it to a boolean. |
|
boolean |
getCookieValueBoolean(String name,
boolean defaultValue)
Retrieves the value of a named cookie and converts it to a boolean, using a default value if no input value is present. |
|
double |
getCookieValueDouble(String name)
Retrieves the value of a named cookie and converts it to a double. |
|
double |
getCookieValueDouble(String name,
double defaultValue)
Retrieves the value of a named cookie and converts it to a double, using a default value if no input value is present. |
|
float |
getCookieValueFloat(String name)
Retrieves the value of a named cookie and converts it to a float. |
|
float |
getCookieValueFloat(String name,
float defaultValue)
Retrieves the value of a named cookie and converts it to a float, using a default value if no input value is present. |
|
int |
getCookieValueInt(String name)
Retrieves the value of a named cookie and converts it to an integer. |
|
int |
getCookieValueInt(String name,
int defaultValue)
Retrieves the value of a named cookie and converts it to an integer, using a default value if no input value is present. |
|
long |
getCookieValueLong(String name)
Retrieves the value of a named cookie and converts it to a long. |
|
long |
getCookieValueLong(String name,
long defaultValue)
Retrieves the value of a named cookie and converts it to a long, using a default value if no input value is present. |
|
Map<String,String> |
getCookieValues()
Retrieves all current cookies names with their values. |
|
long |
getDateHeader(String name)
Returns the value of the specified request header as a long value that represents a Date object. |
|
String |
getDeclarationName()
Retrieves the declaration name of this element. |
|
ElementDeployer |
getDeployer()
Retrieves the deployer of this element. |
|
Class |
getDeploymentClass()
Retrieves the class that will be used for the deployment of the element. |
|
ElementContext |
getElementContext()
Retrieves the context of this element. |
|
ElementInfo |
getElementInfo()
Retrieves the declaration information of this element. |
|
Object |
getEmbedData()
Retrieves the data that was passed on for the processing of this embedded element. |
|
String |
getEmbedDifferentiator()
Retrieves the differentiator that was used to set this embedded element apart. |
|
ElementSupport |
getEmbeddingElement()
Retrieves the element that is embedding the current element. |
|
Template |
getEmbeddingTemplate()
Retrieves the template that is embedding the current element. |
|
Properties |
getEmbedProperties()
Retrieves the embed value as a property list (see getEmbedValue() for more information about embed values). |
|
String |
getEmbedValue()
Retrieves the current content of the value tag of this embedded element. |
|
CharSequence |
getExitFormParameters(String name)
Generates the XHTML hidden form parameters for an exit. |
|
CharSequence |
getExitFormParameters(String name,
String[] outputValues)
Generates the hidden XHTML form parameters for an exit and overrides the current output values only for this method. |
|
CharSequence |
getExitFormParametersJavascript(String name,
String[] outputValues)
Generates Javascript that will generate hidden XHTML form parameters for an exit and overrides the current output values only for this method. |
|
CharSequence |
getExitFormUrl(String name)
Generates a form action URL for an exit. |
|
CharSequence |
getExitFormUrl(String name,
String pathinfo)
Generates a form action URL for an exit and appends a pathinfo to the URL of the destination element. |
|
CharSequence |
getExitQueryUrl(String name)
Generates a query URL for an exit. |
|
CharSequence |
getExitQueryUrl(String name,
String pathinfo)
Generates a query URL for an exit and appends a pathinfo to the URL of the destination element. |
|
CharSequence |
getExitQueryUrl(String name,
String[] outputValues)
Generates a query URL for an exit and overrides the current output values only for this method. |
|
CharSequence |
getExitQueryUrl(String name,
String pathinfo,
String[] outputValues)
Generates a query URL for an exit and appends a pathinfo to the URL of the destination element. |
|
String |
getHeader(String name)
Returns the value of the specified request header as a String. |
|
Enumeration |
getHeaderNames()
Returns an enumeration of all the header names this request contains. |
|
Enumeration |
getHeaders(String name)
Returns all the values of the specified request header as an Enumeration of String objects. |
|
Template |
getHtmlTemplate()
Creates a new template instance of the enginehtml
type, using the current element's absolute ID as the template name. |
|
Template |
getHtmlTemplate(String name)
Creates a new template instance of the enginehtml
type. |
|
Template |
getHtmlTemplate(String name,
String encoding)
Creates a new template instance of the enginehtml
type. |
|
Template |
getHtmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
Creates a new template instance of the enginehtml
type. |
|
Template |
getHtmlTemplate(String name,
TemplateTransformer transformer)
Creates a new template instance of the enginehtml
type. |
|
HttpServletRequest |
getHttpServletRequest()
Returns the current HttpServletRequest. |
|
HttpServletResponse |
getHttpServletResponse()
Returns the current HttpServletResponse. |
|
InitConfig |
getInitConfig()
Retrieves initialization configuration of this web application. |
|
String |
getInput(String name)
Retrieves the value of an input. |
|
String |
getInput(String name,
String defaultValue)
Retrieves the value of an input and returns a default value if no input value is present |
|
|
getInputBean(Class<BeanType> beanClass)
Retrieves an instance of an input bean and populates the properties with the input values. |
|
|
getInputBean(Class<BeanType> beanClass,
String prefix)
Retrieves an instance of an input bean and populates the properties with the input values, taking the provided prefix into account. |
|
boolean |
getInputBoolean(String name)
Retrieves the value of an input and converts it to a boolean. |
|
boolean |
getInputBoolean(String name,
boolean defaultValue)
Retrieves the value of an input and converts it to a boolean, using a default value if no input value is present. |
|
Date |
getInputDate(String name)
Retrieves the value of an input and converts it to a Date. |
|
Date |
getInputDate(String name,
Date defaultValue)
Retrieves the value of an input and converts it to a Date, using a default value if no input value is present. |
|
double |
getInputDouble(String name)
Retrieves the value of an input and converts it to a double. |
|
double |
getInputDouble(String name,
double defaultValue)
Retrieves the value of an input and converts it to a double, using a default value if no input value is present. |
|
float |
getInputFloat(String name)
Retrieves the value of an input and converts it to a float. |
|
float |
getInputFloat(String name,
float defaultValue)
Retrieves the value of an input and converts it to a float, using a default value if no input value is present. |
|
int |
getInputInt(String name)
Retrieves the value of an input and converts it to an integer. |
|
int |
getInputInt(String name,
int defaultValue)
Retrieves the value of an input and converts it to an integer, using a default value if no input value is present. |
|
long |
getInputLong(String name)
Retrieves the value of an input and converts it to a long. |
|
long |
getInputLong(String name,
long defaultValue)
Retrieves the value of an input and converts it to a long, using a default value if no input value is present. |
|
|
getInputSerializable(String name)
Retrieves the value of a serialized input. |
|
|
getInputSerializable(String name,
TargetType defaultValue)
Retrieves the value of a serialized input and returns a default value if no input value is present |
|
String[] |
getInputValues(String name)
Retrieves the values of an input. |
|
int |
getIntHeader(String name)
Returns the value of the specified request header as an int. |
|
RequestMethod |
getMethod()
Returns the method of this request. |
|
|
getNamedInputBean(String name)
Retrieves an instance of a named input bean and populates the properties with the input values. |
|
|
getNamedSubmissionBean(String beanName)
Retrieves an instance of a named submission bean for the current submission and populates the properties with the parameter values. |
|
|
getNamedSubmissionBean(String submissionName,
String beanName)
Retrieves an instance of a named submission bean and populates the properties with the parameter values. |
|
String[] |
getOutput(String name)
Retrieves the value of the ouput. |
|
OutputStream |
getOutputStream()
Retrieves an output stream to send binary data through the response. |
|
String |
getParameter(String name)
Retrieves the value of a parameter. |
|
String |
getParameter(String name,
String defaultValue)
Retrieves the value of a parameter and returns a default value if no parameter value is present |
|
boolean |
getParameterBoolean(String name)
Retrieves the value of a parameter and converts it to a boolean. |
|
boolean |
getParameterBoolean(String name,
boolean defaultValue)
Retrieves the value of a parameter and converts it to a boolean, using a default value if no parameter value is present. |
|
double |
getParameterDouble(String name)
Retrieves the value of a parameter and converts it to a double. |
|
double |
getParameterDouble(String name,
double defaultValue)
Retrieves the value of a parameter and converts it to a double, using a default value if no parameter value is present. |
|
double[] |
getParameterDoubleValues(String name)
Retrieves the values of a parameter as an array of doubles. |
|
float |
getParameterFloat(String name)
Retrieves the value of a parameter and converts it to a float. |
|
float |
getParameterFloat(String name,
float defaultValue)
Retrieves the value of a parameter and converts it to a float, using a default value if no parameter value is present. |
|
float[] |
getParameterFloatValues(String name)
Retrieves the values of a parameter as an array of floats. |
|
int |
getParameterInt(String name)
Retrieves the value of a parameter and converts it to an integer. |
|
int |
getParameterInt(String name,
int defaultValue)
Retrieves the value of a parameter and converts it to an integer, using a default value if no parameter value is present. |
|
int[] |
getParameterIntValues(String name)
Retrieves the values of a parameter as an array of integers. |
|
long |
getParameterLong(String name)
Retrieves the value of a parameter and converts it to a long. |
|
long |
getParameterLong(String name,
long defaultValue)
Retrieves the value of a parameter and converts it to a long, using a default value if no parameter value is present. |
|
long[] |
getParameterLongValues(String name)
Retrieves the values of a parameter as an array of longs. |
|
ArrayList<String> |
getParameterNames()
Retrieves the names of all the parameters that are present. |
|
ArrayList<String> |
getParameterNames(String regexp)
Retrieves the names of all the parameters that are present and that match a regular expression. |
|
String[] |
getParameterValues(String name)
Retrieves the values of a parameter. |
|
String |
getPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request. |
|
Object |
getProperty(String name)
Retrieves the value of an injected named property. |
|
Object |
getProperty(String name,
Object defaultValue)
Retrieves the value of an injected named property, using a default value as fallback. |
|
String |
getPropertyString(String name)
Retrieves the value of an injected named property and converts it to a string. |
|
String |
getPropertyString(String name,
String defaultValue)
Retrieves the value of an injected named property and converts it to a string, using a default value as fallback. |
|
|
getPropertyTyped(String name,
Class<T> type)
Retrieves the value of an injected named property and converts it to the specified type. |
|
|
getPropertyTyped(String name,
Class<T> type,
T defaultValue)
Retrieves the value of an injected named property and converts it to the specified type, using a default value as fallback. |
|
String |
getProtocol()
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
|
String |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. |
|
String |
getRemoteHost()
Returns the fully qualified name of the client or the last proxy that sent the request. |
|
String |
getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been
authenticated. |
|
Object |
getRequestAttribute(String name)
Returns the value of the named attribute as an Object, or
null if no attribute of the given name exists. |
|
Enumeration |
getRequestAttributeNames()
Returns an Enumeration containing the names of the
attributes available to this request. |
|
String |
getRequestCharacterEncoding()
Returns the name of the character encoding used in the body of this request. |
|
Locale |
getRequestLocale()
Returns the preferred Locale that the client will accept
content in, based on the Accept-Language header. |
|
Enumeration |
getRequestLocales()
Returns an Enumeration of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header. |
|
String |
getResponseCharacterEncoding()
Returns the name of the character encoding (MIME charset) used for the body sent in this response. |
|
Locale |
getResponseLocale()
Returns the locale specified for this response using the setResponseLocale(java.util.Locale) method. |
|
String |
getScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp. |
|
String |
getServerName()
Returns the host name of the server to which the request was sent. |
|
int |
getServerPort()
Returns the port number to which the request was sent. |
|
String |
getServerRootUrl()
Returns the root URL of the server that is running this web applications. |
|
ServletContext |
getServletContext()
Returns the ServletContext of this web application. |
|
Site |
getSite()
Retrieves the site in which this element is declared. |
|
String |
getSourceName()
Retrieves the source implementation name of this element. |
|
String |
getSubmission()
Retrieves the name of the submission that was sent to this element |
|
|
getSubmissionBean(Class<BeanType> beanClass)
Retrieves an instance of a submission bean and populates the properties with the parameter values. |
|
|
getSubmissionBean(Class<BeanType> beanClass,
String prefix)
Retrieves an instance of a submission bean and populates the properties with the parameter values, taking the provided prefix into account. |
|
|
getSubmissionBean(String submissionName,
Class<BeanType> beanClass)
Retrieves an instance of a submission bean and populates the properties with the parameter values. |
|
|
getSubmissionBean(String submissionName,
Class<BeanType> beanClass,
String prefix)
Retrieves an instance of a submission bean and populates the properties with the parameter values, taking the provided prefix into account. |
|
CharSequence |
getSubmissionFormParameters(String name)
Generates the hidden XHTML form parameters for a submission. |
|
CharSequence |
getSubmissionFormParameters(String name,
String[] parameterValues)
Generates the hidden XHTML form parameters for a submission and overrides the current output values only for this method. |
|
CharSequence |
getSubmissionFormParametersJavascript(String name,
String[] parameterValues)
Generates Javascript that will generate hidden XHTML form parameters for a submission and overrides the current output values only for this method. |
|
CharSequence |
getSubmissionFormUrl()
Generates a form action URL for a submission. |
|
CharSequence |
getSubmissionFormUrl(String pathinfo)
Generates a form action URL for a submission and appends a pathinfo to the URL of the element. |
|
CharSequence |
getSubmissionQueryUrl(String name)
Generates a query URL for a submission. |
|
CharSequence |
getSubmissionQueryUrl(String name,
String pathinfo)
Generates a query URL for a submission and appends a pathinfo to the URL of the element. |
|
CharSequence |
getSubmissionQueryUrl(String name,
String[] parameterValues)
Generates a query URL for a submission with default parameter values. |
|
CharSequence |
getSubmissionQueryUrl(String name,
String pathinfo,
String[] parameterValues)
Generates a query URL for a submission and appends a pathinfo to the URL of the element, default parameter values can also be added. |
|
ElementInfo |
getTarget()
Retrieves the information of the target element of the active request. |
|
Template |
getTxtTemplate()
Creates a new template instance of the enginetxt
type, using the current element's absolute ID as the template name. |
|
Template |
getTxtTemplate(String name)
Creates a new template instance of the enginetxt
type. |
|
Template |
getTxtTemplate(String name,
String encoding)
Creates a new template instance of the enginetxt
type. |
|
Template |
getTxtTemplate(String name,
String encoding,
TemplateTransformer transformer)
Creates a new template instance of the enginetxt
type. |
|
Template |
getTxtTemplate(String name,
TemplateTransformer transformer)
Creates a new template instance of the enginetxt
type. |
|
UploadedFile |
getUploadedFile(String name)
Retrieves an uploaded file. |
|
ArrayList<String> |
getUploadedFileNames()
Retrieves the list of uploaded file names. |
|
ArrayList<String> |
getUploadedFileNames(String regexp)
Retrieves the names of all the files that are present and that match a regular expression. |
|
UploadedFile[] |
getUploadedFiles(String name)
Retrieves all files that have been uploaded for a particular name. |
|
String |
getWebappRootUrl()
Returns the root URL of this web applications. |
|
Template |
getXhtmlTemplate()
Creates a new template instance of the enginexhtml type, using the current element's absolute ID as the
template name. |
|
Template |
getXhtmlTemplate(String name)
Creates a new template instance of the enginexhtml type. |
|
Template |
getXhtmlTemplate(String name,
String encoding)
Creates a new template instance of the enginexhtml type. |
|
Template |
getXhtmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
Creates a new template instance of the enginexhtml type. |
|
Template |
getXhtmlTemplate(String name,
TemplateTransformer transformer)
Creates a new template instance of the enginexhtml type. |
|
Template |
getXmlTemplate()
Creates a new template instance of the enginexml
type, using the current element's absolute ID as the template name. |
|
Template |
getXmlTemplate(String name)
Creates a new template instance of the enginexml
type. |
|
Template |
getXmlTemplate(String name,
String encoding)
Creates a new template instance of the enginexml
type. |
|
Template |
getXmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
Creates a new template instance of the enginexml
type. |
|
Template |
getXmlTemplate(String name,
TemplateTransformer transformer)
Creates a new template instance of the enginexml
type. |
|
boolean |
hasCookie(String name)
Checks whether a cookie is present. |
|
boolean |
hasEmbedData()
Indicates whether data was passed on during the processing of this embedded element. |
|
boolean |
hasEmbedValue()
Indicates whether the embedded element's template value has content. |
|
boolean |
hasInputValue(String name)
Checks whether a value has been provided to an input. |
|
boolean |
hasParameterValue(String name)
Checks whether a value has been provided to an parameter. |
|
boolean |
hasProperty(String name)
Indicates whether this element has a certain injected named property. |
|
boolean |
hasRequestAttribute(String name)
Checks if a request attribute exists. |
|
boolean |
hasSubmission()
Indicates whether this element received a submission. |
|
boolean |
hasSubmission(String submissionName)
Indicates whether this element received a certain submission. |
|
boolean |
hasUploadedFile(String name)
Checks if a particular file has been uploaded during the last submission. |
|
void |
initialize()
Initializes the element, this method should never be called explicitly. |
|
boolean |
isEmbedded()
Indicates whether this element is running embedded inside another element's template. |
|
boolean |
isFileEmpty(String name)
Checks if an uploaded file wasn't sent or if it is empty. |
|
boolean |
isInputEmpty(String name)
Checks whether an input has no value or whether the value is empty. |
|
boolean |
isParameterEmpty(String name)
Checks whether a parameter is empty. |
|
boolean |
isPropertyEmpty(String name)
Checks if a property is not available or if the string presentation is empty. |
|
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
|
boolean |
isTextBufferEnabled()
Indicates whether the response text buffer is enabled or disabled. |
|
void |
pause()
Pauses the execution of the element and creates a new continuation. |
|
void |
preventCaching()
Sets up the current request to prevent all caching of the response by the client. |
|
void |
print(Object value)
Prints the string representation of an object to the request text output. |
|
void |
print(Template template)
Prints the content of a template to the request text output. |
|
void |
processEmbeddedElement(Template template,
String elementId)
Processes an embedded element without a differentiator in a template. |
|
void |
processEmbeddedElement(Template template,
String elementId,
Object data)
Processes an embedded element without a differentiator in a template and pass on data to the processed embedded element. |
|
void |
processEmbeddedElement(Template template,
String elementId,
String differentiator)
Processes an embedded element with a differentiator in a template. |
|
void |
processEmbeddedElement(Template template,
String elementId,
String differentiator,
Object data)
Processes an embedded element with a differentiator in a template and pass on data to the processed embedded element. |
|
List<String> |
processTemplate(Template template)
Processes a template in the active element context. |
|
boolean |
prohibitRawAccess()
Indicates whether the access to raw servlet API methods is allowed. |
|
void |
redirect(String url)
Interrupts the execution in this element and redirects the client to another URL. |
|
void |
removeForm(Template template,
Class beanClass)
Removes a generated form, leaving the builder value tags empty again as if this form never had been generated. |
|
void |
removeForm(Template template,
Class beanClass,
String prefix)
Removes a generated form, leaving the builder value tags empty again as if this form never had been generated. |
|
void |
removeRequestAttribute(String name)
Removes an attribute from this request. |
|
Collection<String> |
selectInputParameter(Template template,
String name,
String[] values)
Sets a select box option, a radio button or a checkbox to selected or checked according to input values. |
|
Collection<String> |
selectParameter(Template template,
String name,
String[] values)
Sets a select box option, a radio button or a checkbox to selected or checked. |
|
Collection |
selectSubmissionParameter(Template template,
String name,
String value)
Sets a select box option, a radio button or a checkbox to selected or checked according to a submission parameter value. |
|
Collection<String> |
selectSubmissionParameter(Template template,
String name,
String[] values)
Sets a select box option, a radio button or a checkbox to selected or checked according to submission parameter values. |
|
void |
sendError(int statusCode)
Sends an error response to the client using the specified status code and clearing the buffer. |
|
void |
sendError(int statusCode,
String message)
Sends an error response to the client using the specified status. |
|
void |
sendRedirect(String location)
Sends a temporary redirect response to the client using the specified redirect location URL. |
|
void |
setChildTrigger(ElementChildTrigger childTrigger)
Sets the ElementChildTrigger class that will be used to
child trigger is executed. |
|
void |
setCloneContinuations(boolean clone)
Changes the engine's behavior when new continuation steps are created. |
|
void |
setContentLength(int length)
Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
|
void |
setContentType(String type)
Sets the content type of the response being sent to the client, if the response has not been committed yet. |
|
void |
setCookie(Cookie cookie)
Sets a cookie which will be sent to the browser. |
|
void |
setDateHeader(String name,
long date)
Sets a response header with the given name and date-value. |
|
void |
setDeploymentClass(Class<? extends ElementDeployer> klass)
Set the ElementDeployer class that will be used for
deployment. |
|
void |
setElementContext(ElementContext elementContext)
|
|
void |
setExitForm(Template template,
String name)
Generates a form action URL for an exit and sets it as the content of a template value. |
|
void |
setExitForm(Template template,
String name,
String pathinfo)
Generates a form action URL for an exit with a pathinfo and sets it as the content of a template value. |
|
void |
setExitForm(Template template,
String name,
String[] outputValues)
Generates a form action URL for an exit with overridden outputs and sets it as the content of a template value. |
|
void |
setExitForm(Template template,
String name,
String pathinfo,
String[] outputValues)
Generates a form action URL for an exit with a pathinfo and overridden outputs and sets it as the content of a template value. |
|
void |
setExitQuery(Template template,
String name)
Generates a query URL for an exit and sets it as the content of a template value. |
|
void |
setExitQuery(Template template,
String name,
String pathinfo)
Generates a query URL with a pathinfo for an exit and sets it as the content of a template value. |
|
void |
setExitQuery(Template template,
String name,
String[] outputValues)
Generates a query URL for an exit with overridden outputs and sets it as the content of a template value. |
|
void |
setExitQuery(Template template,
String name,
String pathinfo,
String[] outputValues)
Generates a query URL for an exit with a pathinfo and overridden outputs and sets it as the content of a template value. |
|
void |
setHeader(String name,
String value)
Sets a response header with the given name and value. |
|
void |
setInitializer(ElementInitializer initializer)
Sets the ElementInitializer class that will be used to
initialize the element. |
|
void |
setIntHeader(String name,
int value)
Sets a response header with the given name and integer value. |
|
void |
setNamedOutputBean(String name,
Object bean)
Sets an instance of a named output bean and populates the output values from the property values. |
|
void |
setOutput(String name,
boolean value)
Sets the value of an output from a boolean. |
|
void |
setOutput(String name,
char value)
Sets the value of an output from a char. |
|
void |
setOutput(String name,
char[] value)
Set the value of an output from an array of chars that
will be concatenated to a String. |
|
void |
setOutput(String name,
double value)
Sets the value of an output from a double. |
|
void |
setOutput(String name,
float value)
Sets the value of an output from a float. |
|
void |
setOutput(String name,
int value)
Sets the value of an output from an int. |
|
void |
setOutput(String name,
long value)
Sets the value of an output from a long. |
|
void |
setOutput(String name,
Object value)
Sets the value of an output from a generic object. |
|
void |
setOutput(String name,
String value)
Sets the value of an output. |
|
void |
setOutput(String name,
String[] values)
Set the values of an output. |
|
void |
setOutputBean(Object bean)
Sets an instance of a named input bean and populates the output values from the property values. |
|
void |
setOutputBean(Object bean,
String prefix)
Sets an instance of a named input bean and populates the output values from the property values. |
|
void |
setProhibitRawAccess(boolean access)
Changes the access permissions to raw servlet API methods. |
|
void |
setRequestAttribute(String name,
Object object)
Stores an attribute in this request. |
|
void |
setResponseLocale(Locale locale)
Sets the locale of the response, if the response has not been committed yet. |
|
void |
setStatus(int statusCode)
Sets the status code for this response. |
|
void |
setSubmissionBean(Template template,
Object beanInstance)
Sets the content of all values that correspond to bean property names to the data of the bean properties. |
|
void |
setSubmissionBean(Template template,
Object beanInstance,
boolean encode)
Sets the content of all values that correspond to bean property names to the data of the bean properties. |
|
void |
setSubmissionForm(Template template,
String name)
Generates a form action URL for an submission and sets it as the content of a template value. |
|
void |
setSubmissionForm(Template template,
String name,
String pathinfo)
Generates a form action URL for an submission with a pathinfo and sets it as the content of a template value. |
|
void |
setSubmissionForm(Template template,
String name,
String[] parameterValues)
Generates a form action URL for an submission with default parameter values and sets it as the content of a template value. |
|
void |
setSubmissionForm(Template template,
String name,
String pathinfo,
String[] parameterValues)
Generates a form action URL for an submission with a pathinfo and default parameter values and sets it as the content of a template value. |
|
void |
setSubmissionQuery(Template template,
String name)
Generates a query URL for a submission sets it as the content of a template value. |
|
void |
setSubmissionQuery(Template template,
String name,
String pathinfo)
Generates a query URL for a submission with a pathinfo and sets it as the content of a template value. |
|
void |
setSubmissionQuery(Template template,
String name,
String[] parameterValues)
Generates a query URL for a submission with default parameter values and sets it as the content of a template value. |
|
void |
setSubmissionQuery(Template template,
String name,
String pathinfo,
String[] parameterValues)
Generates a query URL for a submission with pathinfo and default parameter values and sets it as the content of a template value. |
|
void |
stepBack()
Steps back to the start of the previous continuation. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ElementSupport()
| Method Detail |
|---|
public void setInitializer(ElementInitializer initializer)
ElementInitializer class that will be used to
initialize the element.
Customizing the initialization can also simply be done by
overloading the initialize() method if the element extends
the Element class.
initializer - the initializerinitialize(),
ElementInitializerpublic void initialize()
The initialization happens in a fully setup context and is the first method that will be called by the engine.
The default implementation executes the ElementInitializer
that has been registered with setInitializer(com.uwyn.rife.engine.ElementInitializer).
setInitializer(ElementInitializer)public void setChildTrigger(ElementChildTrigger childTrigger)
ElementChildTrigger class that will be used to
child trigger is executed.
Customizing the child trigger can also simply be done by overloading
the childTriggered() method if the element extends the
Element class.
childTrigger - the child triggerchildTriggered(String, String[]),
ElementChildTrigger
public boolean childTriggered(String name,
String[] values)
The default implementation executes the ElementChildTrigger
that has been registered with setChildTrigger(com.uwyn.rife.engine.ElementChildTrigger).
name - the name of the variable that initiated the child triggervalues - the values of the variable that initiated the child
trigger
true if the execution should be interrupted and
step down the inheritance stack (ie. when the activation of the child
has been triggered); or
false if the execution should just continue
setChildTrigger(ElementChildTrigger)public void setDeploymentClass(Class<? extends ElementDeployer> klass)
ElementDeployer class that will be used for
deployment.
An instance of this class will be created when the element is
deployed within a site. The instance's ElementDeployer.deploy()
method will be called. This is handy if you need to setup
element-specific resources for all its instances.
Customizing the element deployer can also simply be done by
overloading the getDeploymentClass() method if the element
extends the Element class.
klass - the ElementDeployer that will be used to
deploy the elementElementDeployer.deploy(),
getDeploymentClass(),
getDeployer()public Class getDeploymentClass()
ElementDeployer; or
null if no deployment class is used
setDeploymentClass(Class),
getDeployer()public void setProhibitRawAccess(boolean access)
By default, RIFE shields you away from raw access to the servlet API and controls all incoming and outgoing data. This makes it possible to offer the advanced engine features.
Sometimes it's useful however to still be able to access the raw servlet API features, for instance when integrating other libraries. The fact that a method needs to be called before being able to do so makes it easy to identify which elements are outside of the controlled context of the RIFE application.
access - true if the raw servlet API access is
prohibited; or
false if it is allowed
prohibitRawAccess()public boolean prohibitRawAccess()
Instead of using the setProhibitRawAccess(boolean) method,
one can also overload this method to allow raw access. By default, raw
access is forbidden.
true if the raw servlet API access is prohibited;
or
false if it is allowed
setProhibitRawAccess(boolean)public void setCloneContinuations(boolean clone)
By default, the active continuation is cloned when a new step needs to be created. This makes it possible to use the browser's back button and start a new continuation trail. Each previous step thus keeps it associated state. By disabling the cloning, performance will increase and memory usage will decrease since the active continuation will simply be migrated to the new continuation step. Note that none of the previous steps will be usable anymore though.
clone - true to make the engine clone continuations;
or
false to disable the cloning
cloneContinuations()public boolean cloneContinuations()
Instead of using the setCloneContinuations(boolean) method,
one can also overload this method to configure the cloning. By default,
cloning is active.
true to make the engine clone continuations; or
false to disable the cloning
(boolean)public final void pause()
The next request will resume exactly at the same location with a completely restored call stack and variable stack.
public final void stepBack()
If there is no previous continuation, the element will be executed from the beginning again.
duringStepBack()public boolean duringStepBack()
true if a step back occurred in this request; or
false otherwise
stepBack()public final Object call(String exit)
As soon as the called element returns or executes answer(),
the execution will resume in the calling element with a completely
restored call stack and variable stack.
exit - the name of the exit whose target element will be called
answer(Object)
method in the called element; or
null if no answer was provided
answer(),
answer(Object)
public final void answer()
throws EngineException
The execution in the active element will be interrupted immediately and the call continuation will be resumed exactly where is was paused before.
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exceptioncall(String),
answer(Object)
public final void answer(Object answer)
throws EngineException
The execution in the active element will be interrupted immediately and the call continuation will be resumed exactly where is was paused before.
answer - the object that will be answered to the calling element
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exceptioncall(String),
answer()
public Template getHtmlTemplate()
throws TemplateException,
EngineException
enginehtml
type, using the current element's absolute ID as the template name.
If the element is an arrival, the absolute ID of the real element it points to will be used.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getHtmlTemplate(String),
getHtmlTemplate(String, TemplateTransformer),
getHtmlTemplate(String, String),
getHtmlTemplate(String, String, TemplateTransformer)
public Template getHtmlTemplate(String name)
throws TemplateException,
EngineException
enginehtml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getHtmlTemplate(),
getHtmlTemplate(String, TemplateTransformer),
getHtmlTemplate(String, String),
getHtmlTemplate(String, String, TemplateTransformer)
public Template getHtmlTemplate(String name,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginehtml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.transformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getHtmlTemplate(),
getHtmlTemplate(String),
getHtmlTemplate(String, String),
getHtmlTemplate(String, String, TemplateTransformer)
public Template getHtmlTemplate(String name,
String encoding)
throws TemplateException,
EngineException
enginehtml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's source
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getHtmlTemplate(),
getHtmlTemplate(String),
getHtmlTemplate(String, TemplateTransformer),
getHtmlTemplate(String, String, TemplateTransformer)
public Template getHtmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginehtml
type.
The special engine template types contain additional block and value filters to offer the following features:
<!--V
'ELEMENT:my.elementid'/-->)
.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V-->
<!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B-->)
Non-engine versions of the same template types are not able to provide these functionalities.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's sourcetransformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getHtmlTemplate(),
getHtmlTemplate(String),
getHtmlTemplate(String, TemplateTransformer),
getHtmlTemplate(String, String)
public Template getXhtmlTemplate()
throws TemplateException,
EngineException
enginexhtml type, using the current element's absolute ID as the
template name.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXhtmlTemplate(String),
getXhtmlTemplate(String, TemplateTransformer),
getXhtmlTemplate(String, String),
getXhtmlTemplate(String, String, TemplateTransformer)
public Template getXhtmlTemplate(String name)
throws TemplateException,
EngineException
enginexhtml type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXhtmlTemplate(),
getXhtmlTemplate(String, TemplateTransformer),
getXhtmlTemplate(String, String),
getXhtmlTemplate(String, String, TemplateTransformer)
public Template getXhtmlTemplate(String name,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginexhtml type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.transformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXhtmlTemplate(),
getXhtmlTemplate(String),
getXhtmlTemplate(String, String),
getXhtmlTemplate(String, String, TemplateTransformer)
public Template getXhtmlTemplate(String name,
String encoding)
throws TemplateException,
EngineException
enginexhtml type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's source
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXhtmlTemplate(),
getXhtmlTemplate(String),
getXhtmlTemplate(String, TemplateTransformer),
getXhtmlTemplate(String, String, TemplateTransformer)
public Template getXhtmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginexhtml type.
The special engine template types contain additional block and value filters to offer the following features:
<!--V
'ELEMENT:my.elementid'/-->)
.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V-->
<!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B-->)
Non-engine versions of the same template types are not able to provide these functionalities.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's sourcetransformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXhtmlTemplate(),
getXhtmlTemplate(String),
getXhtmlTemplate(String, TemplateTransformer),
getXhtmlTemplate(String, String)
public Template getXmlTemplate()
throws TemplateException,
EngineException
enginexml
type, using the current element's absolute ID as the template name.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXmlTemplate(String),
getXmlTemplate(String, TemplateTransformer),
getXmlTemplate(String, String),
getXmlTemplate(String, String, TemplateTransformer)
public Template getXmlTemplate(String name)
throws TemplateException,
EngineException
enginexml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXmlTemplate(),
getXmlTemplate(String, TemplateTransformer),
getXmlTemplate(String, String),
getXmlTemplate(String, String, TemplateTransformer)
public Template getXmlTemplate(String name,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginexml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.transformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXmlTemplate(String),
getXmlTemplate(String),
getXmlTemplate(String, String),
getXmlTemplate(String, String, TemplateTransformer)
public Template getXmlTemplate(String name,
String encoding)
throws TemplateException,
EngineException
enginexml
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's source
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXmlTemplate(String),
getXmlTemplate(String),
getXmlTemplate(String, TemplateTransformer),
getXmlTemplate(String, String, TemplateTransformer)
public Template getXmlTemplate(String name,
String encoding,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginexml
type.
The special engine template types contain additional block and value filters to offer the following features:
<!--V
'ELEMENT:my.elementid'/-->)
.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V-->
<!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B-->)
Non-engine versions of the same template types are not able to provide these functionalities.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's sourcetransformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getXmlTemplate(String),
getXmlTemplate(String),
getXmlTemplate(String, TemplateTransformer),
getXmlTemplate(String, String)
public Template getTxtTemplate()
throws TemplateException,
EngineException
enginetxt
type, using the current element's absolute ID as the template name.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getTxtTemplate(String),
getTxtTemplate(String, TemplateTransformer),
getTxtTemplate(String, String),
getTxtTemplate(String, String, TemplateTransformer)
public Template getTxtTemplate(String name)
throws TemplateException,
EngineException
enginetxt
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getTxtTemplate(),
getTxtTemplate(String, TemplateTransformer),
getTxtTemplate(String, String),
getTxtTemplate(String, String, TemplateTransformer)
public Template getTxtTemplate(String name,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginetxt
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.transformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getTxtTemplate(),
getTxtTemplate(String),
getTxtTemplate(String, String),
getTxtTemplate(String, String, TemplateTransformer)
public Template getTxtTemplate(String name,
String encoding)
throws TemplateException,
EngineException
enginetxt
type.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's source
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getTxtTemplate(),
getTxtTemplate(String),
getTxtTemplate(String, TemplateTransformer),
getTxtTemplate(String, String, TemplateTransformer)
public Template getTxtTemplate(String name,
String encoding,
TemplateTransformer transformer)
throws TemplateException,
EngineException
enginetxt
type.
The special engine template types contain additional block and value filters to offer the following features:
[!V 'ELEMENT:my.elementid'/])
.:
[!V 'OGNL:ROLEUSER:rolecheck']User is not in role "admin"[!/V]
[!B
'OGNL:ROLEUSER:rolecheck:[[ isInRole("admin") ]]']User is in role
"admin"[!/B])
Non-engine versions of the same template types are not able to provide these functionalities.
name - the name of the template. Note that this follows the Java
naming conventions for classes and packages. Directories correspond to
package names and file separators correspond to dots. Any non-valid
class name character will be replaced by an underscore.encoding - the encoding of the template's sourcetransformer - the template transformer that will be used to modify
the template's source before it's parsed
TemplateException - if an
error occurred during the retrieval, parsing or compilation of the
template
EngineException - if an error
occurs during the initialization of the template in the element
context; or if you don't have access to the request data (eg. you're
inside a child trigger); or if there's no active element context (eg.
you're using this method inside the constructor instead of inside the
initialize() method)getTxtTemplate(),
getTxtTemplate(String),
getTxtTemplate(String, TemplateTransformer),
getTxtTemplate(String, String)public String encodeHtml(String source)
String object into a new string,
containing only valid HTML characters.
source - The string that has to be transformed into a valid HTML
string.
String object.encodeXml(String)public String encodeXml(String source)
String object into a new string,
containing only valid XML characters.
source - The string that has to be transformed into a valid XML
string.
String object.encodeHtml(String)
public void enableTextBuffer(boolean enabled)
throws EngineException
Disabling an enabled text buffer, flushes the already buffered content first.
If the text buffer is disabled, text content will be send immediately to the client, this can decrease performance. Unless you need to stream content in real time, it's best to leave the text buffer enabled. It will be flushed and sent in one go at the end of the request.
Exits that cancel embedding rely on the fact that the text buffer is active to be able to discard the partial content of the embedding element.
enabled - true to enable the text buffer; or
false to disable it
EngineException - if an error
occurred during the modification of the text buffer presence; or if you
don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)isTextBufferEnabled(),
flush(),
clearBuffer()
public boolean isTextBufferEnabled()
throws EngineException
true if the text buffer is enabled; or
false if it is disabled
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)enableTextBuffer(boolean),
flush(),
clearBuffer()
public void print(Template template)
throws TemplateException,
EngineException
processTemplate(Template) method.
template - the template that will be printed
TemplateException - if an
error occurs during the retrieval of the template content
EngineException - if an error
occurs during the output of the template content; or if you don't have
access to the request data (eg. you're inside a child trigger); or if
there's no active element context (eg. you're using this method inside
the constructor instead of inside the initialize() method)print(Object),
processTemplate(Template)
public List<String> processTemplate(Template template)
throws TemplateException,
EngineException
This performs the following value replacements if they haven't already been set.
Each template type can have a value encoder attached to it (for instance a HTML encoder to replace non-ascii characters with the appropriate entities). All variable content that is handled in this method will be encoded before being set in the template.
OGNL:ROLEUSER:valueid
| These scripted block value tags will be processed according to the
active element context.
For example: Will display ' |
EXIT:QUERY:exitname
| Will be replaced with the URL that links to the target of the named exit. The state will be carried around according to the currently set outputs. |
EXIT:FORM:exitname
| Will be replaced with the URL that links to the target of the named
exit. No state information will be added to the URL. The
EXIT:PARAMS value tag should be put at the location where
hidden form parameters are allowed.
|
EXIT:PARAMS:exitname
| Will be replaced by the hidden form parameters that are need to
carry the state around according to the currently set outputs. This tag
goes hand-in-hand with the EXIT:FORM tag.
|
SUBMISSION:QUERY:submissionname
| Will be replaced with the URL that sends the named submission to currently the active element. The state will be carried around according to the currently set inputs. |
SUBMISSION:FORM:submissionname
| Will be replaced with the URL that sends the named submission to
currently the active element. No state information will be added to the
URL. The SUBMISSION:PARAMS value tag should be put at the
location where hidden form parameters are allowed.
|
SUBMISSION:PARAMS:submissionname
| Will be replaced by the hidden form parameters that are need to
carry the state around according to the currently set inputs. This tag
goes hand-in-hand with the SUBMISSION:FORM tag.
|
PARAM:name
| Will be replaced with the encoded content of the named submission parameter. |
INPUT:name
| Will be replaced with the encoded content of the named input. |
OUTPUT:name
| Will be replaced with the encoded content of the named output. |
INCOOKIE:name
| Will be replaced with the encoded content of the named incookie. |
OUTCOOKIE:nam
| Will be replaced with the encoded content of the named outcookie. |
WEBAPP:ROOTURL
| Will be replaced with the absolute root URL of the web application. This is typically used in a <base href=""> tag. All URLs can then be relative according to this root URL and the application can be used anywhere and with any web application name. |
| automated form building for submission beans | see FormBuilder
|
template - the template instance that needs to be processed
TemplateException - if an
error occurs during the manipulation of the template
EngineException - if an error
occurs during the retrieval of the values from the current element
context, or during the output of the template content; or if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void print(Object value)
throws EngineException
String.valueOf(value) call.
value - the object that will be output
EngineException - if an error
occurs during the output of the content; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public OutputStream getOutputStream()
throws EngineException
Note that the text output is written to the same output stream. Of course, when the text buffer is active this only happen at the end of the request.
EngineException - if an error
occurs during the creation of the output stream; or if you don't have
access to the request data (eg. you're inside a child trigger); or if
there's no active element context (eg. you're using this method inside
the constructor instead of inside the initialize() method)
public void clearBuffer()
throws EngineException
If no text buffer is active, this method doesn't do anything.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)isTextBufferEnabled(),
enableTextBuffer(boolean),
flush()
public void flush()
throws EngineException
All text in the active buffer will be sent to the client and the buffer will be empty again, if no text buffer is enabled only the output stream will be flushed.
EngineException - if an error
occurs during the output of the content; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)isTextBufferEnabled(),
enableTextBuffer(boolean),
clearBuffer()
public Site getSite()
throws EngineException
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
public ElementDeployer getDeployer()
throws EngineException
null if no deployment class has been declared
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)getDeploymentClass(),
setDeploymentClass(Class)
public ElementInfo getElementInfo()
throws EngineException
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
public String getSourceName()
throws EngineException
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
public String getDeclarationName()
throws EngineException
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
public ElementInfo getTarget()
throws EngineException
This can be different from the current element due to precedence, behavioural inheritance, child triggers, element embedding, ...
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public ElementSupport getEmbeddingElement()
throws EngineException
null if this element is not embedded
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedValue(),
hasEmbedData(),
getEmbedData(),
getEmbedProperties(),
isEmbedded()
public Template getEmbeddingTemplate()
throws EngineException
null if this element is not embedded
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingElement(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedValue(),
hasEmbedData(),
getEmbedData(),
getEmbedProperties(),
isEmbedded()
public String getEmbedDifferentiator()
throws EngineException
null if this embedded element didn't have a differentiator
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
hasEmbedValue(),
getEmbedValue(),
hasEmbedData(),
getEmbedData(),
getEmbedProperties(),
isEmbedded()
public boolean hasEmbedValue()
throws EngineException
true if the value has content; or
false otherwise
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
getEmbedValue(),
hasEmbedData(),
getEmbedData(),
getEmbedProperties(),
isEmbedded()
public String getEmbedValue()
throws EngineException
For example:
<!--V 'ELEMENT:my.element'-->this is the embed value<!--/V-->
Will return:
this is the embed value
Note that when you have several embedded elements in the same template with the same element id, you have to use embedded element differentiators if you want to provide different embed values. For example:
<!--V 'ELEMENT:my.element:differentiator1'-->this is the first embed value<!--/V--> <!--V 'ELEMENT:my.element:differentiator2'-->this is the second embed value<!--/V-->
null if no default value was provided or if the current element is not embedded
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedData(),
hasEmbedData(),
getEmbedProperties(),
isEmbedded()
public boolean hasEmbedData()
throws EngineException
true if data was passed on; or
false otherwise
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedValue(),
getEmbedData(),
getEmbedProperties(),
isEmbedded()
public Object getEmbedData()
throws EngineException
null if no data was provided or if the current element is not embedded
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
getEmbedValue(),
hasEmbedValue(),
hasEmbedData(),
getEmbedProperties(),
isEmbedded()
public Properties getEmbedProperties()
throws EngineException
getEmbedValue() for more information about embed values).
The content of the embed value will be parsed as a property list
according to the format described in Properties.load(java.io.InputStream).
For instance:
<!--V 'ELEMENT:my.element'--> key1 = value1 key2 = value1 <!--/V-->
Will return a property list where the key 'key1' is
associated to 'value1' and 'key2' to 'value2'.
null if no default value was provided, if the current element is not embedded
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedValue(),
hasEmbedData(),
isEmbedded()
public boolean isEmbedded()
throws EngineException
true if this element is embedded; or
false otherwise
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getEmbeddingTemplate(),
getEmbeddingElement(),
getEmbedDifferentiator(),
hasEmbedValue(),
getEmbedValue(),
hasEmbedData(),
getEmbedProperties()
public boolean hasProperty(String name)
throws EngineException
name - the name of the property
true if the element contains the property; or
false otherwise
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
getPropertyString(String, String),
isPropertyEmpty(String)
public Object getProperty(String name)
throws EngineException
Note that there are two types of properties, fixed value properties
(string literals) and dynamic value
properties (participant objects,
template instances, ...). The fixed value
is set during the declaration of the property and the dynamic value is
retrieved or instantiated each time the property value is obtained.
Property values can be of any type and class. If the resulting value
needs to be a certain standard type or primitive value, use the Convert helper class to perform the conversion
in-line. Since properties are very often used as string literals,
there's getPropertyString(String) method to make this more
convenient.
name - the name of the property
null if no such property exists
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)hasProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
getPropertyString(String, String),
isPropertyEmpty(String)
public Object getProperty(String name,
Object defaultValue)
throws EngineException
name - the name of the propertydefaultValue - the value that should be used if the
property can't be found
the default value if no such property exists
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)hasProperty(String),
getProperty(String),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
getPropertyString(String, String),
isPropertyEmpty(String)
public <T> T getPropertyTyped(String name,
Class<T> type)
This method has advantages over a regular cast, since it throws a meaningful exception to the user in case the type of the property value is not compatible.
name - the name of the propertytype - the class you want the property to be converted to
null if no such property exists
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
com.uwyn.rife.engine.exceptions.PropertyIncompatibleTypeException - if the type of the property value wasn't compatible with the requested typehasProperty(String),
getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
getPropertyString(String, String),
isPropertyEmpty(String)
public <T> T getPropertyTyped(String name,
Class<T> type,
T defaultValue)
This method has advantages over a regular cast, since it throws a meaningful exception to the user in case the type of the property value is not compatible.
name - the name of the propertytype - the class you want the property to be converted todefaultValue - the object that should be used if the
property can't be found
the default value if no such property exists
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)
com.uwyn.rife.engine.exceptions.PropertyIncompatibleTypeException - if the type of the property value wasn't compatible with the requested typehasProperty(String),
getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyString(String),
getPropertyString(String, String),
isPropertyEmpty(String)
public String getPropertyString(String name)
throws EngineException
name - the name of the property
null if no such property exists
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)hasProperty(String),
getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String, String),
isPropertyEmpty(String)
public String getPropertyString(String name,
String defaultValue)
throws EngineException
name - the name of the propertydefaultValue - the string literal that should be used if the
property can't be found
the default value if no such property exists or when the resulting string is empty
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)hasProperty(String),
getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
isPropertyEmpty(String)
public boolean isPropertyEmpty(String name)
throws EngineException
name - the name of the property
true if the property is empty; or
false otherwise
EngineException - if the
element information hasn't been provided yet (eg. you're using this
method inside the constructor instead of inside the initialize() method)hasProperty(String),
getProperty(String),
getProperty(String, Object),
getPropertyTyped(String, Class),
getPropertyTyped(String, Class, Object),
getPropertyString(String),
getPropertyString(String, String)
public <BeanType> BeanType getNamedInputBean(String name)
throws EngineException
This bean is not serialized or deserialized, each property corresponds to an input and is individually sent by the client.
name - the name of the input bean
EngineException - if no input
bean is known with this name; or if an error occurred during the
instantiation of the bean; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public <BeanType> BeanType getInputBean(Class<BeanType> beanClass)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to an input and is individually sent by the client.
beanClass - the class of the input bean
EngineException - if an error
occurred during the instantiation of the bean; or if you don't have
access to the request data (eg. you're inside a child trigger); or if
there's no active element context (eg. you're using this method inside
the constructor instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public <BeanType> BeanType getInputBean(Class<BeanType> beanClass,
String prefix)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to an input and is individually sent by the client.
beanClass - the class of the input beanprefix - the prefix that will be put in front of each property
name
EngineException - if an error
occurred during the instantiation of the bean; or if you don't have
access to the request data (eg. you're inside a child trigger); or if
there's no active element context (eg. you're using this method inside
the constructor instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInput(String),
getInput(String, String),
getInputValues(String)
public boolean hasInputValue(String name)
throws EngineException
name - the name of the input
true if the input has a value; or
false otherwise
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public boolean isInputEmpty(String name)
throws EngineException
name - the name of the input
true if the input has no value or when the value
is empty; or
false otherwise
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public String getInput(String name)
throws EngineException
name - the name of the input
null if no value is present for this input
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String, String),
getInputValues(String)
public String getInput(String name,
String defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInputValues(String)
public <TargetType extends Serializable> TargetType getInputSerializable(String name)
throws EngineException
name - the name of the input
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInputValues(String)
public <TargetType extends Serializable> TargetType getInputSerializable(String name,
TargetType defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInputValues(String)
public Date getInputDate(String name)
throws EngineException
name - the name of the input
null if the input didn't have a value
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public Date getInputDate(String name,
Date defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public String[] getInputValues(String name)
throws EngineException
name - the name of the input
null if no input values are present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String)
public boolean getInputBoolean(String name)
throws EngineException
name - the name of the input
false if no input value is present or if the input
value is not a valid boolean
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public boolean getInputBoolean(String name,
boolean defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public int getInputInt(String name)
throws EngineException
name - the name of the input
0 if no input value is present or if the input value is
not a valid integer
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public int getInputInt(String name,
int defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public long getInputLong(String name)
throws EngineException
name - the name of the input
0L if no input value is present or if the input value
is not a valid long
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public long getInputLong(String name,
long defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public double getInputDouble(String name)
throws EngineException
name - the name of the input
0.0d if no input value is present or if the input value
is not a valid double
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public double getInputDouble(String name,
double defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public float getInputFloat(String name)
throws EngineException
name - the name of the input
0.0f if no input value is present or if the input value
is not a valid float
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public float getInputFloat(String name,
float defaultValue)
throws EngineException
name - the name of the inputdefaultValue - the default value that will be used when no input
value is present
the default value if no input value is present
EngineException - if no input
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)hasInputValue(String),
isInputEmpty(String),
getNamedInputBean(String),
getInputBean(Class),
getInputBean(Class, String),
getInput(String),
getInput(String, String),
getInputValues(String)
public Collection<String> selectInputParameter(Template template,
String name,
String[] values)
throws EngineException
The actual logic is performed by the selectParameter(Template, String, String[]) method. This method only
prefixes the parameter name with the INPUT: literal, which
is the syntax that is used to be able to handle automatic population
correctly for each value type (inputs or submission parameters).
This method is automatically called during the print(Template) for all the inputs and values that this element
received. You should thus only call it explicitly if you need it to be
executed with custom values.
template - the template instance where the selection should happenname - the name of the inputvalues - the values that should selected or checked
null, when no values are set an
empty list is returned
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)selectParameter(Template, String, String[]),
selectSubmissionParameter(Template, String, String[])
public void setOutput(String name,
String value)
throws EngineException
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
String[] values)
throws EngineException
name - the name of the outputvalues - the values that have to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
boolean value)
throws EngineException
boolean.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
char value)
throws EngineException
char.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
char[] value)
throws EngineException
chars that
will be concatenated to a String.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
double value)
throws EngineException
double.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
float value)
throws EngineException
float.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
int value)
throws EngineException
int.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
long value)
throws EngineException
long.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutput(String name,
Object value)
throws EngineException
object. The object
will be converted to its String representation.
name - the name of the outputvalue - the value that has to be set
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
String value)
throws EngineException
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValues(String name,
String[] values)
throws EngineException
name - the name of the outputvalues - the values that have to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
boolean value)
throws EngineException
boolean value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
char value)
throws EngineException
char value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
char[] value)
throws EngineException
chars to the current values
of an output.
name - the name of the outputvalue - the values that have to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
double value)
throws EngineException
double value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
float value)
throws EngineException
float value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
int value)
throws EngineException
int value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
long value)
throws EngineException
long value to the current values of an output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void addOutputValue(String name,
Object value)
throws EngineException
object value to the current values of an
output.
name - the name of the outputvalue - the value that has to be added
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setNamedOutputBean(String name,
Object bean)
throws EngineException
This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.
name - the name of the output beanbean - the bean instance that should be used to set the outputs
EngineException - if no output
bean is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutputBean(Object bean)
throws EngineException
This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.
bean - the bean instance that should be used to set the outputs
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setNamedOutputBean(String, Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void setOutputBean(Object bean,
String prefix)
throws EngineException
This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.
bean - the bean instance that should be used to set the outputsprefix - the prefix that will be put in front of each property
name
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void clearOutput(String name)
throws EngineException
name - the name of the output
EngineException - if no output
is known with this name; if no output is known with this name; or if
you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void clearNamedOutputBean(String name)
throws EngineException
name - the name of the output bean
EngineException - if no output
bean is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearOutputBean(Class),
clearOutputBean(Class, String),
getOutput(String)
public void clearOutputBean(Class beanClass)
throws EngineException
beanClass - the class of the output bean
EngineException - if no output
bean is known with this name; if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class, String),
getOutput(String)
public void clearOutputBean(Class beanClass,
String prefix)
throws EngineException
beanClass - the class of the output beanprefix - the prefix that will be put in front of each property
name
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
getOutput(String)
public String[] getOutput(String name)
throws EngineException
name - the name of the output
null if the output couldn't be found.
EngineException - if no output
is known with this name; if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setNamedOutputBean(String, Object),
setOutputBean(Object),
setOutputBean(Object, String),
setOutput(String, String),
setOutput(String, String[]),
addOutputValue(String, String),
addOutputValues(String, String[]),
clearOutput(String),
clearNamedOutputBean(String),
clearOutputBean(Class),
clearOutputBean(Class, String)
public boolean hasCookie(String name)
throws EngineException
name - the name of the cookie
true if the cookie was present; or
false otherwise
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public Cookie getCookie(String name)
throws EngineException
name - the name of the cookie.
null if no such cookie is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public String getCookieValue(String name)
throws EngineException
name - the name of the cookie
null if no such cookie is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public Map<String,String> getCookieValues()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
setCookie(Cookie)
public String getCookieValue(String name,
String defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public boolean getCookieValueBoolean(String name)
throws EngineException
name - the name of the cookie
false if no cookie value is present or if the cookie
value is not a valid boolean
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public boolean getCookieValueBoolean(String name,
boolean defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public int getCookieValueInt(String name)
throws EngineException
name - the name of the cookie
0 if no cookie value is present or if the cookie value
is not a valid integer
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public int getCookieValueInt(String name,
int defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public long getCookieValueLong(String name)
throws EngineException
name - the name of the cookie
0L if no cookie value is present or if the cookie value
is not a valid long
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public long getCookieValueLong(String name,
long defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public double getCookieValueDouble(String name)
throws EngineException
name - the name of the cookie
0.0d if no cookie value is present or if the cookie
value is not a valid double
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public double getCookieValueDouble(String name,
double defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public float getCookieValueFloat(String name)
throws EngineException
name - the name of the cookie
0.0f if no cookie value is present or if the cookie
value is not a valid float
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public float getCookieValueFloat(String name,
float defaultValue)
throws EngineException
name - the name of the cookiedefaultValue - the default value that will be used when no cookie
value is present
the default value if no cookie value is present
EngineException - if no
incookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public void setCookie(Cookie cookie)
throws EngineException
Cookies are handles outside of the web engine's data flow management. They are preserved by the browser and are automatically provided at each request.
cookie - the cookie instance that will be set
EngineException - if no
outcookie is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasCookie(String),
getCookie(String),
getCookieValue(String),
getCookieValue(String, String),
getCookieValues(),
setCookie(Cookie)
public String getContinuationId()
throws EngineException
null if no continuation is active
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger)
public CharSequence getExitQueryUrl(String name)
throws EngineException
name - the name of the exit
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitQueryUrl(String name,
String pathinfo)
throws EngineException
name - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitQueryUrl(String name,
String[] outputValues)
throws EngineException
name - the name of the exitoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitQueryUrl(String name,
String pathinfo,
String[] outputValues)
throws EngineException
This will take the current element context into account with the available outputs, global variables, ... and generate an URL that persists the data state according to the declared site structure.
The output values are provided as an array of strings that should be
structured in pairs. For example, if these output values should be
used: output1:value1 and output2:value2,
you should define the following string array:
new String[] {"output1", "value1", "output2", "value2"}
The generated URL with not contain a scheme, host or port. It will begin with the path part and be absolute, starting with the web application's root URL.
name - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitFormUrl(String name)
throws EngineException
name - the name of the exit
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitFormUrl(String name,
String pathinfo)
throws EngineException
This will take the current element context into account with the available outputs, global variables, ... and generate an URL that persists the data state according to the declared site structure.
The generated URL with not contain a scheme, host or port. It will begin with the path part and be absolute, starting with the web application's root URL.
This method goes together with the getExitFormParameters(String, String[]) method since the state is
tranferred as hidden form parameters that are part of the form.
name - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitFormParameters(String name)
throws EngineException
name - the name of the exit
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitFormParameters(String name,
String[] outputValues)
throws EngineException
This will take the current element context into account with the available outputs, global variables, ... and generate hidden XHTML form parameters that persist the data state according to the declared site structure.
The output values are provided as an array of strings that should be
structured in pairs. For example, if these output values should be
used: output1:value1 and output2:value2,
you should define the following string array:
new String[] {"output1", "value1", "output2", "value2"}
This method goes together with the getExitFormUrl(String, String) method since the URL needs to be
provided in the action attribute of the form.
name - the name of the exitoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParametersJavascript(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public CharSequence getExitFormParametersJavascript(String name,
String[] outputValues)
throws EngineException
This will take the current element context into account with the available outputs, global variables, ... and generate hidden XHTML form parameters that persist the data state according to the declared site structure.
The output values are provided as an array of strings that should be
structured in pairs. For example, if these output values should be
used: output1:value1 and output2:value2,
you should define the following string array:
new String[] {"output1", "value1", "output2", "value2"}
This method goes together with the getExitFormUrl(String, String) method since the URL needs to be
provided in the action attribute of the form.
name - the name of the exitoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitQuery(Template template,
String name)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exit
TemplateException - if the
template doesn't contain the value identifier
EXIT:QUERY:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitQuery(Template template,
String name,
String pathinfo)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
TemplateException - if the
template doesn't contain the value identifier
EXIT:QUERY:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitQuery(Template template,
String name,
String[] outputValues)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exitoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
TemplateException - if the
template doesn't contain the value identifier
EXIT:QUERY:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitQuery(Template template,
String name,
String pathinfo,
String[] outputValues)
throws TemplateException,
EngineException
The URL will be generated by calling the getExitQueryUrl(String, String, String[]) method and it will be set
to the value identifier with the syntax
EXIT:QUERY:exitname.
Template content that is outputted with the
#print(Template) method will automatically be scanned for
value identifiers with this syntax and the exit query URLs will
generated. You should only use this method if you need a query URL to
be generated in a certain context.
template - the template that will be used to set the valuename - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
TemplateException - if the
template doesn't contain the value identifier
EXIT:QUERY:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitForm(Template, String, String)
public void setExitForm(Template template,
String name)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exit
TemplateException - if the
template doesn't contain the value identifiers
EXIT:FORM:exitname and EXIT:PARAMS:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitForm(Template template,
String name,
String pathinfo)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
TemplateException - if the
template doesn't contain the value identifiers
EXIT:FORM:exitname and EXIT:PARAMS:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitForm(Template template,
String name,
String[] outputValues)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the exitoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
TemplateException - if the
template doesn't contain the value identifiers
EXIT:FORM:exitname and EXIT:PARAMS:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[]),
setExitForm(Template, String, String)
public void setExitForm(Template template,
String name,
String pathinfo,
String[] outputValues)
throws TemplateException,
EngineException
The URL will be generated by calling the getExitFormUrl(String, String) and getExitFormParameters(String, String[]) methods and it will be set
the results to the value identifiers with the syntax
EXIT:FORM:exitname and EXIT:PARAMS:exitname.
Template content that is outputted with the
#print(Template) method will automatically be scanned for
value identifiers with this syntax and the exit forms URLs and
parameters will generated. You should only use this method if you need
these to be generated in a certain context.
template - the template that will be used to set the valuename - the name of the exitpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedoutputValues - an array of string pairs that will be used to
override the current output values; or null if no output
values should be overridden
TemplateException - if the
template doesn't contain the value identifiers
EXIT:FORM:exitname and EXIT:PARAMS:exitname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getExitQueryUrl(String, String, String[]),
getExitFormUrl(String, String),
getExitFormParameters(String, String[]),
setExitQuery(Template, String, String, String[])
public Collection<String> selectParameter(Template template,
String name,
String[] values)
This method will check the template for certain value tags and set
them to the correct attributes according to the name and the provided
values in this method. This is dependent on the template type and
currently only makes sense for enginehtml,
enginexhtml, html and xhtml
templates.
For example for select boxes, consider the name 'colors',
the values 'blue' and 'red', and the
following XHTML template excerpt:
<select name="colors"> <option value="blue"[!V 'colors:blue:SELECTED'][!/V]>Blue</option> <option value="orange"[!V 'colors:orange:SELECTED'][!/V]>Orange</option> <option value="red"[!V 'colors:red:SELECTED'][!/V]>Red</option> <option value="green"[!V colors:green:SELECTED''][!/V]>Green</option> </select>
the result will then be:
<select name="colors"> <option value="blue" selected="selected">Blue</option> <option value="orange">Orange</option> <option value="red" selected="selected">Red</option> <option value="green">Green</option> </select>
For example for radio buttons, consider the name 'sex',
the value 'male' and the following XHTML template excerpt:
<input type="radio" name="sex" value="male"[!V 'sex:male:CHECKED'][!/V] /> <input type="radio" name="sex" value="female"[!V 'sex:female:CHECKED'][!/V] />
the result will then be:
<input type="radio" name="sex" value="male" checked="checked" /> <input type="radio" name="sex" value="female" />
For example for checkboxes, consider the name 'active',
the value 'true' and the following XHTML template excerpt:
<input type="checkbox" name="active"[!V 'active:CHECKED'][!/V] /> <input type="checkbox" name="senditnow"[!V 'senditnow:CHECKED'][!/V] />
the result will then be:
<input type="checkbox" name="active" checked="checked" /> <input type="checkbox" name="senditnow" />
template - the template instance where the selection should happenname - the name of the parametervalues - the values that should selected or checked
null, when no values are set an
empty list is returned
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)selectInputParameter(Template, String, String[]),
selectSubmissionParameter(Template, String, String[])
public void generateForm(Template template,
Object beanInstance)
throws EngineException
template - the template instance where the generation should
happenbeanInstance - the instance of the bean that should be used to
generate the form
EngineException - if errors
occurred during the introspection of the bean instance; or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)FormBuilder,
generateForm(Template, Object, String),
generateEmptyForm(Template, Class, String),
removeForm(Template, Class)
public void generateForm(Template template,
Object beanInstance,
String prefix)
throws EngineException
This method delegates all logic to the FormBuilder.generateForm(Template, Object, Map, String)
method of the provided template instance.
template - the template instance where the generation should
happenbeanInstance - the instance of the bean that should be used to
generate the formprefix - the prefix that will be prepended to all bean property
names
EngineException - if errors
occurred during the introspection of the bean instance; or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)FormBuilder,
generateEmptyForm(Template, Class, String),
removeForm(Template, Class)
public void generateEmptyForm(Template template,
Class beanClass)
throws EngineException
template - the template instance where the generation should
happenbeanClass - the class of the bean that should be used to generate
the form
EngineException - if errors
occurred during the introspection of the bean; or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)FormBuilder,
generateForm(Template, Object, String),
generateEmptyForm(Template, Class, String),
removeForm(Template, Class)
public void generateEmptyForm(Template template,
Class beanClass,
String prefix)
throws EngineException
An 'empty' instance is an object that has been created by calling the default constructor of the bean class, without making any additional changes to it afterwards.
This method delegates all logic to the FormBuilder.generateForm(Template, Class, Map, String)
method of the provided template instance.
template - the template instance where the generation should
happenbeanClass - the class of the bean that should be used to generate
the formprefix - the prefix that will be prepended to all bean property
names
EngineException - if errors
occurred during the introspection of the bean; or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)FormBuilder,
generateForm(Template, Object, String),
removeForm(Template, Class)
public void removeForm(Template template,
Class beanClass)
throws EngineException
template - the template instance where the form should be removed
frombeanClass - the class of the bean that should be used to remove
the form
EngineException - if errors
occurred during the introspection of the bean; or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)FormBuilder,
generateForm(Template, Object, String),
generateEmptyForm(Template, Class, String),
removeForm(Template, Class)
public void removeForm(Template template,
Class beanClass,
String prefix)
throws EngineException
This method delegates all logic to the FormBuilder.removeForm(Template, Class, String)
method of the provided template instance.
template - the template instance where the form should be removed
frombeanClass - the class of the bean that should be used to remove
the formprefix - the prefix that will be prepended to all bean property
names
EngineException - if errors
occurred during the introspection of the bean; or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)FormBuilder,
generateForm(Template, Object, String),
generateEmptyForm(Template, Class, String)
public Collection<String> selectSubmissionParameter(Template template,
String name,
String[] values)
The actual logic is performed by the selectParameter(Template, String, String[]) method. This method only
prefixes the parameter name with the PARAM: literal, which
is the syntax that is used to be able to handle automatic population
correctly for each value type (inputs or submission parameters).
This method is automatically called during the print(Template) for all the inputs and values that this element
received. You should thus only call it explicitly if you need it to be
executed with custom values.
template - the template instance where the selection should happenname - the name of the parametervalues - the values that should selected or checked
null, when no values are set an
empty list is returned
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)selectParameter(Template, String, String[]),
selectInputParameter(Template, String, String[])
public Collection selectSubmissionParameter(Template template,
String name,
String value)
This is simply a convenience method that calls #selectSubmissionParameter(Template,
String, String[]) with a single value string array.
template - the template instance where the selection should happenname - the name of the parametervalue - the value that should selected or checked
null, when no values are set an
empty list is returned
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)selectParameter(Template, String, String[]),
selectInputParameter(Template, String, String[]),
selectSubmissionParameter(Template, String, String[])
public void setSubmissionBean(Template template,
Object beanInstance)
throws TemplateException,
EngineException
The data will be converted to strings and the template's encoder will be used to encode the string representations (for example, for HTML non-ascii characters will be replaced with HTML entities).
The identifiers of the values that will be filled in should have the following syntax:
PARAM:propertyName
template - the template instance that contains the values that
will be filled inbeanInstance - the bean instance whose property values will be set
TemplateException - when
errors occurred during the introspection of the bean instance
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)setSubmissionBean(Template, Object, boolean)
public void setSubmissionBean(Template template,
Object beanInstance,
boolean encode)
throws TemplateException,
EngineException
The identifiers of the values that will be filled in should have the following syntax:
PARAM:propertyName
template - the template instance that contains the values that
will be filled inbeanInstance - the bean instance whose property values will be setencode - true when the property values should be
encoded according to the template type; or
false otherwise
TemplateException - when
errors occurred during the introspection of the bean instance
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public <BeanType> BeanType getNamedSubmissionBean(String beanName)
throws EngineException
This bean is not serialized or deserialized, each property corresponds to a parameter and is individually sent by the client.
beanName - the name of the submission bean
null if no submission has been sent
EngineException - if no
submission bean is known with this name; or if an error occurred during
the instantiation of the bean; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public <BeanType> BeanType getNamedSubmissionBean(String submissionName,
String beanName)
throws EngineException
This bean is not serialized or deserialized, each property corresponds to a parameter and is individually sent by the client.
submissionName - the name of the submission beanbeanName - the name of the submission that contains the bean
null if the submission name doesn't correspond to the
sent submission
EngineException - if no
submission bean is known with this name; or if no submission is know
with the name; or if an error occurred during the instantiation or the
population of the bean; or if you don't have access to the request data
(eg. you're inside a child trigger); or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public <BeanType> BeanType getSubmissionBean(Class<BeanType> beanClass)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.
beanClass - the class of the submission bean
null if no submission has been sent
EngineException - if an error
occurred during the instantiation or the population of the bean; or if
you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public <BeanType> BeanType getSubmissionBean(Class<BeanType> beanClass,
String prefix)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.
beanClass - the class of the submission beanprefix - the prefix that will be put in front of each property
name
null if no submission has been sent
EngineException - if an error
occurred during the instantiation or the population of the bean; or if
you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public <BeanType> BeanType getSubmissionBean(String submissionName,
Class<BeanType> beanClass)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.
submissionName - the name of the submissionbeanClass - the class of the submission bean
null if the submission name doesn't correspond to the
sent submission
EngineException - if an error
occurred during the instantiation or the population of the bean; or if
you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public <BeanType> BeanType getSubmissionBean(String submissionName,
Class<BeanType> beanClass,
String prefix)
throws EngineException
This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.
submissionName - the name of the submissionbeanClass - the class of the submission beanprefix - the prefix that will be put in front of each property
name
null if the submission name doesn't correspond to the
sent submission
EngineException - if an error
occurred during the instantiation or the population of the bean; or if
you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public void fillSubmissionBean(Object bean)
throws EngineException
bean - the submission bean instance that will be filled
EngineException - if an error
occurred during the population of the bean; or if you don't have access
to the request data (eg. you're inside a child trigger); or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public void fillSubmissionBean(String submissionName,
Object bean)
throws EngineException
submissionName - the name of the submissionbean - the submission bean instance that will be filled
EngineException - if an error
occurred during the population of the bean; or if you don't have access
to the request data (eg. you're inside a child trigger); or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public void fillSubmissionBean(Object bean,
String prefix)
throws EngineException
bean - the submission bean instance that will be filledprefix - the prefix that will be put in front of each property
name
EngineException - if an error
occurred during the population of the bean; or if you don't have access
to the request data (eg. you're inside a child trigger); or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public void fillSubmissionBean(String submissionName,
Object bean,
String prefix)
throws EngineException
submissionName - the name of the submissionbean - the submission bean instance that will be filledprefix - the prefix that will be put in front of each property
name
EngineException - if an error
occurred during the population of the bean; or if you don't have access
to the request data (eg. you're inside a child trigger); or if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public boolean hasSubmission()
throws EngineException
true if a submission was sent to this element; and
false otherwise
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)hasSubmission(String),
getSubmission()
public boolean hasSubmission(String submissionName)
throws EngineException
submissionName - the name of the submission
true if the submission was sent to this element;
and
false otherwise
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)hasSubmission(),
getSubmission()
public String getSubmission()
throws EngineException
null if no submission was sent
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)hasSubmission(),
hasSubmission(String)
public boolean hasParameterValue(String name)
throws EngineException
name - the name of the parameter
true if the parameter has a value; or
false otherwise
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public boolean isParameterEmpty(String name)
throws EngineException
name - the name of the parameter
true if the parameter is empty; or
false otherwise
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public String getParameter(String name)
throws EngineException
name - the name of the parameter
null if no value is present for this parameter
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public String getParameter(String name,
String defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public ArrayList<String> getParameterNames()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterNames(String)
public ArrayList<String> getParameterNames(String regexp)
throws EngineException
regexp - the regular expression that will be used to filter the
parameter names
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterNames()
public String[] getParameterValues(String name)
throws EngineException
name - the name of the parameter
null if no parameter values are present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterNames(),
getParameterNames(String)
public boolean getParameterBoolean(String name)
throws EngineException
name - the name of the parameter
false if no parameter value is present or if the
parameter value is not a valid boolean
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public boolean getParameterBoolean(String name,
boolean defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public int getParameterInt(String name)
throws EngineException
name - the name of the parameter
0 if no parameter value is present or if the parameter
value is not a valid integer
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public int getParameterInt(String name,
int defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public long getParameterLong(String name)
throws EngineException
name - the name of the parameter
0L if no parameter value is present or if the parameter
value is not a valid long
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public long getParameterLong(String name,
long defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public double getParameterDouble(String name)
throws EngineException
name - the name of the parameter
0.0d if no parameter value is present or if the
parameter value is not a valid double
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public double getParameterDouble(String name,
double defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public float getParameterFloat(String name)
throws EngineException
name - the name of the parameter
0.0f if no parameter value is present or if the
parameter value is not a valid float
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public float getParameterFloat(String name,
float defaultValue)
throws EngineException
name - the name of the parameterdefaultValue - the default value that will be used when no
parameter value is present
the default value if no parameter value is present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public int[] getParameterIntValues(String name)
throws EngineException
name - the name of the parameter
null if no parameter values are present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public long[] getParameterLongValues(String name)
throws EngineException
name - the name of the parameter
null if no parameter values are present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public float[] getParameterFloatValues(String name)
throws EngineException
name - the name of the parameter
null if no parameter values are present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public double[] getParameterDoubleValues(String name)
throws EngineException
name - the name of the parameter
null if no parameter values are present
EngineException - if no
parameter is known with this name; or if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getNamedSubmissionBean(String, String),
getSubmissionBean(String, Class, String),
fillSubmissionBean(String, Object, String),
hasParameterValue(String),
isParameterEmpty(String),
getParameter(String),
getParameter(String, String),
getParameterValues(String),
getParameterNames(),
getParameterNames(String)
public ArrayList<String> getUploadedFileNames(String regexp)
throws EngineException
regexp - the regular expression that will be used to filter the
file names
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getUploadedFileNames(),
hasUploadedFile(String),
isFileEmpty(String),
getUploadedFile(String),
getUploadedFiles(String)
public ArrayList<String> getUploadedFileNames()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getUploadedFileNames(String),
hasUploadedFile(String),
isFileEmpty(String),
getUploadedFile(String),
getUploadedFiles(String)
public boolean hasUploadedFile(String name)
throws EngineException
name - the name of the file, as declared in the submission
true if the file was uploaded; or
false otherwise
EngineException - if no file
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)getUploadedFileNames(String),
getUploadedFileNames(),
isFileEmpty(String),
getUploadedFile(String),
getUploadedFiles(String)
public boolean isFileEmpty(String name)
throws EngineException
name - the name of the file, as declared in the submission
true if the file wasn't uploaded or empty; or
false otherwise
EngineException - if no file
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)getUploadedFileNames(String),
getUploadedFileNames(),
hasUploadedFile(String),
getUploadedFile(String),
getUploadedFiles(String)
public UploadedFile getUploadedFile(String name)
throws EngineException
name - the name of the file, as declared in the submission
null if no file was uploaded
EngineException - if no file
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)getUploadedFileNames(String),
getUploadedFileNames(),
hasUploadedFile(String),
isFileEmpty(String),
getUploadedFiles(String)
public UploadedFile[] getUploadedFiles(String name)
throws EngineException
name - the name of the file, as declared in the submission
null if no files were uploaded for that name
EngineException - if no file
is known with this name; or if you don't have access to the request
data (eg. you're inside a child trigger); or if there's no active
element context (eg. you're using this method inside the constructor
instead of inside the initialize() method)getUploadedFileNames(String),
getUploadedFileNames(),
hasUploadedFile(String),
isFileEmpty(String),
getUploadedFile(String)
public CharSequence getSubmissionQueryUrl(String name)
throws EngineException
name - the name of the submission
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionQueryUrl(String name,
String pathinfo)
throws EngineException
name - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionQueryUrl(String name,
String[] parameterValues)
throws EngineException
name - the name of the submissionparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionQueryUrl(String name,
String pathinfo,
String[] parameterValues)
throws EngineException
This will take the current element context into account with the available inputs, global variables, ... and generate an URL that persists the data state according to the declared site structure.
The default parameter values are provided as an array of strings
that should be structured in pairs. For example, if these output values
should be used: param1:value1 and
param2:value2, you should define the
following string array:
new String[] {"param1", "value1", "param2", "value2"}
The generated URL with not contain a scheme, host or port. It will begin with the path part and be absolute, starting with the web application's root URL.
name - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionFormUrl()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionFormUrl(String pathinfo)
throws EngineException
This will take the current element context into account with the available inputs, global variables, ... and generate an URL that persists the data state according to the declared site structure.
The generated URL with not contain a scheme, host or port. It will begin with the path part and be absolute, starting with the web application's root URL.
This method goes together with the getSubmissionFormParameters(String, String[]) method since the state
is tranferred as hidden form parameters that are part of the form.
pathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionFormParameters(String name)
throws EngineException
name - the name of the submission
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionFormParameters(String name,
String[] parameterValues)
throws EngineException
This will take the current element context into account with the available inputs, global variables, ... and generate hidden XHTML form parameters that persist the data state according to the declared site structure.
The default parameter values are provided as an array of strings
that should be structured in pairs. For example, if these output values
should be used: param1:value1 and
param2:value2, you should define the
following string array:
new String[] {"param1", "value1", "param2", "value2"}
This method goes together with the getSubmissionFormUrl(String) method since the URL needs to be
provided in the action attribute of the form.
name - the name of the submissionparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParametersJavascript(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public CharSequence getSubmissionFormParametersJavascript(String name,
String[] parameterValues)
throws EngineException
This will take the current element context into account with the available inputs, global variables, ... and generate hidden XHTML form parameters that persist the data state according to the declared site structure.
The default parameter values are provided as an array of strings
that should be structured in pairs. For example, if these output values
should be used: param1:value1 and
param2:value2, you should define the
following string array:
new String[] {"param1", "value1", "param2", "value2"}
This method goes together with the getSubmissionFormUrl(String) method since the URL needs to be
provided in the action attribute of the form.
name - the name of the submissionparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionQuery(Template template,
String name)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submission
TemplateException - if the
template doesn't contain the value identifier
SUBMISSION:QUERY:submissionname
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionQuery(Template template,
String name,
String pathinfo)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
TemplateException - if the
template doesn't contain the value identifier
SUBMISSION:QUERY:submissionname
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionQuery(Template template,
String name,
String[] parameterValues)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submissionparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
TemplateException - if the
template doesn't contain the value identifier
SUBMISSION:QUERY:submissionname
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionQuery(Template template,
String name,
String pathinfo,
String[] parameterValues)
throws TemplateException,
EngineException
The URL will be generated by calling the getSubmissionQueryUrl(String, String, String[]) method and it will be
set to the value identifier with the syntax
SUBMISSION:QUERY:submissionname.
Template content that is outputted with the
#print(Template) method will automatically be scanned for
value identifiers with this syntax and the submission query URLs will
generated. You should only use this method if you need a submission URL
to be generated in a certain context.
template - the template that will be used to set the valuename - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
TemplateException - if the
template doesn't contain the value identifier
SUBMISSION:QUERY:submissionname
EngineException - if no
submission is known with this name; if you don't have access to the
request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionForm(Template template,
String name)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submission
TemplateException - if the
template doesn't contain the value identifiers
SUBMISSION:FORM:submissionname and
SUBMISSION:PARAMS:submissionname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionForm(Template template,
String name,
String pathinfo)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appended
TemplateException - if the
template doesn't contain the value identifiers
SUBMISSION:FORM:submissionname and
SUBMISSION:PARAMS:submissionname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionForm(Template template,
String name,
String[] parameterValues)
throws TemplateException,
EngineException
template - the template that will be used to set the valuename - the name of the submissionparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
TemplateException - if the
template doesn't contain the value identifiers
SUBMISSION:FORM:submissionname and
SUBMISSION:PARAMS:submissionname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[]),
setSubmissionForm(Template, String, String)
public void setSubmissionForm(Template template,
String name,
String pathinfo,
String[] parameterValues)
throws TemplateException,
EngineException
The URL will be generated by calling the getSubmissionFormUrl(String) and getSubmissionFormParameters(String, String[]) methods and it will be
set the results to the value identifiers with the syntax
SUBMISSION:FORM:submissionname and
SUBMISSION:PARAMS:submissionname.
Template content that is outputted with the
#print(Template) method will automatically be scanned for
value identifiers with this syntax and the submission forms URLs and
parameters will generated. You should only use this method if you need
these to be generated in a certain context.
template - the template that will be used to set the valuename - the name of the submissionpathinfo - the pathinfo that will be appended; or
null if no pathinfo should be appendedparameterValues - an array of string pairs that will be used to
set default parameter values; or null if no default
parameter values should be used
TemplateException - if the
template doesn't contain the value identifiers
SUBMISSION:FORM:submissionname and
SUBMISSION:PARAMS:submissionname
EngineException - if no exit
is known with this name; if the exit hasn't got a destination element;
if you don't have access to the request data (eg. you're inside a child
trigger); or if there's no active element context (eg. you're using
this method inside the constructor instead of inside the initialize() method)getSubmissionQueryUrl(String, String, String[]),
getSubmissionFormUrl(String),
getSubmissionFormParameters(String, String[]),
setSubmissionQuery(Template, String, String, String[])
public void processEmbeddedElement(Template template,
String elementId)
throws TemplateException,
EngineException
Embedded elements are evaluated when value identifiers have the
following syntax: ELEMENT:elementId.
All embedded elements are automatically processed when the template is instantiated, so this method should only be called if you need to re-process an embedded element in a particular context.
template - the template that will be used to process the embedded
templateelementId - the identifier of the element
TemplateException - when an
error occurs during the template processing
EngineException - if no
element is known with that identifier; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)processEmbeddedElement(Template, String, Object),
processEmbeddedElement(Template, String, String),
processEmbeddedElement(Template, String, String, Object)
public void processEmbeddedElement(Template template,
String elementId,
Object data)
throws TemplateException,
EngineException
See processEmbeddedElement(Template, String) for more
information.
template - the template that will be used to process the embedded
templateelementId - the identifier of the elementdata - the data that will be available from within the embedded
element
TemplateException - when an
error occurs during the template processing
EngineException - if no
element is known with that identifier; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)processEmbeddedElement(Template, String),
processEmbeddedElement(Template, String, String),
processEmbeddedElement(Template, String, String, Object)
public void processEmbeddedElement(Template template,
String elementId,
String differentiator)
throws TemplateException,
EngineException
Embedded elements are evaluated when value identifiers have the
following syntax: ELEMENT:elementId:differentiator.
All embedded elements are automatically processed when the template is instantiated, so this method should only be called if you need to re-process an embedded element in a particular context.
template - the template that will be used to process the embedded
templateelementId - the identifier of the elementdifferentiator - the differentiator that will be used; or
null if no differentiator should be used
TemplateException - when an
error occurs during the template processing
EngineException - if no
element is known with that identifier; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)processEmbeddedElement(Template, String),
processEmbeddedElement(Template, String, Object),
processEmbeddedElement(Template, String, String, Object)
public void processEmbeddedElement(Template template,
String elementId,
String differentiator,
Object data)
throws TemplateException,
EngineException
See processEmbeddedElement(Template, String, String) for more
information.
template - the template that will be used to process the embedded
templateelementId - the identifier of the elementdifferentiator - the differentiator that will be used; ordata - the data that will be available from within the embedded
element
null if no differentiator should be used
TemplateException - when an
error occurs during the template processing
EngineException - if no
element is known with that identifier; or if you don't have access to
the request data (eg. you're inside a child trigger); or if there's no
active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)processEmbeddedElement(Template, String),
processEmbeddedElement(Template, String, Object),
processEmbeddedElement(Template, String, String)
public List<String> evaluateExpressionRoleUserTags(Template template,
String id)
throws TemplateException,
EngineException
ROLEUSER expression tags in a template.
The print(Template) method automatically evaluates all role
user expression tags. This method should thus only be called when you
need them to be evaluated in a specific context.
This block and value expression tag is evaluated through a method
that's not part of the Template class
since it only makes sense in an element context where a users can be
identified.
The value tags have the following syntax
LANGUAGE:ROLEUSER:identifier and the block tags have the
following syntax
LANGUAGE:ROLEUSER:identifier:[[ boolean_expression ]].
Below is an example of roleuser expression tags in use:
<!--V 'OGNL:ROLEUSER:role1'-->User is not in role "admin"<!--/V-->
<!--B 'OGNL:ROLEUSER:role1:[[ isInRole("admin") ]]'-->User is in role "admin"<!--/B-->
template - the template instance where the evaluation should
happenid - the block and the value identifier
TemplateException - when an
error occurs during the expression tags evaluation
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void exit(String name)
throws EngineException
This immediately breaks out of the element and notifies the engine that the next step of the flow must be looked up and executed.
name - the name of the exit
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exception; or there's no active element context (eg. you're
using this method inside the constructor instead of inside the initialize() method)
public void child()
throws EngineException
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exception; or you don't have access to the request data (eg.
you're inside a child trigger); or there's no active element context
(eg. you're using this method inside the constructor instead of inside
the initialize() method)
public void defer()
throws EngineException
If RIFE is being run as a filter, it will execute the next filter in the chain.
If RIFE is being run as a servlet, the status code 404: Not
Found will be sent to the client.
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exception; or you don't have access to the request data (eg.
you're inside a child trigger); or there's no active element context
(eg. you're using this method inside the constructor instead of inside
the initialize() method)
public void forward(String url)
throws EngineException
The response of the forwarded request will be sent the to original client, as if the request was sent directly to the forwarded URL.
url - the URL to which the request will be forwarded
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exception; or you don't have access to the request data (eg.
you're inside a child trigger); or there's no active element context
(eg. you're using this method inside the constructor instead of inside
the initialize() method)
public void redirect(String url)
throws EngineException
url - the URL to which the request will be redirected
EngineException - a runtime
exception that is used to immediately interrupt the execution, don't
catch this exception; or you don't have access to the request data (eg.
you're inside a child trigger); or there's no active element context
(eg. you're using this method inside the constructor instead of inside
the initialize() method)
public String getResponseCharacterEncoding()
throws EngineException
setContentType(java.lang.String) method, or
implicitly using the setResponseLocale(java.util.Locale) method. Explicit
specifications take precedence over implicit specifications. If no
character encoding has been specified, ISO-8859-1 is
returned.
See RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt) for more information about character encoding and MIME.
String specifying the name of the character
encoding, for example, UTF-8
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)#setResponseLocale
public void setContentLength(int length)
throws EngineException
length - an integer specifying the length of the content being
returned to the client; sets the Content-Length header
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void setContentType(String type)
throws EngineException
text/html;charset=UTF-8. The response's character encoding
is only set from the given content type if this method is called before
getWriter is called.
This method may be called repeatedly to change content type and
character encoding. This method has no effect if called after the
response has been committed. It does not set the response's character
encoding if it is called after getWriter has been called
or after the response has been committed.
Containers must communicate the content type and the character
encoding used for the servlet response's writer to the client if the
protocol provides a way for doing so. In the case of HTTP, the
Content-Type header is used.
type - a String specifying the MIME type of the
content
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setResponseLocale(java.util.Locale),
getOutputStream()
public void addHeader(String name,
String value)
throws EngineException
name - the name of the headervalue - the additional header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt)
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setHeader(java.lang.String, java.lang.String)
public void addDateHeader(String name,
long date)
throws EngineException
containsHeader method can be used to test for the presence
of a header before setting its value.
name - the name of the header to setdate - the assigned date value
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setDateHeader(java.lang.String, long)
public void addIntHeader(String name,
int value)
throws EngineException
name - the name of the headervalue - the assigned integer value
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setIntHeader(java.lang.String, int)
public boolean containsHeader(String name)
throws EngineException
name - the header name
true if the named response header has already been
set; or
false otherwise
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void sendError(int statusCode)
throws EngineException
If the response has already been committed, this method throws an IllegalStateException. After using this method, the response should be considered to be committed and should not be written to.
statusCode - the error status code
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)sendError(int, String)
public void sendError(int statusCode,
String message)
throws EngineException
If the response has already been committed, this method throws an IllegalStateException. After using this method, the response should be considered to be committed and should not be written to.
statusCode - the error status codemessage - the descriptive message
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)sendError(int)
public void sendRedirect(String location)
throws EngineException
If the response has already been committed, this method throws an IllegalStateException. After using this method, the response should be considered to be committed and should not be written to.
location - the redirect location URL
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void preventCaching()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public void setDateHeader(String name,
long date)
throws EngineException
containsHeader method can be used to test for the presence
of a header before setting its value.
name - the name of the header to setdate - the assigned date value
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)containsHeader(java.lang.String),
addDateHeader(java.lang.String, long)
public void setHeader(String name,
String value)
throws EngineException
containsHeader method can be used to test for the presence
of a header before setting its value.
name - the name of the headervalue - the header value If it contains octet string, it should be
encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)containsHeader(java.lang.String),
addHeader(java.lang.String, java.lang.String)
public void setIntHeader(String name,
int value)
throws EngineException
containsHeader method can be used to test for the
presence of a header before setting its value.
name - the name of the headervalue - the assigned integer value
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)containsHeader(java.lang.String),
addIntHeader(java.lang.String, int)
public void setStatus(int statusCode)
throws EngineException
sendError method should be used instead.
The container clears the buffer and sets the Location header, preserving cookies and other headers.
statusCode - the status code
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)sendError(int)
public void setResponseLocale(Locale locale)
throws EngineException
setContentType(java.lang.String) and the response hasn't been committed yet. If
the deployment descriptor contains a
locale-encoding-mapping-list element, and that element
provides a mapping for the given locale, that mapping is used.
Otherwise, the mapping from locale to character encoding is container
dependent.
This method may be called repeatedly to change locale and character
encoding. The method has no effect if called after the response has
been committed. It does not set the response's character encoding if it
is called after setContentType(java.lang.String) has been called with a charset
specification, or after the response has been committed.
Containers must communicate the locale and the character encoding
used for the servlet response's writer to the client if the protocol
provides a way for doing so. In the case of HTTP, the locale is
communicated via the Content-Language header, the
character encoding as part of the Content-Type header for
text media types. Note that the character encoding cannot be
communicated via HTTP headers if the servlet does not specify a content
type; however, it is still used to encode text written via the servlet
response's writer.
locale - the locale of the response
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)getResponseLocale(),
setContentType(java.lang.String)
public Locale getResponseLocale()
throws EngineException
setResponseLocale(java.util.Locale) method. Calls made to
setResponseLocale after the response is committed have no
effect. If no locale has been specified, the container's default locale
is returned.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)setResponseLocale(java.util.Locale)
public String getServerRootUrl()
throws EngineException
This includes the protocol, the server name and the server port, for
example: http://www.somehost.com:8080.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getWebappRootUrl()
throws EngineException
This includes the protocol, the server name, the server port and the
URL of RIFE's gateway, for example:
http://www.somehost.com:8080/my/webapp/.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getRequestCharacterEncoding()
throws EngineException
null if the request does not
specify a character encoding
String containing the name of the character
encoding; or
null if the request does not specify a character
encoding
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getContentType()
throws EngineException
null
if the type is not known. For HTTP servlets, same as the value of the
CGI variable CONTENT_TYPE.
String containing the name of the MIME type of
the request; or
null if the type is not known
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public long getDateHeader(String name)
throws EngineException
long value that represents a Date object. Use
this method with headers that contain dates, such as
If-Modified-Since.
The date is returned as the number of milliseconds since January 1, 1970 GMT. The header name is case insensitive.
If the request did not have a header of the specified name, this
method returns -1. If the header can't be converted to a date, the
method throws an IllegalArgumentException.
name - a String specifying the name of the header
long value representing the date specified in
the header expressed as the number of milliseconds since January 1,
1970 GMT, or -1 if the named header was not included with the request
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)public String getHeader(String name)
String. If the request did not include a header of the
specified name, this method returns null. If there are
multiple headers with the same name, this method returns the first head
in the request. The header name is case insensitive. You can use this
method with any request header.
name - a String specifying the header name
String containing the value of the requested
header; or
null if the request does not have a header of that name
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public Enumeration getHeaderNames()
throws EngineException
Some servlet containers do not allow servlets to access headers
using this method, in which case this method returns null
null
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public Enumeration getHeaders(String name)
throws EngineException
Enumeration of String objects.
Some headers, such as Accept-Language can be sent by
clients as several headers each with a different value rather than
sending the header as a comma separated list.
If the request did not include any headers of the specified name,
this method returns an empty Enumeration. The header name
is case insensitive. You can use this method with any request header.
name - a String specifying the header name
Enumeration containing the values of the
requested header. If the request does not have any headers of that name
return an empty enumeration. If the container does not allow access to
header information, it returns null.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public InitConfig getInitConfig()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)InitConfig
public int getIntHeader(String name)
throws EngineException
int. If the request does not have a header of the
specified name, this method returns -1. If the header cannot be
converted to an integer, this method throws a
NumberFormatException.
The header name is case insensitive.
name - a String specifying the name of a request
header
-1 if the request doesn't have a header of this name
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public Locale getRequestLocale()
throws EngineException
Locale that the client will accept
content in, based on the Accept-Language header. If the client request
doesn't provide an Accept-Language header, this method returns the
default locale for the server.
Locale for the client
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public Enumeration getRequestLocales()
throws EngineException
Enumeration of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header. If the client request doesn't provide an Accept-Language
header, this method returns an Enumeration containing one
Locale, the default locale for the server.
Enumeration of preferred Locale
objects for the client
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getPathInfo()
throws EngineException
The URL of an element that should support pathinfo, has to end with
an asterisk (for example: /my/url/*).
This method returns an empty string if there was no extra path information.
String, decoded by the web engine, specifying
extra path information that comes after the element URL but before the
query string in the request URL; or
or an empty string if the URL does not have any extra path information
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public RequestMethod getMethod()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getProtocol()
throws EngineException
String containing the protocol name and version
number
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getRemoteAddr()
throws EngineException
String containing the IP address of the client
that sent the request
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public String getRemoteUser()
throws EngineException
null if the user has not been
authenticated. Whether the user name is sent with each subsequent
request depends on the browser and type of authentication.
String specifying the login of the user making
this request; or
null if the user login is not known
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public String getRemoteHost()
throws EngineException
String containing the fully qualified name of
the client
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)
public int getServerPort()
throws EngineException
Host header value, if any, or
the server port where the client connection was accepted on.
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getScheme()
throws EngineException
http, https, or ftp. Different
schemes have different rules for constructing URLs, as noted in RFC
1738.
String containing the name of the scheme used to
make this request
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public String getServerName()
throws EngineException
Host header
value, if any, or the resolved server name, or the server IP address.
String containing the name of the server
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public boolean isSecure()
throws EngineException
EngineException - if you don't
have access to the request data (eg. you're inside a child trigger); or
if there's no active element context (eg. you're using this method
inside the constructor instead of inside the initialize()
method)
public Object getRequestAttribute(String name)
throws EngineException
Object, or
null if no attribute of the given name exists.
Attributes can be set two ways. The servlet container may set
attributes to make available custom information about a request. For
example, for requests made using HTTPS, the attribute
javax.servlet.request.X509Certificate can be used to
retrieve information on the certificate of the client. Attributes can
also be set programatically using setRequestAttribute(java.lang.String, java.lang.Object). This allows
information to be embedded into a request an communicate amongst
elements.
Attribute names should follow the same conventions as package names.
This specification reserves names matching java.*,
javax.*, and sun.*.
name - a String specifying the name of the attribute
Object containing the value of the attribute,
or null if the attribute does not exist
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)hasRequestAttribute(java.lang.String),
getRequestAttributeNames(),
removeRequestAttribute(java.lang.String),
setRequestAttribute(java.lang.String, java.lang.Object)
public boolean hasRequestAttribute(String name)
throws EngineException
name - a String specifying the name of the attribute
true if the attribute exists; or
false otherwise
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getRequestAttribute(java.lang.String),
getRequestAttributeNames(),
removeRequestAttribute(java.lang.String),
setRequestAttribute(java.lang.String, java.lang.Object)
public Enumeration getRequestAttributeNames()
throws EngineException
Enumeration containing the names of the
attributes available to this request. This method returns an empty
Enumeration if the request has no attributes available to
it.
Enumeration of strings containing the names of
the request's attributes
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getRequestAttribute(java.lang.String),
hasRequestAttribute(java.lang.String),
removeRequestAttribute(java.lang.String),
setRequestAttribute(java.lang.String, java.lang.Object)
public void removeRequestAttribute(String name)
throws EngineException
Attribute names should follow the same conventions as package names.
Names beginning with java.*, javax.*, and
com.sun.*, are reserved for use by Sun Microsystems.
name - a String specifying the name of the attribute
to remove
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getRequestAttribute(java.lang.String),
hasRequestAttribute(java.lang.String),
getRequestAttributeNames(),
setRequestAttribute(java.lang.String, java.lang.Object)
public void setRequestAttribute(String name,
Object object)
throws EngineException
Attribute names should follow the same conventions as package names.
Names beginning with java.*, javax.*, and
com.sun.*, are reserved for use by Sun Microsystems.
If the object passed in is null, the effect is the same as calling
removeRequestAttribute(java.lang.String).
name - a String specifying the name of the attributeobject - the Object to be stored
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)getRequestAttribute(java.lang.String),
hasRequestAttribute(java.lang.String),
getRequestAttributeNames(),
removeRequestAttribute(java.lang.String)
public ElementContext getElementContext()
throws EngineException
By default, this method will throw an exception since it gives raw
access to web engine features that aren't managed. See setProhibitRawAccess(boolean) for more information about activating it.
EngineException - if you don't
have raw access to the web engine; or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)ElementContext,
setProhibitRawAccess(boolean)
public HttpServletRequest getHttpServletRequest()
throws EngineException
HttpServletRequest.
By default, this method will throw an exception since it gives raw
access to web engine features that aren't managed. See setProhibitRawAccess(boolean) for more information about activating it.
HttpServletRequest
EngineException - if you don't
have raw access to the web engine; or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setProhibitRawAccess(boolean)
public HttpServletResponse getHttpServletResponse()
throws EngineException
HttpServletResponse.
By default, this method will throw an exception since it gives raw
access to web engine features that aren't managed. See setProhibitRawAccess(boolean) for more information about activating it.
HttpServletResponse
EngineException - if you don't
have raw access to the web engine; or if there's no active element
context (eg. you're using this method inside the constructor instead of
inside the initialize() method)setProhibitRawAccess(boolean)
public ServletContext getServletContext()
throws EngineException
ServletContext of this web application.
By default, this method will throw an exception since it gives raw
access to web engine features that aren't managed. See setProhibitRawAccess(boolean) for more information about activating it.
ServletContext
EngineException - if there's
no active element context (eg. you're using this method inside the
constructor instead of inside the initialize() method)setProhibitRawAccess(boolean)public void setElementContext(ElementContext elementContext)
public Object clone()
throws CloneNotSupportedException
ContinuableObject
clone in interface ContinuableObjectclone in class ObjectCloneNotSupportedExceptionContinuationConfigRuntime.cloneContinuations(T)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||