fr.paris.lutece.plugins.greetingscard.business
Class GreetingsCard

java.lang.Object
  extended by fr.paris.lutece.plugins.greetingscard.business.GreetingsCard

public class GreetingsCard
extends java.lang.Object

This class represents a GreetingsCardTemplate object.


Field Summary
static int STATUS_RED
           
static int STATUS_RED_NOTIFIED
           
static int STATUS_SENT
           
 
Constructor Summary
GreetingsCard()
          Creates a new GreetingsCardTemplate object.
 
Method Summary
 java.sql.Date getDate()
          Returns the date of the greetings card sending
 java.lang.String getDomainName()
           
 java.lang.String getId()
          Returns the identifier of the greetings card
 int getIdGCT()
          Returns the identifier of the greetings card template
 java.lang.String getMessage()
          Returns the message string
 java.lang.String getMessage2()
          Returns the message2 string
 boolean getNotifySender()
          Check if the sender should be notified when the card is red.
 java.lang.String getRecipientEmail()
          Returns the recipient email string
 java.lang.String getSenderEmail()
          Returns the sender email string
 java.lang.String getSenderIp()
          Returns the sender name string
 java.lang.String getSenderName()
          Returns the sender name string
 int getStatus()
          Get the status of the card.
 java.lang.StringBuffer getXml()
          Return a xml string with the data of the GreetingsCard.
 java.lang.StringBuffer getXmlWithoutHeaderForStats()
          Return a xml string with the data of the GreetingsCard, but without any XML header.
 boolean isCopy()
          Return 1 if the card is a copy or 0 if not
 boolean isInternal()
          Test if the greeting card was sent to an internal person.
 boolean isRead()
          Return the state of read of the card
 void setCopy(boolean copy)
          Sets the copy state
 void setDate(java.sql.Date date)
          -
 void setId(java.lang.String strIdGC)
          Sets the identifier of the greetings card to the specified value
 void setIdGCT(int nIdGCT)
          Sets the identifier of the greetings card template to the specified value
 void setMessage(java.lang.String strMessage)
          Sets the message string to the specified value
 void setMessage2(java.lang.String message2)
          Sets the message2 string to the specified value
 void setNotifySender(boolean bNotifySender)
          Set the notify sender boolean
 void setRecipientEmail(java.lang.String strRecipientEmail)
          Sets the recipient email string to the specified value
 void setSenderEmail(java.lang.String strSenderEmail)
          Sets the sender email string to the specified value
 void setSenderIp(java.lang.String strSenderIp)
          Sets the sender Ip string to the specified value
 void setSenderName(java.lang.String strSenderName)
          Sets the sender name string to the specified value
 void setStatus(int nStatus)
          Set the status of the card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_SENT

public static final int STATUS_SENT
See Also:
Constant Field Values

STATUS_RED

public static final int STATUS_RED
See Also:
Constant Field Values

STATUS_RED_NOTIFIED

public static final int STATUS_RED_NOTIFIED
See Also:
Constant Field Values
Constructor Detail

GreetingsCard

public GreetingsCard()
Creates a new GreetingsCardTemplate object.

Method Detail

getId

public java.lang.String getId()
Returns the identifier of the greetings card

Returns:
The identifier of the greetings card

setId

public void setId(java.lang.String strIdGC)
Sets the identifier of the greetings card to the specified value

Parameters:
strIdGC - The new value

getSenderName

public java.lang.String getSenderName()
Returns the sender name string

Returns:
The sender name string

setSenderName

public void setSenderName(java.lang.String strSenderName)
Sets the sender name string to the specified value

Parameters:
strSenderName - The new value

getSenderIp

public java.lang.String getSenderIp()
Returns the sender name string

Returns:
The sender name string

setSenderIp

public void setSenderIp(java.lang.String strSenderIp)
Sets the sender Ip string to the specified value

Parameters:
strSenderIp - The new value

getSenderEmail

public java.lang.String getSenderEmail()
Returns the sender email string

Returns:
The sender email string

setSenderEmail

public void setSenderEmail(java.lang.String strSenderEmail)
Sets the sender email string to the specified value

Parameters:
strSenderEmail - The new value

getRecipientEmail

public java.lang.String getRecipientEmail()
Returns the recipient email string

Returns:
The recipient email string

setRecipientEmail

public void setRecipientEmail(java.lang.String strRecipientEmail)
Sets the recipient email string to the specified value

Parameters:
strRecipientEmail - The new value

getMessage

public java.lang.String getMessage()
Returns the message string

Returns:
The message string

setMessage

public void setMessage(java.lang.String strMessage)
Sets the message string to the specified value

Parameters:
strMessage - The new value

getMessage2

public java.lang.String getMessage2()
Returns the message2 string

Returns:
The message2 string

setMessage2

public void setMessage2(java.lang.String message2)
Sets the message2 string to the specified value

Parameters:
message2 - The new value

setDate

public void setDate(java.sql.Date date)
-

Parameters:
date - The new value

getDate

public java.sql.Date getDate()
Returns the date of the greetings card sending

Returns:
The date

getIdGCT

public int getIdGCT()
Returns the identifier of the greetings card template

Returns:
The identifier of the greetings card template

setIdGCT

public void setIdGCT(int nIdGCT)
Sets the identifier of the greetings card template to the specified value

Parameters:
nIdGCT - The new value

isRead

public boolean isRead()
Return the state of read of the card

Returns:
1 if the card has been read or 0 if not read

getStatus

public int getStatus()
Get the status of the card.

Returns:
The status of the card. Status are STATUS_SENT if the card is send, STATUS_RED if it has been red or STATUS_RED_NOTIFIED if it has been red and the sender has been notified.

setStatus

public void setStatus(int nStatus)
Set the status of the card.

Parameters:
nStatus - The status of the card. Valid status are STATUS_SENT if the card is send, STATUS_RED if it has been red or STATUS_RED_NOTIFIED if it has been red and the sender has been notified.

isCopy

public boolean isCopy()
Return 1 if the card is a copy or 0 if not

Returns:
1 if the card is a copy or 0 if not

setCopy

public void setCopy(boolean copy)
Sets the copy state

Parameters:
read - 1 if copy, 0 if not copy

getNotifySender

public boolean getNotifySender()
Check if the sender should be notified when the card is red.

Returns:
True if the sender should be notified when the status of the greetings card change, false otherwise.

setNotifySender

public void setNotifySender(boolean bNotifySender)
Set the notify sender boolean

Parameters:
bNotifySender - True if the sender should be notified when the card is red, false otherwise

isInternal

public boolean isInternal()
Test if the greeting card was sent to an internal person.

Returns:
the value of the test.

getDomainName

public java.lang.String getDomainName()

getXml

public java.lang.StringBuffer getXml()
Return a xml string with the data of the GreetingsCard.

Returns:
xml

getXmlWithoutHeaderForStats

public java.lang.StringBuffer getXmlWithoutHeaderForStats()
Return a xml string with the data of the GreetingsCard, but without any XML header.

Returns:
xml describing the GreetingsCard without any XML header


Copyright © 2012 Mairie de Paris. All Rights Reserved.