Package org.opencms.newsletter
Class CmsSimpleNewsletterRecipient
- java.lang.Object
-
- org.opencms.newsletter.CmsSimpleNewsletterRecipient
-
- All Implemented Interfaces:
I_CmsNewsletterRecipient
public class CmsSimpleNewsletterRecipient extends java.lang.Object implements I_CmsNewsletterRecipient
Simple implementation of interfaceI_CmsNewsletterRecipient
, withI_CmsNewsletterRecipient.isSubscriber(org.opencms.newsletter.I_CmsNewsletterContent)
always returning true.- Since:
- 6.0.2
-
-
Constructor Summary
Constructors Constructor Description CmsSimpleNewsletterRecipient(java.lang.String email, java.lang.String name)
Creates a new CmsSimpleNewsletterRecipient.CmsSimpleNewsletterRecipient(java.lang.String email, java.lang.String firstname, java.lang.String lastname)
Creates a new CmsSimpleNewsletterRecipient.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getEmail()
Returns the email address of the recipient.java.lang.String
getFirstname()
Returns the firstname of the recipient.java.lang.String
getFullName()
Returns the nicename of the recipient.java.lang.String
getLastname()
Returns the lastname of the recipient.java.lang.String
getName()
Returns the name of the recipient.int
hashCode()
boolean
isSubscriber(I_CmsNewsletterContent content)
Returnstrue
in case this newsletter recipient has subscribed to the given content.protected void
setEmail(java.lang.String email)
Set the email address of this recepient.
-
-
-
Constructor Detail
-
CmsSimpleNewsletterRecipient
public CmsSimpleNewsletterRecipient(java.lang.String email, java.lang.String name)
Creates a new CmsSimpleNewsletterRecipient.- Parameters:
email
- the email address to be sentname
- the nicename of the recipient
-
CmsSimpleNewsletterRecipient
public CmsSimpleNewsletterRecipient(java.lang.String email, java.lang.String firstname, java.lang.String lastname)
Creates a new CmsSimpleNewsletterRecipient.- Parameters:
email
- the email address to be sentfirstname
- the firstname of the recipientlastname
- the newsletter recipient's lastname
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getEmail
public java.lang.String getEmail()
Description copied from interface:I_CmsNewsletterRecipient
Returns the email address of the recipient.- Specified by:
getEmail
in interfaceI_CmsNewsletterRecipient
- Returns:
- the email address of the recipient.
- See Also:
I_CmsNewsletterRecipient.getEmail()
-
getFirstname
public java.lang.String getFirstname()
Description copied from interface:I_CmsNewsletterRecipient
Returns the firstname of the recipient.- Specified by:
getFirstname
in interfaceI_CmsNewsletterRecipient
- Returns:
- the firstname of the recipient.
- See Also:
I_CmsNewsletterRecipient.getFirstname()
-
getFullName
public java.lang.String getFullName()
Description copied from interface:I_CmsNewsletterRecipient
Returns the nicename of the recipient.- Specified by:
getFullName
in interfaceI_CmsNewsletterRecipient
- Returns:
- the nicename of the recipient.
- See Also:
I_CmsNewsletterRecipient.getFullName()
-
getLastname
public java.lang.String getLastname()
Description copied from interface:I_CmsNewsletterRecipient
Returns the lastname of the recipient.- Specified by:
getLastname
in interfaceI_CmsNewsletterRecipient
- Returns:
- the lastname of the recipient.
- See Also:
I_CmsNewsletterRecipient.getLastname()
-
getName
public java.lang.String getName()
Returns the name of the recipient.- Returns:
- the name of the recipient.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isSubscriber
public boolean isSubscriber(I_CmsNewsletterContent content)
Description copied from interface:I_CmsNewsletterRecipient
Returnstrue
in case this newsletter recipient has subscribed to the given content.- Specified by:
isSubscriber
in interfaceI_CmsNewsletterRecipient
- Parameters:
content
- the content to check for subscription- Returns:
true
in case this newsletter recipient has subscribed to the given content- See Also:
I_CmsNewsletterRecipient.isSubscriber(org.opencms.newsletter.I_CmsNewsletterContent)
-
setEmail
protected void setEmail(java.lang.String email)
Set the email address of this recepient.- Parameters:
email
- the email address of this recepient to set.
-
-