| java.lang.Object com.uwyn.rife.engine.ElementSupport
All known Subclasses: com.uwyn.rife.engine.Element,
ElementSupport | public class ElementSupport implements ContinuableObject,Cloneable(Code) | | The ElementSupport class provides all the methods to
communicate from inside an element with the context in which it is being
executed.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3846 $ See Also: ElementAware since: 1.0 |
Method Summary | |
ElementContext | _getElementContext() | ElementInfo | _getElementInfo() | public void | addDateHeader(String name, long date) Sets a response header with the given name and date-value. | public void | addHeader(String name, String value) Adds a response header with the given name and value. | public void | addIntHeader(String name, int value) Adds a response header with the given name and integer value. | public void | addOutputValue(String name, String value) Adds a value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, boolean value) Adds a boolean value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, char value) Adds a char value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, char[] value) Adds values from an array of char s to the current values
of an output.
Parameters: name - the name of the output Parameters: value - the values that have to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, double value) Adds a double value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, float value) Adds a float value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, int value) Adds a int value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, long value) Adds a long value to the current values of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValue(String name, Object value) Adds a generic object value to the current values of an
output.
Parameters: name - the name of the output Parameters: value - the value that has to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | addOutputValues(String name, String[] values) Adds values to the current values of an output.
Parameters: name - the name of the output Parameters: values - the values that have to be added exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | final public void | answer() Resumes the execution in the calling element by providing no answer
object. | final public void | answer(Object answer) Resumes the execution in the calling element by providing an answer. | final public Object | call(String exit) Pauses the execution of the element and creates a new continuation. | public void | child() Interrupts the execution in this element and transfers the execution to
the child element.
exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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. | 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
ElementSupport.setChildTrigger .
Parameters: name - the name of the variable that initiated the child trigger Parameters: values - the values of the variable that initiated the childtrigger true if the execution should be interrupted andstep down the inheritance stack (ie. | public void | clearBuffer() Clears the request text output buffer, all buffered text will be
discarded.
If no text buffer is active, this method doesn't do anything.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public void | clearNamedOutputBean(String name) Clears the outputs that correspond to the properties of a named output
bean. | public void | clearOutput(String name) Clears the output value of an output.
Parameters: name - the name of the output exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if no output is known with this name; or ifyou don't have access to the request data (eg. | public void | clearOutputBean(Class beanClass) Clears the outputs that correspond to the properties of an output bean.
Parameters: beanClass - the class of the output bean exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputbean is known with this name; if you don't have access to the requestdata (eg. | public void | clearOutputBean(Class beanClass, String prefix) 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 Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public Object | clone() | public boolean | cloneContinuations() Indicates whether continuations are cloned at each step.
Instead of using the
ElementSupport.setCloneContinuations(boolean) method,
one can also overload this method to configure the cloning. | public boolean | containsHeader(String name) Returns a boolean indicating whether the named response header has
already been set.
Parameters: name - the header name true if the named response header has already beenset; orfalse otherwise exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg.
| public void | defer() 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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. | public boolean | duringStepBack() Indicates whether the current element execution is a step back. | void | enableRequestAccess(boolean enabled) | public void | enableTextBuffer(boolean enabled) Enables or disables the response text buffer. | 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 HTMLstring. | 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 XMLstring. | public List<String> | evaluateExpressionRoleUserTags(Template template, String id) Evaluate the ROLEUSER expression tags in a template.
The
ElementSupport.print(Template) method automatically evaluates all role
user expression tags. | public void | exit(String name) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch this exception; or there's no active element context (eg. | public void | fillSubmissionBean(Object bean) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the population of the bean; or if you don't have accessto the request data (eg. | public void | fillSubmissionBean(String submissionName, Object bean) Fills the properties of an existing bean with the parameter values of a
submission.
Parameters: submissionName - the name of the submission Parameters: bean - the submission bean instance that will be filled exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the population of the bean; or if you don't have accessto the request data (eg. | public 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.
Parameters: bean - the submission bean instance that will be filled Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the population of the bean; or if you don't have accessto the request data (eg. | public 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.
Parameters: submissionName - the name of the submission Parameters: bean - the submission bean instance that will be filled Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the population of the bean; or if you don't have accessto the request data (eg. | public void | flush() 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the output of the content; or if you don't have access tothe request data (eg. | public void | forward(String url) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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. | public void | generateEmptyForm(Template template, Class beanClass) Generates a form that corresponds to an empty instance of a bean class.
Parameters: template - the template instance where the generation shouldhappen Parameters: beanClass - the class of the bean that should be used to generatethe form exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean; or if there's no activeelement context (eg. | public void | generateEmptyForm(Template template, Class beanClass, String prefix) 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
com.uwyn.rife.site.FormBuilder.generateForm(TemplateClassMapString) method of the provided template instance.
Parameters: template - the template instance where the generation shouldhappen Parameters: beanClass - the class of the bean that should be used to generatethe form Parameters: prefix - the prefix that will be prepended to all bean propertynames exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean; or if there's no activeelement context (eg. | public void | generateForm(Template template, Object beanInstance) Generates a form that corresponds to a bean instance.
Parameters: template - the template instance where the generation shouldhappen Parameters: beanInstance - the instance of the bean that should be used togenerate the form exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean instance; or if there'sno active element context (eg. | public void | generateForm(Template template, Object beanInstance, String prefix) Generates a form that corresponds to a bean instance.
This method delegates all logic to the
com.uwyn.rife.site.FormBuilder.generateForm(TemplateObjectMapString) method of the provided template instance.
Parameters: template - the template instance where the generation shouldhappen Parameters: beanInstance - the instance of the bean that should be used togenerate the form Parameters: prefix - the prefix that will be prepended to all bean propertynames exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean instance; or if there'sno active element context (eg. | public String | getContentType() Returns the MIME type of the body of the request, or null
if the type is not known. | public String | getContinuationId() Returns the unique identifier of the current continuation.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public Cookie | getCookie(String name) Retrieves a cookie.
Parameters: name - the name of the cookie. exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public String | getCookieValue(String name) Retrieves the value of a cookie.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public String | getCookieValue(String name, String defaultValue) Retrieves the value of a named cookie, using a default value as
fallback.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public boolean | getCookieValueBoolean(String name) Retrieves the value of a named cookie and converts it to a boolean.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public double | getCookieValueDouble(String name) Retrieves the value of a named cookie and converts it to a double.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public float | getCookieValueFloat(String name) Retrieves the value of a named cookie and converts it to a float.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public int | getCookieValueInt(String name) Retrieves the value of a named cookie and converts it to an integer.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public long | getCookieValueLong(String name) Retrieves the value of a named cookie and converts it to a long.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the cookie Parameters: defaultValue - the default value that will be used when no cookievalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public Map<String, String> | getCookieValues() Retrieves all current cookies names with their values.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public long | getDateHeader(String name) Returns the value of the specified request header as a
long value that represents a Date object. | public String | getDeclarationName() Retrieves the declaration name of this element.
the declaration name exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public ElementDeployer | getDeployer() Retrieves the deployer of this element.
the instance of the deployer that was used to deploy theelement; ornull if no deployment class has been declared exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg.
| public Class | getDeploymentClass() Retrieves the class that will be used for the deployment of the
element. | ElementAware | getElementAware() | public ElementContext | getElementContext() 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. | public ElementInfo | getElementInfo() Retrieves the declaration information of this element.
the declaration information of this element exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public Object | getEmbedData() Retrieves the data that was passed on for the processing of this embedded element.
the value from the embedded template; ornull if no data was provided or if the current element isnot embedded exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public String | getEmbedDifferentiator() Retrieves the differentiator that was used to set this embedded element apart.
this embedded element's differentiator; ornull if this embedded element didn't have a differentiator exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public Properties | getEmbedProperties() Retrieves the embed value as a property list (see
ElementSupport.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
java.util.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 '.
the embed value parsed as a property list; or null if no default value was provided, if the current element is notembedded exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public String | getEmbedValue() 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. | public ElementSupport | getEmbeddingElement() Retrieves the element that is embedding the current element.
the embedding element; ornull if this element is not embedded exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public Template | getEmbeddingTemplate() Retrieves the template that is embedding the current element.
the embedding template; ornull if this element is not embedded exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public CharSequence | getExitFormParameters(String name) Generates the XHTML hidden form parameters for an exit.
Parameters: name - the name of the exit exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
This will take the current element context into account with the
available outputs, global variables, ... | public 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.
This will take the current element context into account with the
available outputs, global variables, ... | public CharSequence | getExitFormUrl(String name) Generates a form action URL for an exit.
Parameters: name - the name of the exit exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
This will take the current element context into account with the
available outputs, global variables, ... | public CharSequence | getExitQueryUrl(String name) Generates a query URL for an exit.
Parameters: name - the name of the exit exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public CharSequence | getExitQueryUrl(String name, String pathinfo) 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 Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public CharSequence | getExitQueryUrl(String name, String[] outputValues) Generates a query URL for an exit and overrides the current output
values only for this method.
Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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. | public String | getHeader(String name) Returns the value of the specified request header as a
String . | public Enumeration | getHeaderNames() 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
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public Enumeration | getHeaders(String name) 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 . | public Template | getHtmlTemplate() Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEHTML 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.
exception: com.uwyn.rife.template.exceptions.TemplateException - if anerror occurred during the retrieval, parsing or compilation of thetemplate exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the initialization of the template in the elementcontext; or if you don't have access to the request data (eg. | public Template | getHtmlTemplate(String name) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEHTML enginehtml type.
Parameters: name - the name of the template. | public Template | getHtmlTemplate(String name, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEHTML enginehtml type.
Parameters: name - the name of the template. | public Template | getHtmlTemplate(String name, String encoding) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEHTML enginehtml type.
Parameters: name - the name of the template. | public Template | getHtmlTemplate(String name, String encoding, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEHTML enginehtml type.
The special engine template types contain additional block and value
filters to offer the following features:
- embedded elements
(eg.: <!--V
'ELEMENT:my.elementid'/--> )
- role user context for scripted block assignment to values
(eg.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V--> <!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B--> )
Non-engine versions of the same template types are not able to
provide these functionalities.
Parameters: name - the name of the template. | public HttpServletRequest | getHttpServletRequest() 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. | public HttpServletResponse | getHttpServletResponse() 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. | public InitConfig | getInitConfig() Retrieves initialization configuration of this web application.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public String | getInput(String name) Retrieves the value of an input.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public String | getInput(String name, String defaultValue) Retrieves the value of an input and returns a default value if no input
value is present
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public BeanType | getInputBean(Class<BeanType> beanClass) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation of the bean; or if you don't haveaccess to the request data (eg. | public 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.
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 Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation of the bean; or if you don't haveaccess to the request data (eg. | public boolean | getInputBoolean(String name) Retrieves the value of an input and converts it to a boolean.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public Date | getInputDate(String name) Retrieves the value of an input and converts it to a Date.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public double | getInputDouble(String name) Retrieves the value of an input and converts it to a double.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public float | getInputFloat(String name) Retrieves the value of an input and converts it to a float.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public int | getInputInt(String name) Retrieves the value of an input and converts it to an integer.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public long | getInputLong(String name) Retrieves the value of an input and converts it to a long.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public 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.
Parameters: name - the name of the input Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public TargetType | getInputSerializable(String name) Retrieves the value of a serialized input.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public TargetType | getInputSerializable(String name, TargetType defaultValue) 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 Parameters: defaultValue - the default value that will be used when no inputvalue is present exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public String[] | getInputValues(String name) Retrieves the values of an input.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public int | getIntHeader(String name) Returns the value of the specified request header as an
int . | public RequestMethod | getMethod() Returns the method of this request.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public BeanType | getNamedInputBean(String name) Retrieves an instance of a named input bean and populates the
properties with the input values. | public BeanType | getNamedSubmissionBean(String beanName) Retrieves an instance of a named submission bean for the current
submission and populates the properties with the parameter values. | public BeanType | getNamedSubmissionBean(String submissionName, String beanName) Retrieves an instance of a named submission bean and populates the
properties with the parameter values. | public String[] | getOutput(String name) Retrieves the value of the ouput.
Parameters: name - the name of the output the textual value of the output as it's used by framework; or null if the output couldn't be found. exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public OutputStream | getOutputStream() Retrieves an output stream to send binary data through the response.
Note that the text output is written to the same output stream. | public String | getParameter(String name) Retrieves the value of a parameter.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public String | getParameter(String name, String defaultValue) Retrieves the value of a parameter and returns a default value if no
parameter value is present
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public boolean | getParameterBoolean(String name) Retrieves the value of a parameter and converts it to a boolean.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public double | getParameterDouble(String name) Retrieves the value of a parameter and converts it to a double.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public double[] | getParameterDoubleValues(String name) Retrieves the values of a parameter as an array of doubles.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public float | getParameterFloat(String name) Retrieves the value of a parameter and converts it to a float.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public float[] | getParameterFloatValues(String name) Retrieves the values of a parameter as an array of floats.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public int | getParameterInt(String name) Retrieves the value of a parameter and converts it to an integer.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public int[] | getParameterIntValues(String name) Retrieves the values of a parameter as an array of integers.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public long | getParameterLong(String name) Retrieves the value of a parameter and converts it to a long.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public 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.
Parameters: name - the name of the parameter Parameters: defaultValue - the default value that will be used when noparameter value is present exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public long[] | getParameterLongValues(String name) Retrieves the values of a parameter as an array of longs.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public ArrayList<String> | getParameterNames() Retrieves the names of all the parameters that are present.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public ArrayList<String> | getParameterNames(String regexp) 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 theparameter names exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public String[] | getParameterValues(String name) Retrieves the values of a parameter.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public String | getPathInfo() Returns any extra path information associated with the URL the client
sent when it made this request. | public Object | getProperty(String name) Retrieves the value of an injected named property.
Note that there are two types of properties, fixed value properties
(
com.uwyn.rife.ioc.PropertyValueObject string literals ) and dynamic value
properties (
com.uwyn.rife.ioc.PropertyValueParticipant participant objects ,
com.uwyn.rife.ioc.PropertyValueTemplate template instances , ...). | public Object | getProperty(String name, Object defaultValue) Retrieves the value of an injected named property, using a default value
as fallback.
Parameters: name - the name of the property Parameters: defaultValue - the value that should be used if theproperty can't be found exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public String | getPropertyString(String name) Retrieves the value of an injected named property and converts it to a
string.
Parameters: name - the name of the property exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public 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.
Parameters: name - the name of the property Parameters: defaultValue - the string literal that should be used if theproperty can't be found exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public 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 Parameters: type - the class you want the property to be converted to exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public 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 Parameters: type - the class you want the property to be converted to Parameters: defaultValue - the object that should be used if theproperty can't be found exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public String | getProtocol() Returns the name and version of the protocol the request uses in the
form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public String | getRemoteAddr() Returns the Internet Protocol (IP) address of the client or last proxy
that sent the request.
exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public String | getRemoteHost() Returns the fully qualified name of the client or the last proxy that
sent the request. | public 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. | public Object | getRequestAttribute(String name) 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. | public Enumeration | getRequestAttributeNames() Returns an Enumeration containing the names of the
attributes available to this request. | public String | getRequestCharacterEncoding() Returns the name of the character encoding used in the body of this
request. | public Locale | getRequestLocale() Returns the preferred Locale that the client will accept
content in, based on the Accept-Language header. | public 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. | public String | getResponseCharacterEncoding() Returns the name of the character encoding (MIME charset) used for the
body sent in this response. | public Locale | getResponseLocale() Returns the locale specified for this response using the
ElementSupport.setResponseLocale method. | public String | getScheme() Returns the name of the scheme used to make this request, for example,
http , https , or ftp . | public String | getServerName() Returns the host name of the server to which the request was sent. | public int | getServerPort() Returns the port number to which the request was sent. | public String | getServerRootUrl() 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 .
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public ServletContext | getServletContext() 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. | public Site | getSite() Retrieves the site in which this element is declared.
a site instance exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public String | getSourceName() Retrieves the source implementation name of this element.
the source implementation name exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public String | getSubmission() Retrieves the name of the submission that was sent to this element
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public BeanType | getSubmissionBean(Class<BeanType> beanClass) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation or the population of the bean; or ifyou don't have access to the request data (eg. | public 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.
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 Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation or the population of the bean; or ifyou don't have access to the request data (eg. | public BeanType | getSubmissionBean(String submissionName, Class<BeanType> beanClass) 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 Parameters: beanClass - the class of the submission bean exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation or the population of the bean; or ifyou don't have access to the request data (eg. | public 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.
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 Parameters: beanClass - the class of the submission bean Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the instantiation or the population of the bean; or ifyou don't have access to the request data (eg. | public CharSequence | getSubmissionFormParameters(String name) Generates the hidden XHTML form parameters for a submission.
Parameters: name - the name of the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public 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.
This will take the current element context into account with the
available inputs, global variables, ... | public 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.
This will take the current element context into account with the
available inputs, global variables, ... | public CharSequence | getSubmissionFormUrl() Generates a form action URL for a submission.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public CharSequence | getSubmissionFormUrl(String pathinfo) 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, ... | public CharSequence | getSubmissionQueryUrl(String name) Generates a query URL for a submission.
Parameters: name - the name of the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public CharSequence | getSubmissionQueryUrl(String name, String pathinfo) Generates a query URL for a submission and appends a pathinfo to the
URL of the element.
Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public CharSequence | getSubmissionQueryUrl(String name, String[] parameterValues) Generates a query URL for a submission with default parameter values.
Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public 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.
This will take the current element context into account with the
available inputs, global variables, ... | public ElementInfo | getTarget() 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, ...
the request's target element information exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public Template | getTxtTemplate() Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINETXT enginetxt type, using the current element's absolute ID as the template name.
exception: com.uwyn.rife.template.exceptions.TemplateException - if anerror occurred during the retrieval, parsing or compilation of thetemplate exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the initialization of the template in the elementcontext; or if you don't have access to the request data (eg. | public Template | getTxtTemplate(String name) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINETXT enginetxt type.
Parameters: name - the name of the template. | public Template | getTxtTemplate(String name, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINETXT enginetxt type.
Parameters: name - the name of the template. | public Template | getTxtTemplate(String name, String encoding) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINETXT enginetxt type.
Parameters: name - the name of the template. | public Template | getTxtTemplate(String name, String encoding, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINETXT enginetxt type.
The special engine template types contain additional block and value
filters to offer the following features:
- embedded elements
(eg.: [!V 'ELEMENT:my.elementid'/] )
- role user context for scripted block assignment to values
(eg.:
[!V 'OGNL:ROLEUSER:rolecheck']User is not in role "admin"[!/V] [!B
'OGNL:ROLEUSER:rolecheck:[[ isInRole("admin") ]]']User is in role
"admin"[!/B] )
Non-engine versions of the same template types are not able to
provide these functionalities.
Parameters: name - the name of the template. | public UploadedFile | getUploadedFile(String name) Retrieves an uploaded file.
Parameters: name - the name of the file, as declared in the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if no fileis known with this name; or if you don't have access to the requestdata (eg. | public ArrayList<String> | getUploadedFileNames(String regexp) 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 thefile names exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public ArrayList<String> | getUploadedFileNames() Retrieves the list of uploaded file names.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public UploadedFile[] | getUploadedFiles(String name) Retrieves all files that have been uploaded for a particular name.
Parameters: name - the name of the file, as declared in the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if no fileis known with this name; or if you don't have access to the requestdata (eg. | public String | getWebappRootUrl() 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/ .
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public Template | getXhtmlTemplate() Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXHTMLenginexhtml type, using the current element's absolute ID as the
template name.
exception: com.uwyn.rife.template.exceptions.TemplateException - if anerror occurred during the retrieval, parsing or compilation of thetemplate exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the initialization of the template in the elementcontext; or if you don't have access to the request data (eg. | public Template | getXhtmlTemplate(String name) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXHTMLenginexhtml type.
Parameters: name - the name of the template. | public Template | getXhtmlTemplate(String name, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXHTMLenginexhtml type.
Parameters: name - the name of the template. | public Template | getXhtmlTemplate(String name, String encoding) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXHTMLenginexhtml type.
Parameters: name - the name of the template. | public Template | getXhtmlTemplate(String name, String encoding, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXHTMLenginexhtml type.
The special engine template types contain additional block and value
filters to offer the following features:
- embedded elements
(eg.: <!--V
'ELEMENT:my.elementid'/--> )
- role user context for scripted block assignment to values
(eg.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V--> <!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B--> )
Non-engine versions of the same template types are not able to
provide these functionalities.
Parameters: name - the name of the template. | public Template | getXmlTemplate() Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXML enginexml type, using the current element's absolute ID as the template name.
exception: com.uwyn.rife.template.exceptions.TemplateException - if anerror occurred during the retrieval, parsing or compilation of thetemplate exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the initialization of the template in the elementcontext; or if you don't have access to the request data (eg. | public Template | getXmlTemplate(String name) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXML enginexml type.
Parameters: name - the name of the template. | public Template | getXmlTemplate(String name, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXML enginexml type.
Parameters: name - the name of the template. | public Template | getXmlTemplate(String name, String encoding) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXML enginexml type.
Parameters: name - the name of the template. | public Template | getXmlTemplate(String name, String encoding, TemplateTransformer transformer) Creates a new template instance of the
com.uwyn.rife.template.TemplateFactoryEngineTypes.ENGINEXML enginexml type.
The special engine template types contain additional block and value
filters to offer the following features:
- embedded elements
(eg.: <!--V
'ELEMENT:my.elementid'/--> )
- role user context for scripted block assignment to values
(eg.:
<!--V 'OGNL:ROLEUSER:rolecheck'-->User is not in role
"admin"<!--/V--> <!--B 'OGNL:ROLEUSER:rolecheck:[[
isInRole("admin") ]]'-->User is in role "admin"<!--/B--> )
Non-engine versions of the same template types are not able to
provide these functionalities.
Parameters: name - the name of the template. | public boolean | hasCookie(String name) Checks whether a cookie is present.
Parameters: name - the name of the cookie exception: com.uwyn.rife.engine.exceptions.EngineException - if noincookie is known with this name; if you don't have access to therequest data (eg. | public boolean | hasEmbedData() Indicates whether data was passed on during the processing of this embedded element.
true if data was passed on; orfalse otherwise exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public boolean | hasEmbedValue() Indicates whether the embedded element's template value has content.
true if the value has content; orfalse otherwise exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public boolean | hasInputValue(String name) Checks whether a value has been provided to an input.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public boolean | hasParameterValue(String name) Checks whether a value has been provided to an parameter.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public boolean | hasProperty(String name) Indicates whether this element has a certain injected named property.
Parameters: name - the name of the property exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public boolean | hasRequestAttribute(String name) Checks if a request attribute exists.
Parameters: name - a String specifying the name of the attribute exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public boolean | hasSubmission() Indicates whether this element received a submission.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public boolean | hasSubmission(String submissionName) Indicates whether this element received a certain submission.
Parameters: submissionName - the name of the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public boolean | hasUploadedFile(String name) Checks if a particular file has been uploaded during the last
submission.
Parameters: name - the name of the file, as declared in the submission exception: com.uwyn.rife.engine.exceptions.EngineException - if no fileis known with this name; or if you don't have access to the requestdata (eg. | public void | initialize() Initializes the element, this method should never be called explicitly. | public boolean | isEmbedded() Indicates whether this element is running embedded inside another
element's template.
true if this element is embedded; orfalse otherwise exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public boolean | isFileEmpty(String name) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if no fileis known with this name; or if you don't have access to the requestdata (eg. | public boolean | isInputEmpty(String name) Checks whether an input has no value or whether the value is empty.
Parameters: name - the name of the input exception: com.uwyn.rife.engine.exceptions.EngineException - if no inputis known with this name; or if you don't have access to the requestdata (eg. | public boolean | isParameterEmpty(String name) Checks whether a parameter is empty.
Parameters: name - the name of the parameter exception: com.uwyn.rife.engine.exceptions.EngineException - if noparameter is known with this name; or if you don't have access to therequest data (eg. | public boolean | isPropertyEmpty(String name) Checks if a property is not available or if the string presentation is
empty.
Parameters: name - the name of the property exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. | public boolean | isSecure() Returns a boolean indicating whether this request was made using a
secure channel, such as HTTPS.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public boolean | isTextBufferEnabled() Indicates whether the response text buffer is enabled or disabled.
true if the text buffer is enabled; orfalse if it is disabled exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg.
| final public void | pause() Pauses the execution of the element and creates a new continuation. | public void | preventCaching() Sets up the current request to prevent all caching of the response by
the client.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public void | print(Template template) Prints the content of a template to the request text output. | public void | print(Object value) Prints the string representation of an object to the request text
output. | public void | processEmbeddedElement(Template template, String elementId) 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 embeddedtemplate Parameters: elementId - the identifier of the element exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. | public 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.
See
ElementSupport.processEmbeddedElement(Template,String) for more
information.
Parameters: template - the template that will be used to process the embeddedtemplate Parameters: elementId - the identifier of the element Parameters: data - the data that will be available from within the embeddedelement exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. | public void | processEmbeddedElement(Template template, String elementId, String differentiator) 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 embeddedtemplate Parameters: elementId - the identifier of the element Parameters: differentiator - the differentiator that will be used; ornull if no differentiator should be used exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. | public 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.
See
ElementSupport.processEmbeddedElement(Template,String,String) for more
information.
Parameters: template - the template that will be used to process the embeddedtemplate Parameters: elementId - the identifier of the element Parameters: differentiator - the differentiator that will be used; or Parameters: data - the data that will be available from within the embeddedelementnull if no differentiator should be used exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. | public List<String> | processTemplate(Template template) 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). | public boolean | prohibitRawAccess() Indicates whether the access to raw servlet API methods is allowed.
Instead of using the
ElementSupport.setProhibitRawAccess(boolean) method,
one can also overload this method to allow raw access. | public void | redirect(String url) Interrupts the execution in this element and redirects the client to
another URL.
Parameters: url - the URL to which the request will be redirected exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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. | public 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.
Parameters: template - the template instance where the form should be removedfrom Parameters: beanClass - the class of the bean that should be used to removethe form exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean; or if there's no activeelement context (eg. | public 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.
This method delegates all logic to the
com.uwyn.rife.site.FormBuilder.removeForm(TemplateClassString) method of the provided template instance.
Parameters: template - the template instance where the form should be removedfrom Parameters: beanClass - the class of the bean that should be used to removethe form Parameters: prefix - the prefix that will be prepended to all bean propertynames exception: com.uwyn.rife.engine.exceptions.EngineException - if errorsoccurred during the introspection of the bean; or if there's no activeelement context (eg. | public void | removeRequestAttribute(String name) Removes an attribute from this request. | public 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.
The actual logic is performed by the
ElementSupport.selectParameter(Template,String,String[]) method. | 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. | 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
ElementSupport.selectParameter(Template,String,String[]) method. | 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 Parameters: name - the name of the parameter Parameters: value - the value that should selected or checked exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public void | sendError(int statusCode) 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. | public void | sendError(int statusCode, String message) Sends an error response to the client using the specified status. | public void | sendRedirect(String location) Sends a temporary redirect response to the client using the specified
redirect location URL. | public void | setChildTrigger(ElementChildTrigger childTrigger) Sets the ElementChildTrigger class that will be used to
child trigger is executed. | 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. | public 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.
Parameters: length - an integer specifying the length of the content beingreturned to the client; sets the Content-Length header exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public void | setContentType(String type) Sets the content type of the response being sent to the client, if the
response has not been committed yet. | public void | setCookie(Cookie cookie) Sets a cookie which will be sent to the browser.
Cookies are handles outside of the web engine's data flow
management. | public void | setDateHeader(String name, long date) Sets a response header with the given name and date-value. | 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. | void | setElementAware(ElementAware elementAware) | public void | setElementContext(ElementContext elementContext) | void | setElementInfo(ElementInfo elementInfo) | public void | setExitForm(Template template, String name) 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 Parameters: name - the name of the exit exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
The URL will be generated by calling the
ElementSupport.getExitFormUrl(String,String) and
ElementSupport.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. | public void | setExitQuery(Template template, String name) 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 Parameters: name - the name of the exit exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
The URL will be generated by calling the
ElementSupport.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. | public void | setHeader(String name, String value) Sets a response header with the given name and value. | public void | setInitializer(ElementInitializer initializer) Sets the ElementInitializer class that will be used to
initialize the element. | public void | setIntHeader(String name, int value) Sets a response header with the given name and integer value. | public void | setNamedOutputBean(String name, Object bean) Sets an instance of a named output bean and populates the output values
from the property values. | public void | setOutput(String name, String value) Sets the value of an output.
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, String[] values) Set the values of an output.
Parameters: name - the name of the output Parameters: values - the values that have to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, boolean value) Sets the value of an output from a boolean .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, char value) Sets the value of an output from a char .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, char[] value) Set the value of an output from an array of char s that
will be concatenated to a String .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, double value) Sets the value of an output from a double .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, float value) Sets the value of an output from a float .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, int value) Sets the value of an output from an int .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, long value) Sets the value of an output from a long .
Parameters: name - the name of the output Parameters: value - the value that has to be set exception: com.uwyn.rife.engine.exceptions.EngineException - if no outputis known with this name; if you don't have access to the request data(eg. | public void | setOutput(String name, Object value) Sets the value of an output from a generic object . | public void | setOutputBean(Object bean) 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | public void | setOutputBean(Object bean, String prefix) 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 Parameters: prefix - the prefix that will be put in front of each propertyname exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. | 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. | public void | setRequestAttribute(String name, Object object) Stores an attribute in this request. | public void | setResponseLocale(Locale locale) Sets the locale of the response, if the response has not been committed
yet. | public void | setStatus(int statusCode) Sets the status code for this response. | public 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.
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 thatwill be filled in Parameters: beanInstance - the bean instance whose property values will be set exception: com.uwyn.rife.template.exceptions.TemplateException - whenerrors occurred during the introspection of the bean instance exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. | public 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.
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 thatwill be filled in Parameters: beanInstance - the bean instance whose property values will be set Parameters: encode - true when the property values should beencoded according to the template type; orfalse otherwise exception: com.uwyn.rife.template.exceptions.TemplateException - whenerrors occurred during the introspection of the bean instance exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg.
| public void | setSubmissionForm(Template template, String name) 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 Parameters: name - the name of the submission exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis known with this name; if the exit hasn't got a destination element;if you don't have access to the request data (eg. | public 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.
The URL will be generated by calling the
ElementSupport.getSubmissionFormUrl(String) and
ElementSupport.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. | public void | setSubmissionQuery(Template template, String name) 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 Parameters: name - the name of the submission exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public 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.
Parameters: template - the template that will be used to set the value Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. | public 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.
The URL will be generated by calling the
ElementSupport.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. | final public void | stepBack() Steps back to the start of the previous continuation. |
ElementSupport | protected ElementSupport()(Code) | | |
addDateHeader | public void addDateHeader(String name, long date) throws EngineException(Code) | | 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 Parameters: date - the assigned date value exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.setDateHeader since: 1.0 |
addHeader | public void addHeader(String name, String value) throws EngineException(Code) | | 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 Parameters: 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) exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.setHeader since: 1.0 |
call | final public Object call(String exit)(Code) | | 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
ElementSupport.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 the object that was provided through the ElementSupport.answer(Object)method in the called element; or null if no answer was provided See Also: ElementSupport.answer() See Also: ElementSupport.answer(Object) since: 1.0
|
child | public void child() throws EngineException(Code) | | Interrupts the execution in this element and transfers the execution to
the child element.
exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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 insidethe ElementSupport.initialize() method) since: 1.0 |
childTriggered | public boolean childTriggered(String name, String[] values)(Code) | | 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
ElementSupport.setChildTrigger .
Parameters: name - the name of the variable that initiated the child trigger Parameters: values - the values of the variable that initiated the childtrigger true if the execution should be interrupted andstep down the inheritance stack (ie. when the activation of the childhas been triggered); or false if the execution should just continue See Also: ElementSupport.setChildTrigger(ElementChildTrigger) since: 1.0
|
containsHeader | public boolean containsHeader(String name) throws EngineException(Code) | | Returns a boolean indicating whether the named response header has
already been set.
Parameters: name - the header name true if the named response header has already beenset; orfalse otherwise exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) since: 1.0
|
defer | public void defer() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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 insidethe ElementSupport.initialize() method) since: 1.0 |
duringStepBack | public boolean duringStepBack()(Code) | | Indicates whether the current element execution is a step back.
true if a step back occurred in this request; orfalse otherwise See Also: ElementSupport.stepBack since: 1.5
|
enableRequestAccess | void enableRequestAccess(boolean enabled)(Code) | | |
enableTextBuffer | public void enableTextBuffer(boolean enabled) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurred during the modification of the text buffer presence; or if youdon't have access to the request data (eg. you're inside a childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.isTextBufferEnabled() See Also: ElementSupport.flush() See Also: ElementSupport.clearBuffer() since: 1.0
|
encodeHtml | public String encodeHtml(String source)(Code) | | 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 HTMLstring. The encoded String object. See Also: ElementSupport.encodeXml(String) since: 1.0 |
encodeXml | public String encodeXml(String source)(Code) | | 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 XMLstring. The encoded String object. See Also: ElementSupport.encodeHtml(String) since: 1.0 |
evaluateExpressionRoleUserTags | public List<String> evaluateExpressionRoleUserTags(Template template, String id) throws TemplateException, EngineException(Code) | | Evaluate the ROLEUSER expression tags in a template.
The
ElementSupport.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
com.uwyn.rife.template.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 shouldhappen Parameters: id - the block and the value identifier the list of names of the template values that were generated exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the expression tags evaluation exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) since: 1.0 |
exit | public void exit(String name) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch this exception; or there's no active element context (eg. you'reusing this method inside the constructor instead of inside the ElementSupport.initialize() method) since: 1.0 |
forward | public void forward(String url) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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 insidethe ElementSupport.initialize() method) since: 1.0 |
getContentType | public String getContentType() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the name of the MIME type ofthe request; ornull if the type is not known since: 1.0
|
getContinuationId | public String getContinuationId() throws EngineException(Code) | | Returns the unique identifier of the current continuation.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger) the unique identifier of the current continuations; ornull if no continuation is active since: 1.0
|
getDateHeader | public long getDateHeader(String name) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a long value representing the date specified inthe header expressed as the number of milliseconds since January 1,1970 GMT, or -1 if the named header was not included with the request since: 1.0 |
getExitFormParameters | public CharSequence getExitFormParameters(String name, String[] outputValues) throws EngineException(Code) | | 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
ElementSupport.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 Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated parameters as a character sequence See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParametersJavascript(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
getExitFormParametersJavascript | public CharSequence getExitFormParametersJavascript(String name, String[] outputValues) throws EngineException(Code) | | 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
ElementSupport.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 Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated parameters as a character sequence See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.6 |
getExitFormUrl | public CharSequence getExitFormUrl(String name, String pathinfo) throws EngineException(Code) | | 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
ElementSupport.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 Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated URL as a character sequence See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
getExitQueryUrl | public CharSequence getExitQueryUrl(String name, String pathinfo) throws EngineException(Code) | | 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 Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated URL as a character sequence See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
getExitQueryUrl | public CharSequence getExitQueryUrl(String name, String[] outputValues) throws EngineException(Code) | | Generates a query URL for an exit and overrides the current output
values only for this method.
Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated URL as a character sequence See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
getExitQueryUrl | public CharSequence getExitQueryUrl(String name, String pathinfo, String[] outputValues) throws EngineException(Code) | | 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 Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) the generated URL as a character sequence See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
getHeader | public String getHeader(String name)(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the value of the requestedheader; ornull if the request does not have a header of that name since: 1.0
|
getHeaderNames | public Enumeration getHeaderNames() throws EngineException(Code) | | 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
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) an enumeration of all the header names sent with this request;if the request has no headers, an empty enumeration; if the servletcontainer does not allow servlets to use this method, null since: 1.0 |
getHeaders | public Enumeration getHeaders(String name) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) an Enumeration containing the values of therequested header. If the request does not have any headers of that namereturn an empty enumeration. If the container does not allow access toheader information, it returns null . since: 1.0 |
getIntHeader | public int getIntHeader(String name) throws EngineException(Code) | | 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 requestheader exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) an integer expressing the value of the request header; or -1 if the request doesn't have a header of this name since: 1.0
|
getOutputStream | public OutputStream getOutputStream() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the creation of the output stream; or if you don't haveaccess to the request data (eg. you're inside a child trigger); or ifthere's no active element context (eg. you're using this method insidethe constructor instead of inside the ElementSupport.initialize() method) an instance of the response output stream since: 1.0 |
getPathInfo | public String getPathInfo() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String , decoded by the web engine, specifyingextra path information that comes after the element URL but before thequery string in the request URL; or or an empty string if the URL does not have any extra pathinformation since: 1.0 |
getProperty | public Object getProperty(String name) throws EngineException(Code) | | Retrieves the value of an injected named property.
Note that there are two types of properties, fixed value properties
(
com.uwyn.rife.ioc.PropertyValueObject string literals ) and dynamic value
properties (
com.uwyn.rife.ioc.PropertyValueParticipant participant objects ,
com.uwyn.rife.ioc.PropertyValueTemplate 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
com.uwyn.rife.tools.Convert helper class to perform the conversion
in-line. Since properties are very often used as string literals,
there's
ElementSupport.getPropertyString(String) method to make this more
convenient.
Parameters: name - the name of the property exception: com.uwyn.rife.engine.exceptions.EngineException - if theelement information hasn't been provided yet (eg. you're using thismethod inside the constructor instead of inside the ElementSupport.initialize() method) the property value; or null if no such property exists See Also: ElementSupport.hasProperty(String) See Also: ElementSupport.getProperty(String,Object) See Also: ElementSupport.getPropertyTyped(String,Class) See Also: ElementSupport.getPropertyTyped(String,Class,Object) See Also: ElementSupport.getPropertyString(String) See Also: ElementSupport.getPropertyString(String,String) See Also: ElementSupport.isPropertyEmpty(String) since: 1.0
|
getProtocol | public String getProtocol() throws EngineException(Code) | | Returns the name and version of the protocol the request uses in the
form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the protocol name and versionnumber since: 1.0 |
getRemoteHost | public String getRemoteHost() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a String containing the fully qualified name ofthe client since: 1.0 |
getRemoteUser | public String getRemoteUser() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a String specifying the login of the user makingthis request; ornull if the user login is not known since: 1.0
|
getRequestCharacterEncoding | public String getRequestCharacterEncoding() throws EngineException(Code) | | 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
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the name of the characterencoding; ornull if the request does not specify a characterencoding since: 1.0
|
getRequestLocale | public Locale getRequestLocale() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) the preferred Locale for the client since: 1.0 |
getRequestLocales | public Enumeration getRequestLocales() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) an Enumeration of preferred Locale objects for the client since: 1.0 |
getResponseCharacterEncoding | public String getResponseCharacterEncoding() throws EngineException(Code) | | 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
ElementSupport.setContentType method, or
implicitly using the
ElementSupport.setResponseLocale 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String specifying the name of the characterencoding, for example, UTF-8 See Also: ElementSupport.setContentType See Also: #setResponseLocale since: 1.0 |
getScheme | public String getScheme() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the name of the scheme used tomake this request since: 1.0 |
getServerName | public String getServerName() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a String containing the name of the server since: 1.0 |
getServerPort | public int getServerPort() throws EngineException(Code) | | 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.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) an integer specifying the port number since: 1.0 |
getServerRootUrl | public String getServerRootUrl() throws EngineException(Code) | | 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 .
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) the server's root url since: 1.0 |
getSubmissionFormParameters | public CharSequence getSubmissionFormParameters(String name, String[] parameterValues) throws EngineException(Code) | | 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
ElementSupport.getSubmissionFormUrl(String) method since the URL needs to be
provided in the action attribute of the form.
Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) the generated parameters as a character sequence See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParametersJavascript(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
getSubmissionFormParametersJavascript | public CharSequence getSubmissionFormParametersJavascript(String name, String[] parameterValues) throws EngineException(Code) | | 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
ElementSupport.getSubmissionFormUrl(String) method since the URL needs to be
provided in the action attribute of the form.
Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) the generated parameters as a character sequence See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.6 |
getSubmissionFormUrl | public CharSequence getSubmissionFormUrl(String pathinfo) throws EngineException(Code) | | 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
ElementSupport.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; ornull if no pathinfo should be appended exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) the generated URL as a character sequence See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
getSubmissionQueryUrl | public CharSequence getSubmissionQueryUrl(String name, String pathinfo, String[] parameterValues) throws EngineException(Code) | | 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 Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) the generated URL as a character sequence See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
getWebappRootUrl | public String getWebappRootUrl() throws EngineException(Code) | | 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/ .
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) the web application's root url since: 1.0 |
isSecure | public boolean isSecure() throws EngineException(Code) | | Returns a boolean indicating whether this request was made using a
secure channel, such as HTTPS.
exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a boolean indicating if the request was made using a securechannel since: 1.0 |
pause | final public void pause()(Code) | | 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 |
print | public void print(Object value) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the output of the content; or if you don't have access tothe request data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) since: 1.0 |
processEmbeddedElement | public void processEmbeddedElement(Template template, String elementId) throws TemplateException, EngineException(Code) | | 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 embeddedtemplate Parameters: elementId - the identifier of the element exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.processEmbeddedElement(Template,String,Object) See Also: ElementSupport.processEmbeddedElement(Template,String,String) See Also: ElementSupport.processEmbeddedElement(Template,String,String,Object) since: 1.0 |
processEmbeddedElement | public void processEmbeddedElement(Template template, String elementId, Object data) throws TemplateException, EngineException(Code) | | Processes an embedded element without a differentiator in a template
and pass on data to the processed embedded element.
See
ElementSupport.processEmbeddedElement(Template,String) for more
information.
Parameters: template - the template that will be used to process the embeddedtemplate Parameters: elementId - the identifier of the element Parameters: data - the data that will be available from within the embeddedelement exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.processEmbeddedElement(Template,String) See Also: ElementSupport.processEmbeddedElement(Template,String,String) See Also: ElementSupport.processEmbeddedElement(Template,String,String,Object) since: 1.5 |
processEmbeddedElement | public void processEmbeddedElement(Template template, String elementId, String differentiator) throws TemplateException, EngineException(Code) | | 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 embeddedtemplate Parameters: elementId - the identifier of the element Parameters: differentiator - the differentiator that will be used; ornull if no differentiator should be used exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.processEmbeddedElement(Template,String) See Also: ElementSupport.processEmbeddedElement(Template,String,Object) See Also: ElementSupport.processEmbeddedElement(Template,String,String,Object) since: 1.0 |
processEmbeddedElement | public void processEmbeddedElement(Template template, String elementId, String differentiator, Object data) throws TemplateException, EngineException(Code) | | Processes an embedded element with a differentiator in a template
and pass on data to the processed embedded element.
See
ElementSupport.processEmbeddedElement(Template,String,String) for more
information.
Parameters: template - the template that will be used to process the embeddedtemplate Parameters: elementId - the identifier of the element Parameters: differentiator - the differentiator that will be used; or Parameters: data - the data that will be available from within the embeddedelementnull if no differentiator should be used exception: com.uwyn.rife.template.exceptions.TemplateException - when anerror occurs during the template processing exception: com.uwyn.rife.engine.exceptions.EngineException - if noelement is known with that identifier; or if you don't have access tothe request data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.processEmbeddedElement(Template,String) See Also: ElementSupport.processEmbeddedElement(Template,String,Object) See Also: ElementSupport.processEmbeddedElement(Template,String,String) since: 1.5 |
processTemplate | public List<String> processTemplate(Template template) throws TemplateException, EngineException(Code) | | 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
com.uwyn.rife.site.FormBuilder |
Parameters: template - the template instance that needs to be processed exception: com.uwyn.rife.template.exceptions.TemplateException - if anerror occurs during the manipulation of the template exception: com.uwyn.rife.engine.exceptions.EngineException - if an erroroccurs during the retrieval of the values from the current elementcontext, or during the output of the template content; or if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) a list with the ids of all the template values that have beenset since: 1.0 |
redirect | public void redirect(String url) throws EngineException(Code) | | Interrupts the execution in this element and redirects the client to
another URL.
Parameters: url - the URL to which the request will be redirected exception: com.uwyn.rife.engine.exceptions.EngineException - a runtimeexception that is used to immediately interrupt the execution, don'tcatch 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 insidethe ElementSupport.initialize() method) since: 1.0 |
selectInputParameter | public Collection<String> selectInputParameter(Template template, String name, String[] values) throws EngineException(Code) | | 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
ElementSupport.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
ElementSupport.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 Parameters: name - the name of the input Parameters: values - the values that should selected or checked exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a list with the identifiers of the template values that havebeen set, this is never null , when no values are set anempty list is returned See Also: ElementSupport.selectParameter(Template,String,String[]) See Also: ElementSupport.selectSubmissionParameter(Template,String,String[]) since: 1.0 |
selectParameter | public Collection<String> selectParameter(Template template, String name, String[] values)(Code) | | 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 Parameters: name - the name of the parameter Parameters: values - the values that should selected or checked exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a list with the identifiers of the template values that havebeen set, this is never null , when no values are set anempty list is returned See Also: ElementSupport.selectInputParameter(Template,String,String[]) See Also: ElementSupport.selectSubmissionParameter(Template,String,String[]) since: 1.0 |
selectSubmissionParameter | public Collection<String> selectSubmissionParameter(Template template, String name, String[] values)(Code) | | 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
ElementSupport.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
ElementSupport.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 Parameters: name - the name of the parameter Parameters: values - the values that should selected or checked exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a list with the identifiers of the template values that havebeen set, this is never null , when no values are set anempty list is returned See Also: ElementSupport.selectParameter(Template,String,String[]) See Also: ElementSupport.selectInputParameter(Template,String,String[]) since: 1.0 |
selectSubmissionParameter | public Collection selectSubmissionParameter(Template template, String name, String value)(Code) | | 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 Parameters: name - the name of the parameter Parameters: value - the value that should selected or checked exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) a list with the identifiers of the template values that havebeen set, this is never null , when no values are set anempty list is returned See Also: ElementSupport.selectParameter(Template,String,String[]) See Also: ElementSupport.selectInputParameter(Template,String,String[]) See Also: ElementSupport.selectSubmissionParameter(Template,String,String[]) since: 1.0 |
sendError | public void sendError(int statusCode) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.sendError(int,String) since: 1.0 |
sendError | public void sendError(int statusCode, String message) throws EngineException(Code) | | 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 Parameters: message - the descriptive message exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.sendError(int) since: 1.0 |
sendRedirect | public void sendRedirect(String location) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) since: 1.0 |
setCloneContinuations | public void setCloneContinuations(boolean clone)(Code) | | 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 See Also: ElementSupport.cloneContinuations() since: 1.0
|
setContentLength | public void setContentLength(int length) throws EngineException(Code) | | 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 beingreturned to the client; sets the Content-Length header exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) since: 1.0 |
setContentType | public void setContentType(String type) throws EngineException(Code) | | 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 thecontent exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.setResponseLocale See Also: ElementSupport.getOutputStream since: 1.0 |
setDateHeader | public void setDateHeader(String name, long date) throws EngineException(Code) | | 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 Parameters: date - the assigned date value exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.containsHeader See Also: ElementSupport.addDateHeader since: 1.0 |
setDeploymentClass | public void setDeploymentClass(Class<? extends ElementDeployer> klass)(Code) | | 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 todeploy the element See Also: ElementDeployer.deploy See Also: ElementSupport.getDeploymentClass() See Also: ElementSupport.getDeployer() since: 1.0 |
setExitForm | public void setExitForm(Template template, String name) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitForm | public void setExitForm(Template template, String name, String pathinfo) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitForm | public void setExitForm(Template template, String name, String[] outputValues) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitForm | public void setExitForm(Template template, String name, String pathinfo, String[] outputValues) throws TemplateException, EngineException(Code) | | 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
ElementSupport.getExitFormUrl(String,String) and
ElementSupport.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 Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersEXIT:FORM:exitname and EXIT:PARAMS:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) since: 1.0 |
setExitQuery | public void setExitQuery(Template template, String name) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitQuery | public void setExitQuery(Template template, String name, String pathinfo) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitQuery | public void setExitQuery(Template template, String name, String[] outputValues) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the exit Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitQuery(Template,String,String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setExitQuery | public void setExitQuery(Template template, String name, String pathinfo, String[] outputValues) throws TemplateException, EngineException(Code) | | 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
ElementSupport.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 Parameters: name - the name of the exit Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: outputValues - an array of string pairs that will be used tooverride the current output values; or null if no outputvalues should be overridden exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierEXIT:QUERY:exitname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getExitQueryUrl(String,String,String[]) See Also: ElementSupport.getExitFormUrl(String,String) See Also: ElementSupport.getExitFormParameters(String,String[]) See Also: ElementSupport.setExitForm(Template,String,String) since: 1.0 |
setHeader | public void setHeader(String name, String value) throws EngineException(Code) | | 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 Parameters: value - the header value If it contains octet string, it should beencoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt) exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.containsHeader See Also: ElementSupport.addHeader since: 1.0 |
setInitializer | public void setInitializer(ElementInitializer initializer)(Code) | | 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 See Also: ElementSupport.initialize() See Also: ElementInitializer since: 1.0 |
setIntHeader | public void setIntHeader(String name, int value) throws EngineException(Code) | | 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 Parameters: value - the assigned integer value exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.containsHeader See Also: ElementSupport.addIntHeader since: 1.0 |
setProhibitRawAccess | public void setProhibitRawAccess(boolean access)(Code) | | 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 isprohibited; or false if it is allowed See Also: ElementSupport.prohibitRawAccess() since: 1.0
|
setResponseLocale | public void setResponseLocale(Locale locale) throws EngineException(Code) | | 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
ElementSupport.setContentType 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
ElementSupport.setContentType 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.getResponseLocale See Also: ElementSupport.setContentType since: 1.0 |
setStatus | public void setStatus(int statusCode) throws EngineException(Code) | | 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 exception: com.uwyn.rife.engine.exceptions.EngineException - if you don'thave access to the request data (eg. you're inside a child trigger); orif there's no active element context (eg. you're using this methodinside the constructor instead of inside the ElementSupport.initialize()method) See Also: ElementSupport.sendError since: 1.0 |
setSubmissionBean | public void setSubmissionBean(Template template, Object beanInstance, boolean encode) throws TemplateException, EngineException(Code) | | 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 thatwill be filled in Parameters: beanInstance - the bean instance whose property values will be set Parameters: encode - true when the property values should beencoded according to the template type; orfalse otherwise exception: com.uwyn.rife.template.exceptions.TemplateException - whenerrors occurred during the introspection of the bean instance exception: com.uwyn.rife.engine.exceptions.EngineException - if there'sno active element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) since: 1.0
|
setSubmissionForm | public void setSubmissionForm(Template template, String name) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionForm | public void setSubmissionForm(Template template, String name, String pathinfo) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionForm | public void setSubmissionForm(Template template, String name, String[] parameterValues) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionForm | public void setSubmissionForm(Template template, String name, String pathinfo, String[] parameterValues) throws TemplateException, EngineException(Code) | | 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
ElementSupport.getSubmissionFormUrl(String) and
ElementSupport.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 Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifiersSUBMISSION:FORM:submissionname andSUBMISSION:PARAMS:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if no exitis 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 childtrigger); or if there's no active element context (eg. you're usingthis method inside the constructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) since: 1.0 |
setSubmissionQuery | public void setSubmissionQuery(Template template, String name) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionQuery | public void setSubmissionQuery(Template template, String name, String pathinfo) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionQuery | public void setSubmissionQuery(Template template, String name, String[] parameterValues) throws TemplateException, EngineException(Code) | | 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 Parameters: name - the name of the submission Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionQuery(Template,String,String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
setSubmissionQuery | public void setSubmissionQuery(Template template, String name, String pathinfo, String[] parameterValues) throws TemplateException, EngineException(Code) | | 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
ElementSupport.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 Parameters: name - the name of the submission Parameters: pathinfo - the pathinfo that will be appended; ornull if no pathinfo should be appended Parameters: parameterValues - an array of string pairs that will be used toset default parameter values; or null if no defaultparameter values should be used exception: com.uwyn.rife.template.exceptions.TemplateException - if thetemplate doesn't contain the value identifierSUBMISSION:QUERY:submissionname exception: com.uwyn.rife.engine.exceptions.EngineException - if nosubmission is known with this name; if you don't have access to therequest data (eg. you're inside a child trigger); or if there's noactive element context (eg. you're using this method inside theconstructor instead of inside the ElementSupport.initialize() method) See Also: ElementSupport.getSubmissionQueryUrl(String,String,String[]) See Also: ElementSupport.getSubmissionFormUrl(String) See Also: ElementSupport.getSubmissionFormParameters(String,String[]) See Also: ElementSupport.setSubmissionForm(Template,String,String) since: 1.0 |
stepBack | final public void stepBack()(Code) | | Steps back to the start of the previous continuation.
If there is no previous continuation, the element will be executed
from the beginning again.
See Also: ElementSupport.duringStepBack since: 1.5 |
|
|