nl.gx.webmanager.handler.forms.handling
Class EcardHandler
java.lang.Object
nl.gx.webmanager.handler.forms.foundation.FormHandlerBase
nl.gx.webmanager.handler.forms.handling.MailHandler
nl.gx.webmanager.handler.forms.handling.EcardHandler
- All Implemented Interfaces:
- FormComponent, Handler
public class EcardHandler
- extends MailHandler
Creates an ecard in the database and sends a mail to the specified recipient containing a URL
that will show the ecard.
| Parameter name |
Mode |
Default value |
Description |
| ecardid |
Mandatory |
- |
The id of the ecard |
| fromname |
Optional |
- |
Name of the sender |
| fromemail |
Mandatory |
- |
e-mail address of the sender |
| sendtoname |
Optional |
- |
Name of the recipient |
| sendto |
Mandatory |
- |
e-mail address of the recipient |
| message |
Optional |
- |
Message of the ecard |
| ecardpageid |
Optional |
- |
id of the page on which the ecard can be viewed. Used for building the view ecard URL. |
| sendashyperlink |
Optional |
- |
Determines if the ecard is send as hyperlink or not. If true, the mailtext as specified in the handler
is used and the @ecardurl@ is replaced by the URL to view the ecard. If false, the HTML to view the
ecard is embedded inside the mail. Note: the embeddd HTML still contains links to the webserver for
images, backgrounds, stylesheets, etc. |
| presid |
Optional |
- |
The id of the presentation to view the ecard with. Used only incase of sending an embedded ecard. |
see http://java.sun.com/products/javamail/FAQ.html
see http://java.sun.com/products/javabeans/glasgow/jaf.html
| Fields inherited from class nl.gx.webmanager.handler.forms.handling.MailHandler |
appendValues, attachmentContentTypes, attachmentParts, baseURL, bodyEncoding, config, defaultFrom, defaultReplyto, discardEmptyAppendValues, disposition, FROMEMAIL, FROMNAME, MAILTEXT, mailtopage, multipartSubtype, names, pageToMail, pageURL, REPLYTOEMAIL, REPLYTONAME, SENDBCC, SENDCC, sendEmbedded, sendHtml, sendText, SENDTO, SENDTONAMES, sources, sourcesEncoding, SUBJECT, transferEncoding |
|
Method Summary |
void |
doHandle(FormDefinition form,
State formState,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Processes the form. |
void |
init(FormComponentConfig c)
Passes the initialization parameters to the component. |
protected java.lang.String |
preAddMailtext(java.lang.String mailtext)
Override the MailHandler to replace the ecardurl parameter by our
ecard view URL. |
protected void |
processExtraMainBody(javax.mail.internet.MimeBodyPart mainBody)
Give subclasses an opportunity to alter the main body part of the email. |
| Methods inherited from class nl.gx.webmanager.handler.forms.foundation.FormHandlerBase |
close, close, close, executeInsertWithIdentityMSSQLMYSQL, executeInsertWithIdentityOracle, executeIntegerQuery, executeIntegerQuery, executeIntegersQuery, executeIntegersQuery, executeQuery, executeStringQuery, executeUpdate, fillValues, getDataSource, setArguments, setArguments |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EcardHandler
public EcardHandler()
init
public void init(FormComponentConfig c)
throws InitializationException
- Description copied from interface:
FormComponent
- Passes the initialization parameters to the component.
- Specified by:
init in interface FormComponent- Overrides:
init in class MailHandler
- Parameters:
c - The FormComponentConfig object that contains
configutation information for this component.
- Throws:
InitializationException - If initialization failed
doHandle
public void doHandle(FormDefinition form,
State formState,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws HandleException
- Description copied from interface:
Handler
- Processes the form.
- Specified by:
doHandle in interface Handler- Overrides:
doHandle in class MailHandler
- Parameters:
form - The definition of the form for which the submitted values
should be handled.formState - The session values for the formrequest - The http requestresponse - The http response
- Throws:
HandleException - If the form values could not be handled correctly
preAddMailtext
protected java.lang.String preAddMailtext(java.lang.String mailtext)
- Override the MailHandler to replace the ecardurl parameter by our
ecard view URL.
- Overrides:
preAddMailtext in class MailHandler
- Returns:
- the processed mailtext.
processExtraMainBody
protected void processExtraMainBody(javax.mail.internet.MimeBodyPart mainBody)
throws javax.mail.MessagingException
- Description copied from class:
MailHandler
- Give subclasses an opportunity to alter the main body part of the email.
- Overrides:
processExtraMainBody in class MailHandler
- Throws:
javax.mail.MessagingException
Copyright © 2007-2011 GX Software BV. All Rights Reserved.