org.opencms.newsletter
Class CmsSimpleNewsletterRecipient

java.lang.Object
  extended by org.opencms.newsletter.CmsSimpleNewsletterRecipient
All Implemented Interfaces:
I_CmsNewsletterRecipient

public class CmsSimpleNewsletterRecipient
extends java.lang.Object
implements I_CmsNewsletterRecipient

Simple implementation of interface I_CmsNewsletterRecipient, with I_CmsNewsletterRecipient.isSubscriber(org.opencms.newsletter.I_CmsNewsletterContent) always returning true.

Since:
6.0.2
Version:
$Revision: 1.7 $
Author:
Jan Baudisch, Alexander Kandzior, Achim Westermann

Constructor Summary
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
 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)
          Returns true 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsSimpleNewsletterRecipient

public CmsSimpleNewsletterRecipient(java.lang.String email,
                                    java.lang.String name)
Creates a new CmsSimpleNewsletterRecipient.

Parameters:
email - the email address to be sent
name - 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 sent
firstname - the firstname of the recipient
lastname - the newsletter recipient's lastname
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.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 interface I_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 interface I_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 interface I_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 interface I_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 class java.lang.Object
See Also:
Object.hashCode()

isSubscriber

public boolean isSubscriber(I_CmsNewsletterContent content)
Description copied from interface: I_CmsNewsletterRecipient
Returns true in case this newsletter recipient has subscribed to the given content.

Specified by:
isSubscriber in interface I_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.