View Javadoc
1   /*
2    * Copyright (c) 2002-2021, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.newsletter.business;
35  
36  import java.sql.Timestamp;
37  
38  /**
39   * This class represents business objects SendingNewsLetter
40   */
41  public class SendingNewsLetter
42  {
43      /////////////////////////////////////////////////////////////////////////////////
44      // Constants
45      private int _nId;
46      private int _nNewsLetterId;
47      private int _nCountSubscribers;
48      private String _strHtml;
49      private Timestamp _date;
50      private String _emailSubject;
51  
52      /**
53       * Sets the identifier of the sending
54       *
55       * @param nId
56       *            the sending identifier
57       */
58      public void setId( int nId )
59      {
60          _nId = nId;
61      }
62  
63      /**
64       * Returns the identifier of the sending
65       *
66       * @return the sending identifier
67       */
68      public int getId( )
69      {
70          return _nId;
71      }
72  
73      /**
74       * Sets the identifier of the newsletter
75       *
76       * @param nNewsLetterId
77       *            the newsletter identifier
78       */
79      public void setNewsLetterId( int nNewsLetterId )
80      {
81          _nNewsLetterId = nNewsLetterId;
82      }
83  
84      /**
85       * Returns the identifier of the newsletter
86       *
87       * @return the newsletter identifier
88       */
89      public int getNewsLetterId( )
90      {
91          return _nNewsLetterId;
92      }
93  
94      /**
95       * Sets the html content of the sending newsletter
96       *
97       * @param strHtml
98       *            the newsletter html content
99       */
100     public void setHtml( String strHtml )
101     {
102         _strHtml = strHtml;
103     }
104 
105     /**
106      * Returns the html content of the sending newsletter
107      *
108      * @return the newsletter html content
109      */
110     public String getHtml( )
111     {
112         return _strHtml;
113     }
114 
115     /**
116      * Sets the number of subscribers
117      *
118      * @param nCountSubscribers
119      *            the number of subscribers
120      */
121     public void setCountSubscribers( int nCountSubscribers )
122     {
123         _nCountSubscribers = nCountSubscribers;
124     }
125 
126     /**
127      * Returns the number of subscribers
128      *
129      * @return the number of subscribers
130      */
131     public int getCountSubscribers( )
132     {
133         return _nCountSubscribers;
134     }
135 
136     /**
137      * Sets the date of the newsletter sending
138      *
139      * @param date
140      *            the date of the sending
141      */
142     public void setDate( Timestamp date )
143     {
144         _date = date;
145     }
146 
147     /**
148      * Returns the date of the newsletter sending
149      *
150      * @return the date of sending
151      */
152     public Timestamp getDate( )
153     {
154         return _date;
155     }
156 
157     /**
158      * Returns the subject of the email
159      * 
160      * @return the subject of the email
161      */
162     public String getEmailSubject( )
163     {
164         return _emailSubject;
165     }
166 
167     /**
168      * Sets the subject of the email
169      * 
170      * @param subject
171      *            the new subject
172      */
173     public void setEmailSubject( String subject )
174     {
175         _emailSubject = subject;
176     }
177 }