|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jp.protection.priv.pro.integration.EmailLicensingFacadeDelivery
public class EmailLicensingFacadeDelivery
E-mail implementation of the LicensingFacadeDelivery interface that
delivers specified license by sending it as an e-mail message attachment
| Nested Class Summary | |
|---|---|
static class |
EmailLicensingFacadeDelivery.ByteArrayDataSource
|
| Field Summary | |
|---|---|
static java.lang.String |
ADDRESS_DELIMITER
|
protected boolean |
fAllowFreeEmailAddresses
|
protected LocalLicensingFacade |
fLocalLicensingFacade
|
static java.lang.String |
MAIL_PROPERTY_MAIL_FROM
|
static java.lang.String |
MAIL_PROPERTY_MAIL_USER
|
static java.lang.String |
MAIL_PROPERTY_SMTP_AUTH
|
static java.lang.String |
MAIL_PROPERTY_SMTP_HOST
|
static java.lang.String |
MAIL_PROPERTY_SMTP_PORT
|
(package private) static java.util.ResourceBundle |
res
|
| Constructor Summary | |
|---|---|
EmailLicensingFacadeDelivery()
|
|
| Method Summary | |
|---|---|
LicensingFacadeResult |
checkEmailAddress(dev.entities.Customer aCustomer)
|
LicensingFacadeResult |
deliver(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer)
Delivers specified license by sending it as an e-mail message attachment |
protected void |
error(java.lang.Throwable ex)
|
protected javax.mail.internet.InternetAddress[] |
getInternetAddresses(java.lang.String[] anInternetAddresses)
|
protected com.jp.protection.utils.ProtectionLogger |
getLogger()
|
protected javax.mail.Session |
getMailSession()
|
java.lang.String |
getSentMessage(dev.entities.Customer aCustomer)
|
java.lang.String |
getUnableToSendMessage(dev.entities.Customer aCustomer)
|
void |
init(LocalLicensingFacade aLocalLicensingFacade)
Initializes delivery object. |
boolean |
isAllowFreeEmailAddresses()
Tests that usage of free e-mail addresses is allowed for licenses delivery. |
protected java.lang.String |
processTemplate(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aTemplate)
|
boolean |
sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer)
Sends license to a customer to address specified in customer's information. |
boolean |
sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aSubject,
java.lang.String aText)
Sends license to a customer to address specified in customer's information. |
boolean |
sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aCC,
java.lang.String aBCC,
java.lang.String aSubject,
java.lang.String aText)
Sends license to a customer to address specified in customer's information. |
boolean |
sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aCC,
java.lang.String aBCC,
java.lang.String aSubject,
java.lang.String aText,
java.lang.String aLicenseFileName)
Sends license to a customer to address specified in customer's information. |
boolean |
sendMessage(java.lang.String[] aTo,
java.lang.String[] aCc,
java.lang.String[] aBcc,
java.lang.String aFrom,
java.lang.String aReplyTo,
java.lang.String aSubject,
java.lang.String aText,
byte[] aLicenseBytes,
java.lang.String aLicenseFileName)
|
void |
setAllowFreeEmailAddresses(boolean aAllowFreeEmailAddresses)
Specifies that usage of free e-mail addresses is allowed for licenses delivery. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static java.util.ResourceBundle res
public static final java.lang.String ADDRESS_DELIMITER
protected boolean fAllowFreeEmailAddresses
protected LocalLicensingFacade fLocalLicensingFacade
public static final java.lang.String MAIL_PROPERTY_SMTP_HOST
public static final java.lang.String MAIL_PROPERTY_MAIL_FROM
public static final java.lang.String MAIL_PROPERTY_MAIL_USER
public static final java.lang.String MAIL_PROPERTY_SMTP_AUTH
public static final java.lang.String MAIL_PROPERTY_SMTP_PORT
| Constructor Detail |
|---|
public EmailLicensingFacadeDelivery()
| Method Detail |
|---|
public LicensingFacadeResult deliver(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer)
deliver in interface LicensingFacadeDeliveryaSession - a session objectaLicense - a license to be deliveredaCustomer - Customer customer information
LicensingFacadeResult instancepublic boolean isAllowFreeEmailAddresses()
true if usage of free e-mail addresses is allowed for
licenses delivery; false otherwise.public void setAllowFreeEmailAddresses(boolean aAllowFreeEmailAddresses)
aAllowFreeEmailAddresses - true if usage of free e-mail
addresses is allowed for licenses delivery;
false otherwise.public LicensingFacadeResult checkEmailAddress(dev.entities.Customer aCustomer)
protected void error(java.lang.Throwable ex)
public java.lang.String getSentMessage(dev.entities.Customer aCustomer)
public java.lang.String getUnableToSendMessage(dev.entities.Customer aCustomer)
public boolean sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer)
throws javax.mail.MessagingException
aSession - a session objectaLicense - license to sendaCustomer - customer information
true if license was sent; false otherwise
javax.mail.MessagingException - in case of any error during sending
public boolean sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aSubject,
java.lang.String aText)
throws javax.mail.MessagingException
aSession - a session objectaLicense - license to sendaCustomer - customer informationaSubject - e-mail message subject templateaText - e-mail message text template
true if license was sent; false otherwise
javax.mail.MessagingException - in case of any error during sending
public boolean sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aCC,
java.lang.String aBCC,
java.lang.String aSubject,
java.lang.String aText,
java.lang.String aLicenseFileName)
throws javax.mail.MessagingException
aSession - a session objectaLicense - license to sendaCustomer - customer informationaSubject - e-mail message subject templateaText - e-mail message text templateaLicenseFileName - name of the license to attach
true if license was sent; false otherwise
javax.mail.MessagingException - in case of any error during sending
public boolean sendLicense(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aCC,
java.lang.String aBCC,
java.lang.String aSubject,
java.lang.String aText)
throws javax.mail.MessagingException
aSession - a session objectaLicense - license to sendaCustomer - customer informationaSubject - e-mail message subject templateaText - e-mail message text template
true if license was sent; false otherwise
javax.mail.MessagingException - in case of any error during sending
protected java.lang.String processTemplate(LicensingFacadeSession aSession,
License aLicense,
dev.entities.Customer aCustomer,
java.lang.String aTemplate)
public void init(LocalLicensingFacade aLocalLicensingFacade)
LicensingFacadeDelivery
init in interface LicensingFacadeDeliveryaLocalLicensingFacade - licensing facade for which delivery object will be working for
protected javax.mail.internet.InternetAddress[] getInternetAddresses(java.lang.String[] anInternetAddresses)
throws javax.mail.internet.AddressException
javax.mail.internet.AddressException
public boolean sendMessage(java.lang.String[] aTo,
java.lang.String[] aCc,
java.lang.String[] aBcc,
java.lang.String aFrom,
java.lang.String aReplyTo,
java.lang.String aSubject,
java.lang.String aText,
byte[] aLicenseBytes,
java.lang.String aLicenseFileName)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionprotected javax.mail.Session getMailSession()
protected com.jp.protection.utils.ProtectionLogger getLogger()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||