|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.netuix.application.communities.invitations.email.EmailInviter
public class EmailInviter
Implemenation of a CommunityInviter
that uses JavaMail as its underlying transport. This inviter provides for using Strings
for the subject and body of the resulting email sent to each Invitee
. <p/>The overview of community functionality contains a description of the community framework.
Field Summary | |
---|---|
protected String |
communityRegistrationURL |
protected String |
from |
protected String |
fromPersonalName |
protected InvitationDetails |
invitationDetails |
protected String |
replyTo |
protected String |
replyToPersonalName |
protected String |
sender |
protected String |
smtpServerAddress |
protected String |
smtpServerPort |
protected String |
staticBodyText |
protected String |
staticSubjectText |
Constructor Summary | |
---|---|
EmailInviter(String sender, String password, String smtpServerAddress, String replyTo, String invitationURL, EmailTextFormatter emailFormatter) Constructor that uses a specified EmailTextFormatter . |
|
EmailInviter(String sender, String password, String smtpServerAddress, String replyTo, String invitationURL, String staticSubjectText, String staticBodyText) Constructor that uses a default static text EmailTextFormatter . |
Method Summary | |
---|---|
protected EmailTextFormatter |
createDefaultEmailFormatter() Overrideable method that is used to instantiate a default EmailTextFormatter . |
void |
destroy() Allows InvitationValidationTextGenerator implementations the opportunity to release any resources obtained during init or to perform any necessary cleanup operations. |
protected EmailTextFormatter |
getEmailFormatter() |
void |
init(InvitationDetails details) Allows CommunityInviter implementations the opportunity to perform any necessary initialization operations such as obtaining necessary resources such as database connections or loading file contents. |
protected void |
onAuthenticationFailed(String user, String smtpServer, javax.mail.AuthenticationFailedException afex) Overrideable method that can be used to be notified of authentication errors when the sender and password cannot be used to connect to the smtp server for sending email messages. |
protected void |
onSendFailed(String user, String smtpServer, String failedAddress, javax.mail.SendFailedException sfex) Overrideable method that can be used to be notified of send failed errors when the sender and password cannot be used to send a message to a recipient via the smtp server. |
void |
sendInvitations(InviteeIterator invitees) Sends individual invitations to the set of Invitees contained within the input InviteeIterator , according to the details for the invitation as contained in the input InvitationDetails argument. |
void |
setFrom(String from) Sets the from email address to use for sending invitation emails. |
void |
setFromPersonalName(String personalName) Sets the personal name to be used for the from portion of the invitation email. |
void |
setMailSessionDebug(boolean debugOn) Turns on SMTP mail session debuging, which outputs SMTP protocol interactions between the EmailInviter client and the SMTP server. |
void |
setReplyTo(String replyTo) Sets the reply-to email address to use for sending invitation emails. |
void |
setReplyToPersonalName(String personalName) Sets the personal name to be used for the reply-to portion of the invitation email. |
void |
setSmtpServerPort(String port) Sets the smtp port for the smtp server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String staticSubjectText
protected String staticBodyText
protected InvitationDetails invitationDetails
protected String sender
protected String from
protected String fromPersonalName
protected String smtpServerAddress
protected String smtpServerPort
protected String replyTo
protected String replyToPersonalName
protected String communityRegistrationURL
Constructor Detail |
---|
public EmailInviter(String sender, String password, String smtpServerAddress, String replyTo, String invitationURL, String staticSubjectText, String staticBodyText)
EmailTextFormatter
. If another formatter is to be used, an alternate constructor is available to specify it.
sender
- the username of the sending entitypassword
- the smtp password for the sending entity. Can be null if using an open relay.smtpServerAddress
- address of the smtp server to use to send the invitation emailsreplyTo
- the email address that will be used as the reply-to in the invitation emailsinvitationURL
- the full URL to the community registration page or the community itself, depending on whether or not the community is public or private. This needs to be assembled by the creator of this EmailInviter
since invitations happen in an asynchronous context wherein there is no access to a request to determine necessary information such as server and port.staticSubjectText
- the subject text to use for invitation emailsstaticBodyText
- the body text to use for invitation emailspublic EmailInviter(String sender, String password, String smtpServerAddress, String replyTo, String invitationURL, EmailTextFormatter emailFormatter)
EmailTextFormatter
. The Weblogic Portal Framework provides two implementations of EmailTextFormatter
, the first a simple StaticEmailTextFormatter
, which uses fixed Strings as the email text source, and a JspEmailTextFormatter
which allows developers to use JSP's as the source for the email text, allowing for greater customizability. Additionally, custom implementations of the EmailTextFormatter
interface may be supplied if developers wish to use a completely custom email text formatter.
sender
- the username of the sending entitypassword
- the smtp password for the sending entity. Can be null if using an open relay.smtpServerAddress
- address of the smtp server to use to send the invitation emailsreplyTo
- the email address that will be used as the reply-to in the invitation emailsinvitationURL
- the full URL to the community registration page or the community itself, depending on whether or not the community is public or private. This needs to be assembled by the creator of this EmailInviter
since invitations happen in an asynchronous context wherein there is no access to a request to determine necessary information such as server and port.Method Detail |
---|
public void init(InvitationDetails details) throws InviteException
CommunityInviter
CommunityInviter
implementations the opportunity to perform any necessary initialization operations such as obtaining necessary resources such as database connections or loading file contents.init
in interface CommunityInviter
details
- the specific details of the invitationInviteException
public void sendInvitations(InviteeIterator invitees) throws InviteException
CommunityInviter
Invitees
contained within the input InviteeIterator
, according to the details for the invitation as contained in the input InvitationDetails
argument.sendInvitations
in interface CommunityInviter
invitees
- an iterator containing all invitees to inviteInviteException
protected EmailTextFormatter createDefaultEmailFormatter()
EmailTextFormatter
. The default formatter for the EmailInviter
is the StaticEmailTextFormatter
.StaticEmailTextFormatter
protected void onAuthenticationFailed(String user, String smtpServer, javax.mail.AuthenticationFailedException afex)
user
- the user idsmtpServer
- the smtp server to which the authentication operation was attemptedafex
- the AuthenticationFailedException which was thrownprotected void onSendFailed(String user, String smtpServer, String failedAddress, javax.mail.SendFailedException sfex)
user
- the user id attempting to send the messagesmtpServer
- the smtp server the delivery request was made tofailedAddress
- the email address that delivery failed forsfex
- the SendFailedException which was thrownpublic void destroy()
CommunityInviter
InvitationValidationTextGenerator
implementations the opportunity to release any resources obtained during init or to perform any necessary cleanup operations.destroy
in interface CommunityInviter
protected EmailTextFormatter getEmailFormatter()
public void setFrom(String from)
from
-public void setFromPersonalName(String personalName)
personalName
- personal name for the from email addresspublic void setReplyTo(String replyTo)
replyTo
-public void setReplyToPersonalName(String personalName)
personalName
- personal name for the from email addresspublic void setSmtpServerPort(String port)
port
- the port the smtp server is setup to listen onpublic final void setMailSessionDebug(boolean debugOn)
debugOn
- if true, debug is enabled
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.