com.uwyn.rife.engine
Class ElementSupport

java.lang.Object
  extended by com.uwyn.rife.engine.ElementSupport
All Implemented Interfaces:
ContinuableObject, Cloneable
Direct Known Subclasses:
Element

public class ElementSupport
extends Object
implements ContinuableObject, Cloneable

The ElementSupport class provides all the methods to communicate from inside an element with the context in which it is being executed.

Since:
1.0
Version:
$Revision: 3846 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)
See Also:
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
<BeanType> BeanType
getInputBean(Class<BeanType> beanClass)
          Retrieves an instance of an input bean and populates the properties with the input values.
<BeanType> BeanType
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.
<TargetType extends Serializable>
TargetType
getInputSerializable(String name)
          Retrieves the value of a serialized input.
<TargetType extends Serializable>
TargetType
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.
<BeanType> BeanType
getNamedInputBean(String name)
          Retrieves an instance of a named input bean and populates the properties with the input values.
<BeanType> BeanType
getNamedSubmissionBean(String beanName)
          Retrieves an instance of a named submission bean for the current submission and populates the properties with the parameter values.
<BeanType> BeanType
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.
<T> T
getPropertyTyped(String name, Class<T> type)
          Retrieves the value of an injected named property and converts it to the specified type.
<T> T
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
<BeanType> BeanType
getSubmissionBean(Class<BeanType> beanClass)
          Retrieves an instance of a submission bean and populates the properties with the parameter values.
<BeanType> BeanType
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.
<BeanType> BeanType
getSubmissionBean(String submissionName, Class<BeanType> beanClass)
          Retrieves an instance of a submission bean and populates the properties with the parameter values.
<BeanType> BeanType
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

ElementSupport

protected ElementSupport()
Method Detail

setInitializer

public void setInitializer(ElementInitializer initializer)
Sets the 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.

Parameters:
initializer - the initializer
Since:
1.0
See Also:
initialize(), ElementInitializer

initialize

public void initialize()
Initializes the element, this method should never be called explicitly.

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).

Since:
1.0
See Also:
setInitializer(ElementInitializer)

setChildTrigger

public void setChildTrigger(ElementChildTrigger childTrigger)
Sets the 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.

Parameters:
childTrigger - the child trigger
Since:
1.0
See Also:
childTriggered(String, String[]), ElementChildTrigger

childTriggered

public boolean childTriggered(String name,
                              String[] values)
Called by the engine when a child trigger occurs, this method should never be called explicitly.

The default implementation executes the ElementChildTrigger that has been registered with setChildTrigger(com.uwyn.rife.engine.ElementChildTrigger).

Parameters:
name - the name of the variable that initiated the child trigger
values - the values of the variable that initiated the child trigger
Returns:
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

Since:
1.0
See Also:
setChildTrigger(ElementChildTrigger)

setDeploymentClass

public void setDeploymentClass(Class<? extends ElementDeployer> klass)
Set the 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.

Parameters:
klass - the ElementDeployer that will be used to deploy the element
Since:
1.0
See Also:
ElementDeployer.deploy(), getDeploymentClass(), getDeployer()

getDeploymentClass

public Class getDeploymentClass()
Retrieves the class that will be used for the deployment of the element.

Returns:
an instance of ElementDeployer; or

null if no deployment class is used

Since:
1.0
See Also:
setDeploymentClass(Class), getDeployer()

setProhibitRawAccess

public void setProhibitRawAccess(boolean access)
Changes the access permissions to raw servlet API methods.

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.

Parameters:
access - true if the raw servlet API access is prohibited; or

false if it is allowed

Since:
1.0
See Also:
prohibitRawAccess()

prohibitRawAccess

public boolean prohibitRawAccess()
Indicates whether the access to raw servlet API methods is allowed.

Instead of using the setProhibitRawAccess(boolean) method, one can also overload this method to allow raw access. By default, raw access is forbidden.

Returns:
true if the raw servlet API access is prohibited; or

false if it is allowed

Since:
1.0
See Also:
setProhibitRawAccess(boolean)

setCloneContinuations

public void setCloneContinuations(boolean clone)
Changes the engine's behavior when new continuation steps are created.

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.

Parameters:
clone - true to make the engine clone continuations; or

false to disable the cloning

Since:
1.0
See Also:
cloneContinuations()

cloneContinuations

public boolean cloneContinuations()
Indicates whether continuations are cloned at each step.

Instead of using the setCloneContinuations(boolean) method, one can also overload this method to configure the cloning. By default, cloning is active.

Returns:
true to make the engine clone continuations; or

false to disable the cloning

Since:
1.0
See Also:
(boolean)

pause

public final void pause()
Pauses the execution of the element and creates a new continuation.

The next request will resume exactly at the same location with a completely restored call stack and variable stack.

Since:
1.0

stepBack

public final void stepBack()
Steps back to the start of the previous continuation.

If there is no previous continuation, the element will be executed from the beginning again.

Since:
1.5
See Also:
duringStepBack()

duringStepBack

public boolean duringStepBack()
Indicates whether the current element execution is a step back.

Returns:
true if a step back occurred in this request; or

false otherwise

Since:
1.5
See Also:
stepBack()

call

public final Object call(String exit)
Pauses the execution of the element and creates a new continuation. The execution will immediately continue in the element that is the target of the called 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.

Parameters:
exit - the name of the exit whose target element will be called
Returns:
the object that was provided through the answer(Object) method in the called element; or

null if no answer was provided

Since:
1.0
See Also:
answer(), answer(Object)

answer

public final void answer()
                  throws EngineException
Resumes the execution in the calling element by providing no answer object.

The execution in the active element will be interrupted immediately and the call continuation will be resumed exactly where is was paused before.

Throws:
EngineException - a runtime exception that is used to immediately interrupt the execution, don't catch this exception
Since:
1.0
See Also:
call(String), answer(Object)

answer

public final void answer(Object answer)
                  throws EngineException
Resumes the execution in the calling element by providing an answer.

The execution in the active element will be interrupted immediately and the call continuation will be resumed exactly where is was paused before.

Parameters:
answer - the object that will be answered to the calling element
Throws:
EngineException - a runtime exception that is used to immediately interrupt the execution, don't catch this exception
Since:
1.0
See Also:
call(String), answer()

getHtmlTemplate

public Template getHtmlTemplate()
                         throws TemplateException,
                                EngineException
Creates a new template instance of the 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.

Returns:
a new instance of the template
Throws:
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)
Since:
1.3
See Also:
getHtmlTemplate(String), getHtmlTemplate(String, TemplateTransformer), getHtmlTemplate(String, String), getHtmlTemplate(String, String, TemplateTransformer)

getHtmlTemplate

public Template getHtmlTemplate(String name)
                         throws TemplateException,
                                EngineException
Creates a new template instance of the enginehtml type.

Parameters:
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.
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getHtmlTemplate(), getHtmlTemplate(String, TemplateTransformer), getHtmlTemplate(String, String), getHtmlTemplate(String, String, TemplateTransformer)

getHtmlTemplate

public Template getHtmlTemplate(String name,
                                TemplateTransformer transformer)
                         throws TemplateException,
                                EngineException
Creates a new template instance of the enginehtml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getHtmlTemplate(), getHtmlTemplate(String), getHtmlTemplate(String, String), getHtmlTemplate(String, String, TemplateTransformer)

getHtmlTemplate

public Template getHtmlTemplate(String name,
                                String encoding)
                         throws TemplateException,
                                EngineException
Creates a new template instance of the enginehtml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getHtmlTemplate(), getHtmlTemplate(String), getHtmlTemplate(String, TemplateTransformer), getHtmlTemplate(String, String, TemplateTransformer)

getHtmlTemplate

public Template getHtmlTemplate(String name,
                                String encoding,
                                TemplateTransformer transformer)
                         throws TemplateException,
                                EngineException
Creates a new template instance of the enginehtml type.

The special engine template types contain additional block and value filters to offer the following features:

Non-engine versions of the same template types are not able to provide these functionalities.

Parameters:
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
transformer - the template transformer that will be used to modify the template's source before it's parsed
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getHtmlTemplate(), getHtmlTemplate(String), getHtmlTemplate(String, TemplateTransformer), getHtmlTemplate(String, String)

getXhtmlTemplate

public Template getXhtmlTemplate()
                          throws TemplateException,
                                 EngineException
Creates a new template instance of the enginexhtml type, using the current element's absolute ID as the template name.

Returns:
a new instance of the template
Throws:
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)
Since:
1.3
See Also:
getXhtmlTemplate(String), getXhtmlTemplate(String, TemplateTransformer), getXhtmlTemplate(String, String), getXhtmlTemplate(String, String, TemplateTransformer)

getXhtmlTemplate

public Template getXhtmlTemplate(String name)
                          throws TemplateException,
                                 EngineException
Creates a new template instance of the enginexhtml type.

Parameters:
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.
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXhtmlTemplate(), getXhtmlTemplate(String, TemplateTransformer), getXhtmlTemplate(String, String), getXhtmlTemplate(String, String, TemplateTransformer)

getXhtmlTemplate

public Template getXhtmlTemplate(String name,
                                 TemplateTransformer transformer)
                          throws TemplateException,
                                 EngineException
Creates a new template instance of the enginexhtml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXhtmlTemplate(), getXhtmlTemplate(String), getXhtmlTemplate(String, String), getXhtmlTemplate(String, String, TemplateTransformer)

getXhtmlTemplate

public Template getXhtmlTemplate(String name,
                                 String encoding)
                          throws TemplateException,
                                 EngineException
Creates a new template instance of the enginexhtml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXhtmlTemplate(), getXhtmlTemplate(String), getXhtmlTemplate(String, TemplateTransformer), getXhtmlTemplate(String, String, TemplateTransformer)

getXhtmlTemplate

public Template getXhtmlTemplate(String name,
                                 String encoding,
                                 TemplateTransformer transformer)
                          throws TemplateException,
                                 EngineException
Creates a new template instance of the enginexhtml type.

The special engine template types contain additional block and value filters to offer the following features:

Non-engine versions of the same template types are not able to provide these functionalities.

Parameters:
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
transformer - the template transformer that will be used to modify the template's source before it's parsed
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXhtmlTemplate(), getXhtmlTemplate(String), getXhtmlTemplate(String, TemplateTransformer), getXhtmlTemplate(String, String)

getXmlTemplate

public Template getXmlTemplate()
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginexml type, using the current element's absolute ID as the template name.

Returns:
a new instance of the template
Throws:
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)
Since:
1.3
See Also:
getXmlTemplate(String), getXmlTemplate(String, TemplateTransformer), getXmlTemplate(String, String), getXmlTemplate(String, String, TemplateTransformer)

getXmlTemplate

public Template getXmlTemplate(String name)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginexml type.

Parameters:
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.
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXmlTemplate(), getXmlTemplate(String, TemplateTransformer), getXmlTemplate(String, String), getXmlTemplate(String, String, TemplateTransformer)

getXmlTemplate

public Template getXmlTemplate(String name,
                               TemplateTransformer transformer)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginexml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXmlTemplate(String), getXmlTemplate(String), getXmlTemplate(String, String), getXmlTemplate(String, String, TemplateTransformer)

getXmlTemplate

public Template getXmlTemplate(String name,
                               String encoding)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginexml type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXmlTemplate(String), getXmlTemplate(String), getXmlTemplate(String, TemplateTransformer), getXmlTemplate(String, String, TemplateTransformer)

getXmlTemplate

public Template getXmlTemplate(String name,
                               String encoding,
                               TemplateTransformer transformer)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginexml type.

The special engine template types contain additional block and value filters to offer the following features:

Non-engine versions of the same template types are not able to provide these functionalities.

Parameters:
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
transformer - the template transformer that will be used to modify the template's source before it's parsed
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getXmlTemplate(String), getXmlTemplate(String), getXmlTemplate(String, TemplateTransformer), getXmlTemplate(String, String)

getTxtTemplate

public Template getTxtTemplate()
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginetxt type, using the current element's absolute ID as the template name.

Returns:
a new instance of the template
Throws:
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)
Since:
1.3
See Also:
getTxtTemplate(String), getTxtTemplate(String, TemplateTransformer), getTxtTemplate(String, String), getTxtTemplate(String, String, TemplateTransformer)

getTxtTemplate

public Template getTxtTemplate(String name)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginetxt type.

Parameters:
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.
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getTxtTemplate(), getTxtTemplate(String, TemplateTransformer), getTxtTemplate(String, String), getTxtTemplate(String, String, TemplateTransformer)

getTxtTemplate

public Template getTxtTemplate(String name,
                               TemplateTransformer transformer)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginetxt type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getTxtTemplate(), getTxtTemplate(String), getTxtTemplate(String, String), getTxtTemplate(String, String, TemplateTransformer)

getTxtTemplate

public Template getTxtTemplate(String name,
                               String encoding)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginetxt type.

Parameters:
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
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getTxtTemplate(), getTxtTemplate(String), getTxtTemplate(String, TemplateTransformer), getTxtTemplate(String, String, TemplateTransformer)

getTxtTemplate

public Template getTxtTemplate(String name,
                               String encoding,
                               TemplateTransformer transformer)
                        throws TemplateException,
                               EngineException
Creates a new template instance of the enginetxt type.

The special engine template types contain additional block and value filters to offer the following features:

Non-engine versions of the same template types are not able to provide these functionalities.

Parameters:
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
transformer - the template transformer that will be used to modify the template's source before it's parsed
Returns:
a new instance of the template
Throws:
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)
Since:
1.0
See Also:
getTxtTemplate(), getTxtTemplate(String), getTxtTemplate(String, TemplateTransformer), getTxtTemplate(String, String)

encodeHtml

public String encodeHtml(String source)
Transforms a provided String object into a new string, containing only valid HTML characters.

Parameters:
source - The string that has to be transformed into a valid HTML string.
Returns:
The encoded String object.
Since:
1.0
See Also:
encodeXml(String)

encodeXml

public String encodeXml(String source)
Transforms a provided String object into a new string, containing only valid XML characters.

Parameters:
source - The string that has to be transformed into a valid XML string.
Returns:
The encoded String object.
Since:
1.0
See Also:
encodeHtml(String)

enableTextBuffer

public void enableTextBuffer(boolean enabled)
                      throws EngineException
Enables or disables the response text buffer. By default, it is enabled.

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.

Parameters:
enabled - true to enable the text buffer; or

false to disable it

Throws:
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)
Since:
1.0
See Also:
isTextBufferEnabled(), flush(), clearBuffer()

isTextBufferEnabled

public boolean isTextBufferEnabled()
                            throws EngineException
Indicates whether the response text buffer is enabled or disabled.

Returns:
true if the text buffer is enabled; or

false if it is disabled

Throws:
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)
Since:
1.0
See Also:
enableTextBuffer(boolean), flush(), clearBuffer()

print

public void print(Template template)
           throws TemplateException,
                  EngineException
Prints the content of a template to the request text output. The template is first processed in the active element context by the processTemplate(Template) method.

Parameters:
template - the template that will be printed
Throws:
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)
Since:
1.0
See Also:
print(Object), processTemplate(Template)

processTemplate

public List<String> processTemplate(Template template)
                             throws TemplateException,
                                    EngineException
Processes a template in the active element context.

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
GROOVY:ROLEUSER:valueid
JANINO:ROLEUSER:valueid
These scripted block value tags will be processed according to the active element context.

For example: <!--V 'OGNL:ROLEUSER:rolecheck'-->User is no admin<!--/V-->
<!--B 'OGNL:ROLEUSER:rolecheck:[[ isInRole("admin") ]]'-->User is admin<!--/B-->

Will display 'User is admin' if the user has the admin role, and otherwise 'User is no admin'.

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

Parameters:
template - the template instance that needs to be processed
Returns:
a list with the ids of all the template values that have been set
Throws:
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)
Since:
1.0

print

public void print(Object value)
           throws EngineException
Prints the string representation of an object to the request text output. The string representation will be created through a String.valueOf(value) call.

Parameters:
value - the object that will be output
Throws:
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)
Since:
1.0

getOutputStream

public OutputStream getOutputStream()
                             throws EngineException
Retrieves an output stream to send binary data through the response.

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.

Returns:
an instance of the response output stream
Throws:
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)
Since:
1.0

clearBuffer

public void clearBuffer()
                 throws EngineException
Clears the request text output buffer, all buffered text will be discarded.

If no text buffer is active, this method doesn't do anything.

Throws:
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)
Since:
1.0
See Also:
isTextBufferEnabled(), enableTextBuffer(boolean), flush()

flush

public void flush()
           throws EngineException
Flushes the request text output buffer and the request output stream. This sends any buffered data immediately to the client.

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.

Throws:
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)
Since:
1.0
See Also:
isTextBufferEnabled(), enableTextBuffer(boolean), clearBuffer()

getSite

public Site getSite()
             throws EngineException
Retrieves the site in which this element is declared.

Returns:
a site instance
Throws:
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)
Since:
1.0

getDeployer

public ElementDeployer getDeployer()
                            throws EngineException
Retrieves the deployer of this element.

Returns:
the instance of the deployer that was used to deploy the element; or

null if no deployment class has been declared

Throws:
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)
Since:
1.0
See Also:
getDeploymentClass(), setDeploymentClass(Class)

getElementInfo

public ElementInfo getElementInfo()
                           throws EngineException
Retrieves the declaration information of this element.

Returns:
the declaration information of this element
Throws:
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)
Since:
1.0

getSourceName

public String getSourceName()
                     throws EngineException
Retrieves the source implementation name of this element.

Returns:
the source implementation name
Throws:
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)
Since:
1.0

getDeclarationName

public String getDeclarationName()
                          throws EngineException
Retrieves the declaration name of this element.

Returns:
the declaration name
Throws:
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)
Since:
1.0

getTarget

public ElementInfo getTarget()
                      throws EngineException
Retrieves the information of the target element of the active request.

This can be different from the current element due to precedence, behavioural inheritance, child triggers, element embedding, ...

Returns:
the request's target element information
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0

getEmbeddingElement

public ElementSupport getEmbeddingElement()
                                   throws EngineException
Retrieves the element that is embedding the current element.

Returns:
the embedding element; or

null if this element is not embedded

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedValue(), hasEmbedData(), getEmbedData(), getEmbedProperties(), isEmbedded()

getEmbeddingTemplate

public Template getEmbeddingTemplate()
                              throws EngineException
Retrieves the template that is embedding the current element.

Returns:
the embedding template; or

null if this element is not embedded

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingElement(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedValue(), hasEmbedData(), getEmbedData(), getEmbedProperties(), isEmbedded()

getEmbedDifferentiator

public String getEmbedDifferentiator()
                              throws EngineException
Retrieves the differentiator that was used to set this embedded element apart.

Returns:
this embedded element's differentiator; or

null if this embedded element didn't have a differentiator

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), hasEmbedValue(), getEmbedValue(), hasEmbedData(), getEmbedData(), getEmbedProperties(), isEmbedded()

hasEmbedValue

public boolean hasEmbedValue()
                      throws EngineException
Indicates whether the embedded element's template value has content.

Returns:
true if the value has content; or

false otherwise

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), getEmbedValue(), hasEmbedData(), getEmbedData(), getEmbedProperties(), isEmbedded()

getEmbedValue

public String getEmbedValue()
                     throws EngineException
Retrieves the current content of the value tag of this embedded element.

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-->

Returns:
the value from the embedded template; or

null if no default value was provided or if the current element is not embedded

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedData(), hasEmbedData(), getEmbedProperties(), isEmbedded()

hasEmbedData

public boolean hasEmbedData()
                     throws EngineException
Indicates whether data was passed on during the processing of this embedded element.

Returns:
true if data was passed on; or

false otherwise

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedValue(), getEmbedData(), getEmbedProperties(), isEmbedded()

getEmbedData

public Object getEmbedData()
                    throws EngineException
Retrieves the data that was passed on for the processing of this embedded element.

Returns:
the value from the embedded template; or

null if no data was provided or if the current element is not embedded

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.5
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), getEmbedValue(), hasEmbedValue(), hasEmbedData(), getEmbedProperties(), isEmbedded()

getEmbedProperties

public Properties getEmbedProperties()
                              throws EngineException
Retrieves the embed value as a property list (see 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'.

Returns:
the embed value parsed as a property list; or

null if no default value was provided, if the current element is not embedded

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedValue(), hasEmbedData(), isEmbedded()

isEmbedded

public boolean isEmbedded()
                   throws EngineException
Indicates whether this element is running embedded inside another element's template.

Returns:
true if this element is embedded; or

false otherwise

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.4
See Also:
getEmbeddingTemplate(), getEmbeddingElement(), getEmbedDifferentiator(), hasEmbedValue(), getEmbedValue(), hasEmbedData(), getEmbedProperties()

hasProperty

public boolean hasProperty(String name)
                    throws EngineException
Indicates whether this element has a certain injected named property.

Parameters:
name - the name of the property
Returns:
true if the element contains the property; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String), getPropertyString(String, String), isPropertyEmpty(String)

getProperty

public Object getProperty(String name)
                   throws EngineException
Retrieves the value of an injected named property.

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.

Parameters:
name - the name of the property
Returns:
the property value; or

null if no such property exists

Throws:
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)
Since:
1.0
See Also:
hasProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String), getPropertyString(String, String), isPropertyEmpty(String)

getProperty

public Object getProperty(String name,
                          Object defaultValue)
                   throws EngineException
Retrieves the value of an injected named property, using a default value as fallback.

Parameters:
name - the name of the property
defaultValue - the value that should be used if the property can't be found
Returns:
the property value; or

the default value if no such property exists

Throws:
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)
Since:
1.0
See Also:
hasProperty(String), getProperty(String), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String), getPropertyString(String, String), isPropertyEmpty(String)

getPropertyTyped

public <T> T getPropertyTyped(String name,
                              Class<T> type)
Retrieves the value of an injected named property and converts it to the specified 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.

Parameters:
name - the name of the property
type - the class you want the property to be converted to
Returns:
the property value, casted to the requested type; or

null if no such property exists

Throws:
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 type
Since:
1.3
See Also:
hasProperty(String), getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class, Object), getPropertyString(String), getPropertyString(String, String), isPropertyEmpty(String)

getPropertyTyped

public <T> T 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.

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.

Parameters:
name - the name of the property
type - the class you want the property to be converted to
defaultValue - the object that should be used if the property can't be found
Returns:
the property value, casted to the requested type; or

the default value if no such property exists

Throws:
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 type
Since:
1.3
See Also:
hasProperty(String), getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyString(String), getPropertyString(String, String), isPropertyEmpty(String)

getPropertyString

public String getPropertyString(String name)
                         throws EngineException
Retrieves the value of an injected named property and converts it to a string.

Parameters:
name - the name of the property
Returns:
the string representation of the property value; or

null if no such property exists

Throws:
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)
Since:
1.0
See Also:
hasProperty(String), getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String, String), isPropertyEmpty(String)

getPropertyString

public String getPropertyString(String name,
                                String defaultValue)
                         throws EngineException
Retrieves the value of an injected named property and converts it to a string, using a default value as fallback.

Parameters:
name - the name of the property
defaultValue - the string literal that should be used if the property can't be found
Returns:
the string representation of the property value; or

the default value if no such property exists or when the resulting string is empty

Throws:
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)
Since:
1.0
See Also:
hasProperty(String), getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String), isPropertyEmpty(String)

isPropertyEmpty

public boolean isPropertyEmpty(String name)
                        throws EngineException
Checks if a property is not available or if the string presentation is empty.

Parameters:
name - the name of the property
Returns:
true if the property is empty; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
hasProperty(String), getProperty(String), getProperty(String, Object), getPropertyTyped(String, Class), getPropertyTyped(String, Class, Object), getPropertyString(String), getPropertyString(String, String)

getNamedInputBean

public <BeanType> BeanType getNamedInputBean(String name)
                           throws EngineException
Retrieves an instance of a named input bean and populates the properties with the input values. The class of the bean is looked up through its name, as is the property prefix.

This bean is not serialized or deserialized, each property corresponds to an input and is individually sent by the client.

Parameters:
name - the name of the input bean
Returns:
the populated input bean instance
Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputBean

public <BeanType> BeanType getInputBean(Class<BeanType> beanClass)
                      throws EngineException
Retrieves an instance of an input bean and populates the properties with the input values.

This bean is not serialized or de-serialized, each property corresponds to an input and is individually sent by the client.

Parameters:
beanClass - the class of the input bean
Returns:
the populated input bean instance
Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputBean

public <BeanType> BeanType getInputBean(Class<BeanType> beanClass,
                                        String prefix)
                      throws EngineException
Retrieves an instance of an input bean and populates the properties with the input values, taking the provided prefix into account.

This bean is not serialized or de-serialized, each property corresponds to an input and is individually sent by the client.

Parameters:
beanClass - the class of the input bean
prefix - the prefix that will be put in front of each property name
Returns:
the populated input bean instance
Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInput(String), getInput(String, String), getInputValues(String)

hasInputValue

public boolean hasInputValue(String name)
                      throws EngineException
Checks whether a value has been provided to an input.

Parameters:
name - the name of the input
Returns:
true if the input has a value; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
isInputEmpty(String), getNamedInputBean(String), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

isInputEmpty

public boolean isInputEmpty(String name)
                     throws EngineException
Checks whether an input has no value or whether the value is empty.

Parameters:
name - the name of the input
Returns:
true if the input has no value or when the value is empty; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInput

public String getInput(String name)
                throws EngineException
Retrieves the value of an input.

Parameters:
name - the name of the input
Returns:
the value of the input; or

null if no value is present for this input

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String, String), getInputValues(String)

getInput

public String getInput(String name,
                       String defaultValue)
                throws EngineException
Retrieves the value of an input and returns a default value if no input value is present

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInputValues(String)

getInputSerializable

public <TargetType extends Serializable> TargetType getInputSerializable(String name)
                                                     throws EngineException
Retrieves the value of a serialized input.

Parameters:
name - the name of the input
Returns:
the deserialized input
Throws:
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)
Since:
1.3.1
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInputValues(String)

getInputSerializable

public <TargetType extends Serializable> TargetType getInputSerializable(String name,
                                                                         TargetType defaultValue)
                                                     throws EngineException
Retrieves the value of a serialized input and returns a default value if no input value is present

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the deserialized input; or

the default value if no input value is present

Throws:
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)
Since:
1.3.1
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInputValues(String)

getInputDate

public Date getInputDate(String name)
                  throws EngineException
Retrieves the value of an input and converts it to a Date.

Parameters:
name - the name of the input
Returns:
the converted input value; or

null if the input didn't have a value

Throws:
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)
Since:
1.6.1
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputDate

public Date getInputDate(String name,
                         Date defaultValue)
                  throws EngineException
Retrieves the value of an input and converts it to a Date, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.6.1
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputValues

public String[] getInputValues(String name)
                        throws EngineException
Retrieves the values of an input.

Parameters:
name - the name of the input
Returns:
a string array with all the input values; or

null if no input values are present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String)

getInputBoolean

public boolean getInputBoolean(String name)
                        throws EngineException
Retrieves the value of an input and converts it to a boolean.

Parameters:
name - the name of the input
Returns:
the converted input value; or

false if no input value is present or if the input value is not a valid boolean

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputBoolean

public boolean getInputBoolean(String name,
                               boolean defaultValue)
                        throws EngineException
Retrieves the value of an input and converts it to a boolean, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputInt

public int getInputInt(String name)
                throws EngineException
Retrieves the value of an input and converts it to an integer.

Parameters:
name - the name of the input
Returns:
the converted input value; or

0 if no input value is present or if the input value is not a valid integer

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputInt

public int getInputInt(String name,
                       int defaultValue)
                throws EngineException
Retrieves the value of an input and converts it to an integer, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputLong

public long getInputLong(String name)
                  throws EngineException
Retrieves the value of an input and converts it to a long.

Parameters:
name - the name of the input
Returns:
the converted input value; or

0L if no input value is present or if the input value is not a valid long

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputLong

public long getInputLong(String name,
                         long defaultValue)
                  throws EngineException
Retrieves the value of an input and converts it to a long, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputDouble

public double getInputDouble(String name)
                      throws EngineException
Retrieves the value of an input and converts it to a double.

Parameters:
name - the name of the input
Returns:
the converted input value; or

0.0d if no input value is present or if the input value is not a valid double

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputDouble

public double getInputDouble(String name,
                             double defaultValue)
                      throws EngineException
Retrieves the value of an input and converts it to a double, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputFloat

public float getInputFloat(String name)
                    throws EngineException
Retrieves the value of an input and converts it to a float.

Parameters:
name - the name of the input
Returns:
the converted input value; or

0.0f if no input value is present or if the input value is not a valid float

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

getInputFloat

public float getInputFloat(String name,
                           float defaultValue)
                    throws EngineException
Retrieves the value of an input and converts it to a float, using a default value if no input value is present.

Parameters:
name - the name of the input
defaultValue - the default value that will be used when no input value is present
Returns:
the converted input value; or

the default value if no input value is present

Throws:
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)
Since:
1.0
See Also:
hasInputValue(String), isInputEmpty(String), getNamedInputBean(String), getInputBean(Class), getInputBean(Class, String), getInput(String), getInput(String, String), getInputValues(String)

selectInputParameter

public Collection<String> selectInputParameter(Template template,
                                               String name,
                                               String[] values)
                                        throws EngineException
Sets a select box option, a radio button or a checkbox to selected or checked according to input values.

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.

Parameters:
template - the template instance where the selection should happen
name - the name of the input
values - the values that should selected or checked
Returns:
a list with the identifiers of the template values that have been set, this is never null, when no values are set an empty list is returned
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
selectParameter(Template, String, String[]), selectSubmissionParameter(Template, String, String[])

setOutput

public void setOutput(String name,
                      String value)
               throws EngineException
Sets the value of an output.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      String[] values)
               throws EngineException
Set the values of an output.

Parameters:
name - the name of the output
values - the values that have to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      boolean value)
               throws EngineException
Sets the value of an output from a boolean.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      char value)
               throws EngineException
Sets the value of an output from a char.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      char[] value)
               throws EngineException
Set the value of an output from an array of chars that will be concatenated to a String.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      double value)
               throws EngineException
Sets the value of an output from a double.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      float value)
               throws EngineException
Sets the value of an output from a float.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      int value)
               throws EngineException
Sets the value of an output from an int.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      long value)
               throws EngineException
Sets the value of an output from a long.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

setOutput

public void setOutput(String name,
                      Object value)
               throws EngineException
Sets the value of an output from a generic object. The object will be converted to its String representation.

Parameters:
name - the name of the output
value - the value that has to be set
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           String value)
                    throws EngineException
Adds a value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValues

public void addOutputValues(String name,
                            String[] values)
                     throws EngineException
Adds values to the current values of an output.

Parameters:
name - the name of the output
values - the values that have to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           boolean value)
                    throws EngineException
Adds a boolean value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           char value)
                    throws EngineException
Adds a char value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           char[] value)
                    throws EngineException
Adds values from an array of chars to the current values of an output.

Parameters:
name - the name of the output
value - the values that have to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           double value)
                    throws EngineException
Adds a double value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           float value)
                    throws EngineException
Adds a float value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           int value)
                    throws EngineException
Adds a int value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           long value)
                    throws EngineException
Adds a long value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

addOutputValue

public void addOutputValue(String name,
                           Object value)
                    throws EngineException
Adds a generic object value to the current values of an output.

Parameters:
name - the name of the output
value - the value that has to be added
Throws:
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)
Since:
1.0
See Also:
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)

setNamedOutputBean

public void setNamedOutputBean(String name,
                               Object bean)
                        throws EngineException
Sets an instance of a named output bean and populates the output values from the property values. The class of the bean is looked up through its name, as is the property prefix.

This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.

Parameters:
name - the name of the output bean
bean - the bean instance that should be used to set the outputs
Throws:
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)
Since:
1.0
See Also:
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)

setOutputBean

public void setOutputBean(Object bean)
                   throws EngineException
Sets an instance of a named input bean and populates the output values from the property values.

This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.

Parameters:
bean - the bean instance that should be used to set the outputs
Throws:
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)
Since:
1.0
See Also:
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)

setOutputBean

public void setOutputBean(Object bean,
                          String prefix)
                   throws EngineException
Sets an instance of a named input bean and populates the output values from the property values.

This bean is not serialized or deserialized, each output corresponds to a property and is individually sent to the client.

Parameters:
bean - the bean instance that should be used to set the outputs
prefix - the prefix that will be put in front of each property name
Throws:
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)
Since:
1.0
See Also:
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)

clearOutput

public void clearOutput(String name)
                 throws EngineException
Clears the output value of an output.

Parameters:
name - the name of the output
Throws:
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)
Since:
1.0
See Also:
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)

clearNamedOutputBean

public void clearNamedOutputBean(String name)
                          throws EngineException
Clears the outputs that correspond to the properties of a named output bean. The class of the bean is looked up through its name, as is the property prefix.

Parameters:
name - the name of the output bean
Throws:
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)
Since:
1.0
See Also:
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)

clearOutputBean

public void clearOutputBean(Class beanClass)
                     throws EngineException
Clears the outputs that correspond to the properties of an output bean.

Parameters:
beanClass - the class of the output bean
Throws:
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)
Since:
1.0
See Also:
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)

clearOutputBean

public void clearOutputBean(Class beanClass,
                            String prefix)
                     throws EngineException
Clears the outputs that correspond to the properties of an output bean, taking the provided prefix into account.

Parameters:
beanClass - the class of the output bean
prefix - the prefix that will be put in front of each property name
Throws:
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)
Since:
1.0
See Also:
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)

getOutput

public String[] getOutput(String name)
                   throws EngineException
Retrieves the value of the ouput.

Parameters:
name - the name of the output
Returns:
the textual value of the output as it's used by framework; or null if the output couldn't be found.
Throws:
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)
Since:
1.6
See Also:
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)

hasCookie

public boolean hasCookie(String name)
                  throws EngineException
Checks whether a cookie is present.

Parameters:
name - the name of the cookie
Returns:
true if the cookie was present; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookie

public Cookie getCookie(String name)
                 throws EngineException
Retrieves a cookie.

Parameters:
name - the name of the cookie.
Returns:
the instance of the cookie; or

null if no such cookie is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValue

public String getCookieValue(String name)
                      throws EngineException
Retrieves the value of a cookie.

Parameters:
name - the name of the cookie
Returns:
the value of the cookie; or

null if no such cookie is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValues

public Map<String,String> getCookieValues()
                                   throws EngineException
Retrieves all current cookies names with their values.

Returns:
a new map of all the current cookies names with their values
Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), setCookie(Cookie)

getCookieValue

public String getCookieValue(String name,
                             String defaultValue)
                      throws EngineException
Retrieves the value of a named cookie, using a default value as fallback.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueBoolean

public boolean getCookieValueBoolean(String name)
                              throws EngineException
Retrieves the value of a named cookie and converts it to a boolean.

Parameters:
name - the name of the cookie
Returns:
the converted cookie value; or

false if no cookie value is present or if the cookie value is not a valid boolean

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueBoolean

public boolean getCookieValueBoolean(String name,
                                     boolean defaultValue)
                              throws EngineException
Retrieves the value of a named cookie and converts it to a boolean, using a default value if no input value is present.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the converted cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueInt

public int getCookieValueInt(String name)
                      throws EngineException
Retrieves the value of a named cookie and converts it to an integer.

Parameters:
name - the name of the cookie
Returns:
the converted cookie value; or

0 if no cookie value is present or if the cookie value is not a valid integer

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueInt

public int getCookieValueInt(String name,
                             int defaultValue)
                      throws EngineException
Retrieves the value of a named cookie and converts it to an integer, using a default value if no input value is present.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the converted cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueLong

public long getCookieValueLong(String name)
                        throws EngineException
Retrieves the value of a named cookie and converts it to a long.

Parameters:
name - the name of the cookie
Returns:
the converted cookie value; or

0L if no cookie value is present or if the cookie value is not a valid long

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueLong

public long getCookieValueLong(String name,
                               long defaultValue)
                        throws EngineException
Retrieves the value of a named cookie and converts it to a long, using a default value if no input value is present.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the converted cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueDouble

public double getCookieValueDouble(String name)
                            throws EngineException
Retrieves the value of a named cookie and converts it to a double.

Parameters:
name - the name of the cookie
Returns:
the converted cookie value; or

0.0d if no cookie value is present or if the cookie value is not a valid double

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueDouble

public double getCookieValueDouble(String name,
                                   double defaultValue)
                            throws EngineException
Retrieves the value of a named cookie and converts it to a double, using a default value if no input value is present.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the converted cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueFloat

public float getCookieValueFloat(String name)
                          throws EngineException
Retrieves the value of a named cookie and converts it to a float.

Parameters:
name - the name of the cookie
Returns:
the converted cookie value; or

0.0f if no cookie value is present or if the cookie value is not a valid float

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getCookieValueFloat

public float getCookieValueFloat(String name,
                                 float defaultValue)
                          throws EngineException
Retrieves the value of a named cookie and converts it to a float, using a default value if no input value is present.

Parameters:
name - the name of the cookie
defaultValue - the default value that will be used when no cookie value is present
Returns:
the converted cookie value; or

the default value if no cookie value is present

Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

setCookie

public void setCookie(Cookie cookie)
               throws EngineException
Sets a cookie which will be sent to the browser.

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.

Parameters:
cookie - the cookie instance that will be set
Throws:
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)
Since:
1.0
See Also:
hasCookie(String), getCookie(String), getCookieValue(String), getCookieValue(String, String), getCookieValues(), setCookie(Cookie)

getContinuationId

public String getContinuationId()
                         throws EngineException
Returns the unique identifier of the current continuation.

Returns:
the unique identifier of the current continuations; or

null if no continuation is active

Throws:
EngineException - if you don't have access to the request data (eg. you're inside a child trigger)
Since:
1.0

getExitQueryUrl

public CharSequence getExitQueryUrl(String name)
                             throws EngineException
Generates a query URL for an exit.

Parameters:
name - the name of the exit
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitQueryUrl

public CharSequence getExitQueryUrl(String name,
                                    String pathinfo)
                             throws EngineException
Generates a query URL for an exit and appends a pathinfo to the URL of the destination element.

Parameters:
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitQueryUrl

public CharSequence getExitQueryUrl(String name,
                                    String[] outputValues)
                             throws EngineException
Generates a query URL for an exit and overrides the current output values only for this method.

Parameters:
name - the name of the exit
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitQueryUrl

public CharSequence getExitQueryUrl(String name,
                                    String pathinfo,
                                    String[] outputValues)
                             throws EngineException
Generates a query URL for an exit and appends a pathinfo to the URL of the destination element. The current output values can be overridden for this method alone.

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.

Parameters:
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitFormUrl

public CharSequence getExitFormUrl(String name)
                            throws EngineException
Generates a form action URL for an exit.

Parameters:
name - the name of the exit
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitFormUrl

public CharSequence getExitFormUrl(String name,
                                   String pathinfo)
                            throws EngineException
Generates a form action URL for an exit and appends a pathinfo to the URL of the destination element.

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.

Parameters:
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitFormParameters

public CharSequence getExitFormParameters(String name)
                                   throws EngineException
Generates the XHTML hidden form parameters for an exit.

Parameters:
name - the name of the exit
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitFormParameters

public CharSequence getExitFormParameters(String name,
                                          String[] outputValues)
                                   throws EngineException
Generates the hidden XHTML form parameters for an exit and overrides the current output values only for this method.

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.

Parameters:
name - the name of the exit
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParametersJavascript(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

getExitFormParametersJavascript

public CharSequence getExitFormParametersJavascript(String name,
                                                    String[] outputValues)
                                             throws EngineException
Generates Javascript that will generate hidden XHTML form parameters for an exit and overrides the current output values only for this method.

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.

Parameters:
name - the name of the exit
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.6
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitQuery

public void setExitQuery(Template template,
                         String name)
                  throws TemplateException,
                         EngineException
Generates a query URL for an exit and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitQuery

public void setExitQuery(Template template,
                         String name,
                         String pathinfo)
                  throws TemplateException,
                         EngineException
Generates a query URL with a pathinfo for an exit and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitQuery

public void setExitQuery(Template template,
                         String name,
                         String[] outputValues)
                  throws TemplateException,
                         EngineException
Generates a query URL for an exit with overridden outputs and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitQuery

public void setExitQuery(Template template,
                         String name,
                         String pathinfo,
                         String[] outputValues)
                  throws TemplateException,
                         EngineException
Generates a query URL for an exit with a pathinfo and overridden outputs and sets it as the content of a template value.

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.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitForm(Template, String, String)

setExitForm

public void setExitForm(Template template,
                        String name)
                 throws TemplateException,
                        EngineException
Generates a form action URL for an exit and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitForm

public void setExitForm(Template template,
                        String name,
                        String pathinfo)
                 throws TemplateException,
                        EngineException
Generates a form action URL for an exit with a pathinfo and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitForm

public void setExitForm(Template template,
                        String name,
                        String[] outputValues)
                 throws TemplateException,
                        EngineException
Generates a form action URL for an exit with overridden outputs and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[]), setExitForm(Template, String, String)

setExitForm

public void setExitForm(Template template,
                        String name,
                        String pathinfo,
                        String[] outputValues)
                 throws TemplateException,
                        EngineException
Generates a form action URL for an exit with a pathinfo and overridden outputs and sets it as the content of a template value.

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.

Parameters:
template - the template that will be used to set the value
name - the name of the exit
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
outputValues - an array of string pairs that will be used to override the current output values; or null if no output values should be overridden
Throws:
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)
Since:
1.0
See Also:
getExitQueryUrl(String, String, String[]), getExitFormUrl(String, String), getExitFormParameters(String, String[]), setExitQuery(Template, String, String, String[])

selectParameter

public Collection<String> selectParameter(Template template,
                                          String name,
                                          String[] values)
Sets a select box option, a radio button or a checkbox to selected or checked.

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" />

Parameters:
template - the template instance where the selection should happen
name - the name of the parameter
values - the values that should selected or checked
Returns:
a list with the identifiers of the template values that have been set, this is never null, when no values are set an empty list is returned
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
selectInputParameter(Template, String, String[]), selectSubmissionParameter(Template, String, String[])

generateForm

public void generateForm(Template template,
                         Object beanInstance)
                  throws EngineException
Generates a form that corresponds to a bean instance.

Parameters:
template - the template instance where the generation should happen
beanInstance - the instance of the bean that should be used to generate the form
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateForm(Template, Object, String), generateEmptyForm(Template, Class, String), removeForm(Template, Class)

generateForm

public void generateForm(Template template,
                         Object beanInstance,
                         String prefix)
                  throws EngineException
Generates a form that corresponds to a bean instance.

This method delegates all logic to the FormBuilder.generateForm(Template, Object, Map, String) method of the provided template instance.

Parameters:
template - the template instance where the generation should happen
beanInstance - the instance of the bean that should be used to generate the form
prefix - the prefix that will be prepended to all bean property names
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateEmptyForm(Template, Class, String), removeForm(Template, Class)

generateEmptyForm

public void generateEmptyForm(Template template,
                              Class beanClass)
                       throws EngineException
Generates a form that corresponds to an empty instance of a bean class.

Parameters:
template - the template instance where the generation should happen
beanClass - the class of the bean that should be used to generate the form
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateForm(Template, Object, String), generateEmptyForm(Template, Class, String), removeForm(Template, Class)

generateEmptyForm

public void generateEmptyForm(Template template,
                              Class beanClass,
                              String prefix)
                       throws EngineException
Generates a form that corresponds to an empty instance of a bean class.

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.

Parameters:
template - the template instance where the generation should happen
beanClass - the class of the bean that should be used to generate the form
prefix - the prefix that will be prepended to all bean property names
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateForm(Template, Object, String), removeForm(Template, Class)

removeForm

public void removeForm(Template template,
                       Class beanClass)
                throws EngineException
Removes a generated form, leaving the builder value tags empty again as if this form never had been generated.

Parameters:
template - the template instance where the form should be removed from
beanClass - the class of the bean that should be used to remove the form
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateForm(Template, Object, String), generateEmptyForm(Template, Class, String), removeForm(Template, Class)

removeForm

public void removeForm(Template template,
                       Class beanClass,
                       String prefix)
                throws EngineException
Removes a generated form, leaving the builder value tags empty again as if this form never had been generated.

This method delegates all logic to the FormBuilder.removeForm(Template, Class, String) method of the provided template instance.

Parameters:
template - the template instance where the form should be removed from
beanClass - the class of the bean that should be used to remove the form
prefix - the prefix that will be prepended to all bean property names
Throws:
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)
Since:
1.0
See Also:
FormBuilder, generateForm(Template, Object, String), generateEmptyForm(Template, Class, String)

selectSubmissionParameter

public 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.

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.

Parameters:
template - the template instance where the selection should happen
name - the name of the parameter
values - the values that should selected or checked
Returns:
a list with the identifiers of the template values that have been set, this is never null, when no values are set an empty list is returned
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
selectParameter(Template, String, String[]), selectInputParameter(Template, String, String[])

selectSubmissionParameter

public 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.

This is simply a convenience method that calls #selectSubmissionParameter(Template, String, String[]) with a single value string array.

Parameters:
template - the template instance where the selection should happen
name - the name of the parameter
value - the value that should selected or checked
Returns:
a list with the identifiers of the template values that have been set, this is never null, when no values are set an empty list is returned
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
selectParameter(Template, String, String[]), selectInputParameter(Template, String, String[]), selectSubmissionParameter(Template, String, String[])

setSubmissionBean

public void setSubmissionBean(Template template,
                              Object beanInstance)
                       throws TemplateException,
                              EngineException
Sets the content of all values that correspond to bean property names to the data of the bean properties.

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

Parameters:
template - the template instance that contains the values that will be filled in
beanInstance - the bean instance whose property values will be set
Throws:
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)
Since:
1.0
See Also:
setSubmissionBean(Template, Object, boolean)

setSubmissionBean

public void setSubmissionBean(Template template,
                              Object beanInstance,
                              boolean encode)
                       throws TemplateException,
                              EngineException
Sets the content of all values that correspond to bean property names to the data of the bean properties.

The identifiers of the values that will be filled in should have the following syntax:

PARAM:propertyName

Parameters:
template - the template instance that contains the values that will be filled in
beanInstance - the bean instance whose property values will be set
encode - true when the property values should be encoded according to the template type; or

false otherwise

Throws:
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)
Since:
1.0

getNamedSubmissionBean

public <BeanType> BeanType getNamedSubmissionBean(String beanName)
                                throws EngineException
Retrieves an instance of a named submission bean for the current submission and populates the properties with the parameter values. The class of the bean is looked up through its name, as is the property prefix.

This bean is not serialized or deserialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
beanName - the name of the submission bean
Returns:
the populated submission bean instance; or

null if no submission has been sent

Throws:
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)
Since:
1.0
See Also:
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)

getNamedSubmissionBean

public <BeanType> BeanType getNamedSubmissionBean(String submissionName,
                                                  String beanName)
                                throws EngineException
Retrieves an instance of a named submission bean and populates the properties with the parameter values. The class of the bean is looked up through its name, as is the property prefix.

This bean is not serialized or deserialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
submissionName - the name of the submission bean
beanName - the name of the submission that contains the bean
Returns:
the populated submission bean instance; or

null if the submission name doesn't correspond to the sent submission

Throws:
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)
Since:
1.0
See Also:
getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterValues(String), getParameterNames(), getParameterNames(String)

getSubmissionBean

public <BeanType> BeanType getSubmissionBean(Class<BeanType> beanClass)
                           throws EngineException
Retrieves an instance of a submission bean and populates the properties with the parameter values.

This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
beanClass - the class of the submission bean
Returns:
the populated submission bean instance; or

null if no submission has been sent

Throws:
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)
Since:
1.0
See Also:
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)

getSubmissionBean

public <BeanType> BeanType getSubmissionBean(Class<BeanType> beanClass,
                                             String prefix)
                           throws EngineException
Retrieves an instance of a submission bean and populates the properties with the parameter values, taking the provided prefix into account.

This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
beanClass - the class of the submission bean
prefix - the prefix that will be put in front of each property name
Returns:
the populated submission bean instance; or

null if no submission has been sent

Throws:
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)
Since:
1.0
See Also:
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)

getSubmissionBean

public <BeanType> BeanType getSubmissionBean(String submissionName,
                                             Class<BeanType> beanClass)
                           throws EngineException
Retrieves an instance of a submission bean and populates the properties with the parameter values.

This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
submissionName - the name of the submission
beanClass - the class of the submission bean
Returns:
the populated submission bean instance; or

null if the submission name doesn't correspond to the sent submission

Throws:
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)
Since:
1.0
See Also:
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)

getSubmissionBean

public <BeanType> BeanType getSubmissionBean(String submissionName,
                                             Class<BeanType> beanClass,
                                             String prefix)
                           throws EngineException
Retrieves an instance of a submission bean and populates the properties with the parameter values, taking the provided prefix into account.

This bean is not serialized or de-serialized, each property corresponds to a parameter and is individually sent by the client.

Parameters:
submissionName - the name of the submission
beanClass - the class of the submission bean
prefix - the prefix that will be put in front of each property name
Returns:
the populated submission bean instance; or

null if the submission name doesn't correspond to the sent submission

Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterValues(String), getParameterNames(), getParameterNames(String)

fillSubmissionBean

public void fillSubmissionBean(Object bean)
                        throws EngineException
Fills the properties of an existing bean with the parameter values of the submission that was sent.

Parameters:
bean - the submission bean instance that will be filled
Throws:
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)
Since:
1.0
See Also:
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)

fillSubmissionBean

public void fillSubmissionBean(String submissionName,
                               Object bean)
                        throws EngineException
Fills the properties of an existing bean with the parameter values of a submission.

Parameters:
submissionName - the name of the submission
bean - the submission bean instance that will be filled
Throws:
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)
Since:
1.0
See Also:
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)

fillSubmissionBean

public void fillSubmissionBean(Object bean,
                               String prefix)
                        throws EngineException
Fills the properties of an existing bean with the parameter values of the submission that was sent, taking the provided prefix into account.

Parameters:
bean - the submission bean instance that will be filled
prefix - the prefix that will be put in front of each property name
Throws:
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)
Since:
1.0
See Also:
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)

fillSubmissionBean

public void fillSubmissionBean(String submissionName,
                               Object bean,
                               String prefix)
                        throws EngineException
Fills the properties of an existing bean with the parameter values of a submission, taking the provided prefix into account.

Parameters:
submissionName - the name of the submission
bean - the submission bean instance that will be filled
prefix - the prefix that will be put in front of each property name
Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterValues(String), getParameterNames(), getParameterNames(String)

hasSubmission

public boolean hasSubmission()
                      throws EngineException
Indicates whether this element received a submission.

Returns:
true if a submission was sent to this element; and

false otherwise

Throws:
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)
Since:
1.0
See Also:
hasSubmission(String), getSubmission()

hasSubmission

public boolean hasSubmission(String submissionName)
                      throws EngineException
Indicates whether this element received a certain submission.

Parameters:
submissionName - the name of the submission
Returns:
true if the submission was sent to this element; and

false otherwise

Throws:
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)
Since:
1.0
See Also:
hasSubmission(), getSubmission()

getSubmission

public String getSubmission()
                     throws EngineException
Retrieves the name of the submission that was sent to this element

Returns:
the name of the submission; or

null if no submission was sent

Throws:
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)
Since:
1.0
See Also:
hasSubmission(), hasSubmission(String)

hasParameterValue

public boolean hasParameterValue(String name)
                          throws EngineException
Checks whether a value has been provided to an parameter.

Parameters:
name - the name of the parameter
Returns:
true if the parameter has a value; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterValues(String), getParameterNames(), getParameterNames(String)

isParameterEmpty

public boolean isParameterEmpty(String name)
                         throws EngineException
Checks whether a parameter is empty.

Parameters:
name - the name of the parameter
Returns:
true if the parameter is empty; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
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)

getParameter

public String getParameter(String name)
                    throws EngineException
Retrieves the value of a parameter.

Parameters:
name - the name of the parameter
Returns:
the value of the parameter; or

null if no value is present for this parameter

Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String, String), getParameterValues(String), getParameterNames(), getParameterNames(String)

getParameter

public String getParameter(String name,
                           String defaultValue)
                    throws EngineException
Retrieves the value of a parameter and returns a default value if no parameter value is present

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameterValues(String), getParameterNames(), getParameterNames(String)

getParameterNames

public ArrayList<String> getParameterNames()
                                    throws EngineException
Retrieves the names of all the parameters that are present.

Returns:
the list with the parameter names
Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterNames(String)

getParameterNames

public ArrayList<String> getParameterNames(String regexp)
                                    throws EngineException
Retrieves the names of all the parameters that are present and that match a regular expression.

Parameters:
regexp - the regular expression that will be used to filter the parameter names
Returns:
the list with the parameter names
Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterNames()

getParameterValues

public String[] getParameterValues(String name)
                            throws EngineException
Retrieves the values of a parameter.

Parameters:
name - the name of the parameter
Returns:
a string array with all the parameter values; or

null if no parameter values are present

Throws:
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)
Since:
1.0
See Also:
getNamedSubmissionBean(String, String), getSubmissionBean(String, Class, String), fillSubmissionBean(String, Object, String), hasParameterValue(String), isParameterEmpty(String), getParameter(String), getParameter(String, String), getParameterNames(), getParameterNames(String)

getParameterBoolean

public boolean getParameterBoolean(String name)
                            throws EngineException
Retrieves the value of a parameter and converts it to a boolean.

Parameters:
name - the name of the parameter
Returns:
the converted parameter value; or

false if no parameter value is present or if the parameter value is not a valid boolean

Throws:
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)
Since:
1.0
See Also:
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)

getParameterBoolean

public boolean getParameterBoolean(String name,
                                   boolean defaultValue)
                            throws EngineException
Retrieves the value of a parameter and converts it to a boolean, using a default value if no parameter value is present.

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the converted parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterInt

public int getParameterInt(String name)
                    throws EngineException
Retrieves the value of a parameter and converts it to an integer.

Parameters:
name - the name of the parameter
Returns:
the converted parameter value; or

0 if no parameter value is present or if the parameter value is not a valid integer

Throws:
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)
Since:
1.0
See Also:
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)

getParameterInt

public int getParameterInt(String name,
                           int defaultValue)
                    throws EngineException
Retrieves the value of a parameter and converts it to an integer, using a default value if no parameter value is present.

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the converted parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterLong

public long getParameterLong(String name)
                      throws EngineException
Retrieves the value of a parameter and converts it to a long.

Parameters:
name - the name of the parameter
Returns:
the converted parameter value; or

0L if no parameter value is present or if the parameter value is not a valid long

Throws:
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)
Since:
1.0
See Also:
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)

getParameterLong

public long getParameterLong(String name,
                             long defaultValue)
                      throws EngineException
Retrieves the value of a parameter and converts it to a long, using a default value if no parameter value is present.

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the converted parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterDouble

public double getParameterDouble(String name)
                          throws EngineException
Retrieves the value of a parameter and converts it to a double.

Parameters:
name - the name of the parameter
Returns:
the converted parameter value; or

0.0d if no parameter value is present or if the parameter value is not a valid double

Throws:
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)
Since:
1.0
See Also:
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)

getParameterDouble

public double getParameterDouble(String name,
                                 double defaultValue)
                          throws EngineException
Retrieves the value of a parameter and converts it to a double, using a default value if no parameter value is present.

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the converted parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterFloat

public float getParameterFloat(String name)
                        throws EngineException
Retrieves the value of a parameter and converts it to a float.

Parameters:
name - the name of the parameter
Returns:
the converted parameter value; or

0.0f if no parameter value is present or if the parameter value is not a valid float

Throws:
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)
Since:
1.0
See Also:
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)

getParameterFloat

public float getParameterFloat(String name,
                               float defaultValue)
                        throws EngineException
Retrieves the value of a parameter and converts it to a float, using a default value if no parameter value is present.

Parameters:
name - the name of the parameter
defaultValue - the default value that will be used when no parameter value is present
Returns:
the converted parameter value; or

the default value if no parameter value is present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterIntValues

public int[] getParameterIntValues(String name)
                            throws EngineException
Retrieves the values of a parameter as an array of integers.

Parameters:
name - the name of the parameter
Returns:
a integer array with all the parameter values; or

null if no parameter values are present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterLongValues

public long[] getParameterLongValues(String name)
                              throws EngineException
Retrieves the values of a parameter as an array of longs.

Parameters:
name - the name of the parameter
Returns:
a long array with all the parameter values; or

null if no parameter values are present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterFloatValues

public float[] getParameterFloatValues(String name)
                                throws EngineException
Retrieves the values of a parameter as an array of floats.

Parameters:
name - the name of the parameter
Returns:
a float array with all the parameter values; or

null if no parameter values are present

Throws:
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)
Since:
1.0
See Also:
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)

getParameterDoubleValues

public double[] getParameterDoubleValues(String name)
                                  throws EngineException
Retrieves the values of a parameter as an array of doubles.

Parameters:
name - the name of the parameter
Returns:
a double array with all the parameter values; or

null if no parameter values are present

Throws:
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)
Since:
1.0
See Also:
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)

getUploadedFileNames

public ArrayList<String> getUploadedFileNames(String regexp)
                                       throws EngineException
Retrieves the names of all the files that are present and that match a regular expression.

Parameters:
regexp - the regular expression that will be used to filter the file names
Returns:
the list with the file names
Throws:
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)
Since:
1.1
See Also:
getUploadedFileNames(), hasUploadedFile(String), isFileEmpty(String), getUploadedFile(String), getUploadedFiles(String)

getUploadedFileNames

public ArrayList<String> getUploadedFileNames()
                                       throws EngineException
Retrieves the list of uploaded file names.

Returns:
the list of uploaded file names
Throws:
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)
Since:
1.0
See Also:
getUploadedFileNames(String), hasUploadedFile(String), isFileEmpty(String), getUploadedFile(String), getUploadedFiles(String)

hasUploadedFile

public boolean hasUploadedFile(String name)
                        throws EngineException
Checks if a particular file has been uploaded during the last submission.

Parameters:
name - the name of the file, as declared in the submission
Returns:
true if the file was uploaded; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
getUploadedFileNames(String), getUploadedFileNames(), isFileEmpty(String), getUploadedFile(String), getUploadedFiles(String)

isFileEmpty

public boolean isFileEmpty(String name)
                    throws EngineException
Checks if an uploaded file wasn't sent or if it is empty.

Parameters:
name - the name of the file, as declared in the submission
Returns:
true if the file wasn't uploaded or empty; or

false otherwise

Throws:
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)
Since:
1.0
See Also:
getUploadedFileNames(String), getUploadedFileNames(), hasUploadedFile(String), getUploadedFile(String), getUploadedFiles(String)

getUploadedFile

public UploadedFile getUploadedFile(String name)
                             throws EngineException
Retrieves an uploaded file.

Parameters:
name - the name of the file, as declared in the submission
Returns:
the uploaded file; or

null if no file was uploaded

Throws:
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)
Since:
1.0
See Also:
getUploadedFileNames(String), getUploadedFileNames(), hasUploadedFile(String), isFileEmpty(String), getUploadedFiles(String)

getUploadedFiles

public UploadedFile[] getUploadedFiles(String name)
                                throws EngineException
Retrieves all files that have been uploaded for a particular name.

Parameters:
name - the name of the file, as declared in the submission
Returns:
the uploaded files; or

null if no files were uploaded for that name

Throws:
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)
Since:
1.0
See Also:
getUploadedFileNames(String), getUploadedFileNames(), hasUploadedFile(String), isFileEmpty(String), getUploadedFile(String)

getSubmissionQueryUrl

public CharSequence getSubmissionQueryUrl(String name)
                                   throws EngineException
Generates a query URL for a submission.

Parameters:
name - the name of the submission
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionQueryUrl

public CharSequence getSubmissionQueryUrl(String name,
                                          String pathinfo)
                                   throws EngineException
Generates a query URL for a submission and appends a pathinfo to the URL of the element.

Parameters:
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionQueryUrl

public CharSequence getSubmissionQueryUrl(String name,
                                          String[] parameterValues)
                                   throws EngineException
Generates a query URL for a submission with default parameter values.

Parameters:
name - the name of the submission
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionQueryUrl

public CharSequence getSubmissionQueryUrl(String name,
                                          String pathinfo,
                                          String[] parameterValues)
                                   throws EngineException
Generates a query URL for a submission and appends a pathinfo to the URL of the element, default parameter values can also be added.

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.

Parameters:
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionFormUrl

public CharSequence getSubmissionFormUrl()
                                  throws EngineException
Generates a form action URL for a submission.

Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionFormUrl

public CharSequence getSubmissionFormUrl(String pathinfo)
                                  throws EngineException
Generates a form action URL for a submission and appends a pathinfo to the URL of the element.

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.

Parameters:
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Returns:
the generated URL as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionFormParameters

public CharSequence getSubmissionFormParameters(String name)
                                         throws EngineException
Generates the hidden XHTML form parameters for a submission.

Parameters:
name - the name of the submission
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionFormParameters

public CharSequence getSubmissionFormParameters(String name,
                                                String[] parameterValues)
                                         throws EngineException
Generates the hidden XHTML form parameters for a submission and overrides the current output values only for this method.

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.

Parameters:
name - the name of the submission
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParametersJavascript(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

getSubmissionFormParametersJavascript

public CharSequence getSubmissionFormParametersJavascript(String name,
                                                          String[] parameterValues)
                                                   throws EngineException
Generates Javascript that will generate hidden XHTML form parameters for a submission and overrides the current output values only for this method.

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.

Parameters:
name - the name of the submission
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Returns:
the generated parameters as a character sequence
Throws:
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)
Since:
1.6
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionQuery

public void setSubmissionQuery(Template template,
                               String name)
                        throws TemplateException,
                               EngineException
Generates a query URL for a submission sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionQuery

public void setSubmissionQuery(Template template,
                               String name,
                               String pathinfo)
                        throws TemplateException,
                               EngineException
Generates a query URL for a submission with a pathinfo and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionQuery

public void setSubmissionQuery(Template template,
                               String name,
                               String[] parameterValues)
                        throws TemplateException,
                               EngineException
Generates a query URL for a submission with default parameter values and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionQuery

public void setSubmissionQuery(Template template,
                               String name,
                               String pathinfo,
                               String[] parameterValues)
                        throws TemplateException,
                               EngineException
Generates a query URL for a submission with pathinfo and default parameter values and sets it as the content of a template value.

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.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionForm(Template, String, String)

setSubmissionForm

public void setSubmissionForm(Template template,
                              String name)
                       throws TemplateException,
                              EngineException
Generates a form action URL for an submission and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionForm

public void setSubmissionForm(Template template,
                              String name,
                              String pathinfo)
                       throws TemplateException,
                              EngineException
Generates a form action URL for an submission with a pathinfo and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionForm

public void setSubmissionForm(Template template,
                              String name,
                              String[] parameterValues)
                       throws TemplateException,
                              EngineException
Generates a form action URL for an submission with default parameter values and sets it as the content of a template value.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[]), setSubmissionForm(Template, String, String)

setSubmissionForm

public void setSubmissionForm(Template template,
                              String name,
                              String pathinfo,
                              String[] parameterValues)
                       throws TemplateException,
                              EngineException
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.

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.

Parameters:
template - the template that will be used to set the value
name - the name of the submission
pathinfo - the pathinfo that will be appended; or null if no pathinfo should be appended
parameterValues - an array of string pairs that will be used to set default parameter values; or null if no default parameter values should be used
Throws:
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)
Since:
1.0
See Also:
getSubmissionQueryUrl(String, String, String[]), getSubmissionFormUrl(String), getSubmissionFormParameters(String, String[]), setSubmissionQuery(Template, String, String, String[])

processEmbeddedElement

public void processEmbeddedElement(Template template,
                                   String elementId)
                            throws TemplateException,
                                   EngineException
Processes an embedded element without a differentiator in a template.

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.

Parameters:
template - the template that will be used to process the embedded template
elementId - the identifier of the element
Throws:
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)
Since:
1.0
See Also:
processEmbeddedElement(Template, String, Object), processEmbeddedElement(Template, String, String), processEmbeddedElement(Template, String, String, Object)

processEmbeddedElement

public void processEmbeddedElement(Template template,
                                   String elementId,
                                   Object data)
                            throws TemplateException,
                                   EngineException
Processes an embedded element without a differentiator in a template and pass on data to the processed embedded element.

See processEmbeddedElement(Template, String) for more information.

Parameters:
template - the template that will be used to process the embedded template
elementId - the identifier of the element
data - the data that will be available from within the embedded element
Throws:
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)
Since:
1.5
See Also:
processEmbeddedElement(Template, String), processEmbeddedElement(Template, String, String), processEmbeddedElement(Template, String, String, Object)

processEmbeddedElement

public void processEmbeddedElement(Template template,
                                   String elementId,
                                   String differentiator)
                            throws TemplateException,
                                   EngineException
Processes an embedded element with a differentiator in a template.

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.

Parameters:
template - the template that will be used to process the embedded template
elementId - the identifier of the element
differentiator - the differentiator that will be used; or null if no differentiator should be used
Throws:
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)
Since:
1.0
See Also:
processEmbeddedElement(Template, String), processEmbeddedElement(Template, String, Object), processEmbeddedElement(Template, String, String, Object)

processEmbeddedElement

public void processEmbeddedElement(Template template,
                                   String elementId,
                                   String differentiator,
                                   Object data)
                            throws TemplateException,
                                   EngineException
Processes an embedded element with a differentiator in a template and pass on data to the processed embedded element.

See processEmbeddedElement(Template, String, String) for more information.

Parameters:
template - the template that will be used to process the embedded template
elementId - the identifier of the element
differentiator - the differentiator that will be used; or
data - the data that will be available from within the embedded element null if no differentiator should be used
Throws:
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)
Since:
1.5
See Also:
processEmbeddedElement(Template, String), processEmbeddedElement(Template, String, Object), processEmbeddedElement(Template, String, String)

evaluateExpressionRoleUserTags

public List<String> evaluateExpressionRoleUserTags(Template template,
                                                   String id)
                                            throws TemplateException,
                                                   EngineException
Evaluate the 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-->

Parameters:
template - the template instance where the evaluation should happen
id - the block and the value identifier
Returns:
the list of names of the template values that were generated
Throws:
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)
Since:
1.0

exit

public void exit(String name)
          throws EngineException
Activates an exit.

This immediately breaks out of the element and notifies the engine that the next step of the flow must be looked up and executed.

Parameters:
name - the name of the exit
Throws:
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)
Since:
1.0

child

public void child()
           throws EngineException
Interrupts the execution in this element and transfers the execution to the child element.

Throws:
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)
Since:
1.0

defer

public void defer()
           throws EngineException
Interrupts the execution in RIFE completely and defers it to the servlet container.

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.

Throws:
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)
Since:
1.0

forward

public void forward(String url)
             throws EngineException
Interrupts the execution in this element and forwards the entire request to another URL.

The response of the forwarded request will be sent the to original client, as if the request was sent directly to the forwarded URL.

Parameters:
url - the URL to which the request will be forwarded
Throws:
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)
Since:
1.0

redirect

public void redirect(String url)
              throws EngineException
Interrupts the execution in this element and redirects the client to another URL.

Parameters:
url - the URL to which the request will be redirected
Throws:
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)
Since:
1.0

getResponseCharacterEncoding

public String getResponseCharacterEncoding()
                                    throws EngineException
Returns the name of the character encoding (MIME charset) used for the body sent in this response. The character encoding may have been specified explicitly using the 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.

Returns:
a String specifying the name of the character encoding, for example, UTF-8
Throws:
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)
Since:
1.0
See Also:
#setResponseLocale

setContentLength

public void setContentLength(int length)
                      throws EngineException
Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header.

Parameters:
length - an integer specifying the length of the content being returned to the client; sets the Content-Length header
Throws:
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)
Since:
1.0

setContentType

public void setContentType(String type)
                    throws EngineException
Sets the content type of the response being sent to the client, if the response has not been committed yet. The given content type may include a character encoding specification, for example, 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.

Parameters:
type - a String specifying the MIME type of the content
Throws:
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)
Since:
1.0
See Also:
setResponseLocale(java.util.Locale), getOutputStream()

addHeader

public void addHeader(String name,
                      String value)
               throws EngineException
Adds a response header with the given name and value. This method allows response headers to have multiple values.

Parameters:
name - the name of the header
value - the additional header value If it contains octet string, it should be encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
Throws:
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)
Since:
1.0
See Also:
setHeader(java.lang.String, java.lang.String)

addDateHeader

public void addDateHeader(String name,
                          long date)
                   throws EngineException
Sets a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Parameters:
name - the name of the header to set
date - the assigned date value
Throws:
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)
Since:
1.0
See Also:
setDateHeader(java.lang.String, long)

addIntHeader

public void addIntHeader(String name,
                         int value)
                  throws EngineException
Adds a response header with the given name and integer value. This method allows response headers to have multiple values.

Parameters:
name - the name of the header
value - the assigned integer value
Throws:
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)
Since:
1.0
See Also:
setIntHeader(java.lang.String, int)

containsHeader

public boolean containsHeader(String name)
                       throws EngineException
Returns a boolean indicating whether the named response header has already been set.

Parameters:
name - the header name
Returns:
true if the named response header has already been set; or

false otherwise

Throws:
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)
Since:
1.0

sendError

public void sendError(int statusCode)
               throws EngineException
Sends an error response to the client using the specified status code and clearing the buffer.

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.

Parameters:
statusCode - the error status code
Throws:
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)
Since:
1.0
See Also:
sendError(int, String)

sendError

public void sendError(int statusCode,
                      String message)
               throws EngineException
Sends an error response to the client using the specified status. The server defaults to creating the response to look like an HTML-formatted server error page containing the specified message, setting the content type to "text/html", leaving cookies and other headers unmodified. If an error-page declaration has been made for the web application corresponding to the status code passed in, it will be served back in preference to the suggested msg parameter.

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.

Parameters:
statusCode - the error status code
message - the descriptive message
Throws:
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)
Since:
1.0
See Also:
sendError(int)

sendRedirect

public void sendRedirect(String location)
                  throws EngineException
Sends a temporary redirect response to the client using the specified redirect location URL. This method can accept relative URLs; the servlet container must convert the relative URL to an absolute URL before sending the response to the client. If the location is relative without a leading '/' the container interprets it as relative to the current request URI. If the location is relative with a leading '/' the container interprets it as relative to the servlet container root.

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.

Parameters:
location - the redirect location URL
Throws:
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)
Since:
1.0

preventCaching

public void preventCaching()
                    throws EngineException
Sets up the current request to prevent all caching of the response by the client.

Throws:
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)
Since:
1.0

setDateHeader

public void setDateHeader(String name,
                          long date)
                   throws EngineException
Sets a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Parameters:
name - the name of the header to set
date - the assigned date value
Throws:
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)
Since:
1.0
See Also:
containsHeader(java.lang.String), addDateHeader(java.lang.String, long)

setHeader

public void setHeader(String name,
                      String value)
               throws EngineException
Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Parameters:
name - the name of the header
value - the header value If it contains octet string, it should be encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
Throws:
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)
Since:
1.0
See Also:
containsHeader(java.lang.String), addHeader(java.lang.String, java.lang.String)

setIntHeader

public void setIntHeader(String name,
                         int value)
                  throws EngineException
Sets a response header with the given name and integer value. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Parameters:
name - the name of the header
value - the assigned integer value
Throws:
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)
Since:
1.0
See Also:
containsHeader(java.lang.String), addIntHeader(java.lang.String, int)

setStatus

public void setStatus(int statusCode)
               throws EngineException
Sets the status code for this response. This method is used to set the return status code when there is no error (for example, for the status codes SC_OK or SC_MOVED_TEMPORARILY). If there is an error, and the caller wishes to invoke an error-page defined in the web application, the sendError method should be used instead.

The container clears the buffer and sets the Location header, preserving cookies and other headers.

Parameters:
statusCode - the status code
Throws:
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)
Since:
1.0
See Also:
sendError(int)

setResponseLocale

public void setResponseLocale(Locale locale)
                       throws EngineException
Sets the locale of the response, if the response has not been committed yet. It also sets the response's character encoding appropriately for the locale, if the character encoding has not been explicitly set using 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.

Parameters:
locale - the locale of the response
Throws:
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)
Since:
1.0
See Also:
getResponseLocale(), setContentType(java.lang.String)

getResponseLocale

public Locale getResponseLocale()
                         throws EngineException
Returns the locale specified for this response using the 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.

Returns:
the locale of the response
Throws:
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)
Since:
1.0
See Also:
setResponseLocale(java.util.Locale)

getServerRootUrl

public String getServerRootUrl()
                        throws EngineException
Returns the root URL of the server that is running this web applications.

This includes the protocol, the server name and the server port, for example: http://www.somehost.com:8080.

Returns:
the server's root url
Throws:
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)
Since:
1.0

getWebappRootUrl

public String getWebappRootUrl()
                        throws EngineException
Returns the root URL of this web applications.

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/.

Returns:
the web application's root url
Throws:
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)
Since:
1.0

getRequestCharacterEncoding

public String getRequestCharacterEncoding()
                                   throws EngineException
Returns the name of the character encoding used in the body of this request. This method returns null if the request does not specify a character encoding

Returns:
a String containing the name of the character encoding; or

null if the request does not specify a character encoding

Throws:
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)
Since:
1.0

getContentType

public String getContentType()
                      throws EngineException
Returns the MIME type of the body of the request, or null if the type is not known. For HTTP servlets, same as the value of the CGI variable CONTENT_TYPE.

Returns:
a String containing the name of the MIME type of the request; or

null if the type is not known

Throws:
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)
Since:
1.0

getDateHeader

public long getDateHeader(String name)
                   throws EngineException
Returns the value of the specified request header as a 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.

Parameters:
name - a String specifying the name of the header
Returns:
a 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
Throws:
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)
Since:
1.0

getHeader

public String getHeader(String name)
Returns the value of the specified request header as a 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.

Parameters:
name - a String specifying the header name
Returns:
a String containing the value of the requested header; or

null if the request does not have a header of that name

Throws:
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)
Since:
1.0

getHeaderNames

public Enumeration getHeaderNames()
                           throws EngineException
Returns an enumeration of all the header names this request contains. If the request has no headers, this method returns an empty enumeration.

Some servlet containers do not allow servlets to access headers using this method, in which case this method returns null

Returns:
an enumeration of all the header names sent with this request; if the request has no headers, an empty enumeration; if the servlet container does not allow servlets to use this method, null
Throws:
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)
Since:
1.0

getHeaders

public Enumeration getHeaders(String name)
                       throws EngineException
Returns all the values of the specified request header as an 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.

Parameters:
name - a String specifying the header name
Returns:
an 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.
Throws:
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)
Since:
1.0

getInitConfig

public InitConfig getInitConfig()
                         throws EngineException
Retrieves initialization configuration of this web application.

Returns:
the initialization configuration instance of this web application
Throws:
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)
Since:
1.0
See Also:
InitConfig

getIntHeader

public int getIntHeader(String name)
                 throws EngineException
Returns the value of the specified request header as an 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.

Parameters:
name - a String specifying the name of a request header
Returns:
an integer expressing the value of the request header; or

-1 if the request doesn't have a header of this name

Throws:
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)
Since:
1.0

getRequestLocale

public Locale getRequestLocale()
                        throws EngineException
Returns the preferred 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.

Returns:
the preferred Locale for the client
Throws:
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)
Since:
1.0

getRequestLocales

public Enumeration getRequestLocales()
                              throws EngineException
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. 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.

Returns:
an Enumeration of preferred Locale objects for the client
Throws:
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)
Since:
1.0

getPathInfo

public String getPathInfo()
                   throws EngineException
Returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the element URL but precedes the query string and will start with a "/" character.

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.

Returns:
a 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

Throws:
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)
Since:
1.0

getMethod

public RequestMethod getMethod()
                        throws EngineException
Returns the method of this request.

Returns:
the method of this request
Throws:
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)
Since:
1.0

getProtocol

public String getProtocol()
                   throws EngineException
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.

Returns:
a String containing the protocol name and version number
Throws:
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)
Since:
1.0

getRemoteAddr

public String getRemoteAddr()
                     throws EngineException
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.

Returns:
a String containing the IP address of the client that sent the request
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0

getRemoteUser

public String getRemoteUser()
                     throws EngineException
Returns the login of the user making this request, if the user has been authenticated, or 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.

Returns:
a String specifying the login of the user making this request; or

null if the user login is not known

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0

getRemoteHost

public String getRemoteHost()
                     throws EngineException
Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.

Returns:
a String containing the fully qualified name of the client
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0

getServerPort

public int getServerPort()
                  throws EngineException
Returns the port number to which the request was sent. It is the value of the part after ":" in the Host header value, if any, or the server port where the client connection was accepted on.

Returns:
an integer specifying the port number
Throws:
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)
Since:
1.0

getScheme

public String getScheme()
                 throws EngineException
Returns the name of the scheme used to make this request, for example, http, https, or ftp. Different schemes have different rules for constructing URLs, as noted in RFC 1738.

Returns:
a String containing the name of the scheme used to make this request
Throws:
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)
Since:
1.0

getServerName

public String getServerName()
                     throws EngineException
Returns the host name of the server to which the request was sent. It is the value of the part before ":" in the Host header value, if any, or the resolved server name, or the server IP address.

Returns:
a String containing the name of the server
Throws:
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)
Since:
1.0

isSecure

public boolean isSecure()
                 throws EngineException
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.

Returns:
a boolean indicating if the request was made using a secure channel
Throws:
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)
Since:
1.0

getRequestAttribute

public Object getRequestAttribute(String name)
                           throws EngineException
Returns the value of the named attribute as an 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.*.

Parameters:
name - a String specifying the name of the attribute
Returns:
an Object containing the value of the attribute, or null if the attribute does not exist
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
hasRequestAttribute(java.lang.String), getRequestAttributeNames(), removeRequestAttribute(java.lang.String), setRequestAttribute(java.lang.String, java.lang.Object)

hasRequestAttribute

public boolean hasRequestAttribute(String name)
                            throws EngineException
Checks if a request attribute exists.

Parameters:
name - a String specifying the name of the attribute
Returns:
true if the attribute exists; or

false otherwise

Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getRequestAttribute(java.lang.String), getRequestAttributeNames(), removeRequestAttribute(java.lang.String), setRequestAttribute(java.lang.String, java.lang.Object)

getRequestAttributeNames

public Enumeration getRequestAttributeNames()
                                     throws EngineException
Returns an 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.

Returns:
an Enumeration of strings containing the names of the request's attributes
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getRequestAttribute(java.lang.String), hasRequestAttribute(java.lang.String), removeRequestAttribute(java.lang.String), setRequestAttribute(java.lang.String, java.lang.Object)

removeRequestAttribute

public void removeRequestAttribute(String name)
                            throws EngineException
Removes an attribute from this request. This method is not generally needed as attributes only persist as long as the request is being handled.

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.

Parameters:
name - a String specifying the name of the attribute to remove
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getRequestAttribute(java.lang.String), hasRequestAttribute(java.lang.String), getRequestAttributeNames(), setRequestAttribute(java.lang.String, java.lang.Object)

setRequestAttribute

public void setRequestAttribute(String name,
                                Object object)
                         throws EngineException
Stores an attribute in this request. Attributes are reset between requests.

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).

Parameters:
name - a String specifying the name of the attribute
object - the Object to be stored
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
getRequestAttribute(java.lang.String), hasRequestAttribute(java.lang.String), getRequestAttributeNames(), removeRequestAttribute(java.lang.String)

getElementContext

public ElementContext getElementContext()
                                 throws EngineException
Retrieves the context of this element.

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.

Returns:
the context that belongs to this element instance
Throws:
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)
Since:
1.0
See Also:
ElementContext, setProhibitRawAccess(boolean)

getHttpServletRequest

public HttpServletRequest getHttpServletRequest()
                                         throws EngineException
Returns the current 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.

Returns:
the current HttpServletRequest
Throws:
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)
Since:
1.0
See Also:
setProhibitRawAccess(boolean)

getHttpServletResponse

public HttpServletResponse getHttpServletResponse()
                                           throws EngineException
Returns the current 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.

Returns:
the current HttpServletResponse
Throws:
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)
Since:
1.0
See Also:
setProhibitRawAccess(boolean)

getServletContext

public ServletContext getServletContext()
                                 throws EngineException
Returns the 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.

Returns:
the ServletContext
Throws:
EngineException - if there's no active element context (eg. you're using this method inside the constructor instead of inside the initialize() method)
Since:
1.0
See Also:
setProhibitRawAccess(boolean)

setElementContext

public void setElementContext(ElementContext elementContext)

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: ContinuableObject
When continuations are resumed, they are by default cloned to ensure that their state is properly isolated. Implementing this method allows for full customization of the cloning behavior.

Specified by:
clone in interface ContinuableObject
Overrides:
clone in class Object
Returns:
the cloned instance of this continuable object
Throws:
CloneNotSupportedException
See Also:
ContinuationConfigRuntime.cloneContinuations(T)


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.