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.blog.business.portlet;
35
36 import java.sql.Date;
37
38 import fr.paris.lutece.portal.business.portlet.Portlet;
39 import fr.paris.lutece.portal.business.portlet.PortletHome;
40
41 public class BlogPublication
42 {
43
44 private int _nIdBlog;
45 private int _nIdPortlet;
46 private Date _dateBeginPublishing;
47 private Date _dateEndPublishing;
48 private int _nBlogOrder;
49 private int _nStatus = 1;
50
51 /**
52 * Returns the IdBlog
53 *
54 * @return The IdBlog
55 */
56 public int getIdBlog( )
57 {
58 return _nIdBlog;
59 }
60
61 /**
62 * Sets the IdBlog
63 *
64 * @param nIdBlog
65 * The IdBlog
66 */
67 public void setIdBlog( int nIdBlog )
68 {
69 _nIdBlog = nIdBlog;
70 }
71
72 /**
73 * Returns the IdPortlet
74 *
75 * @return The IdPortlet
76 */
77 public int getIdPortlet( )
78 {
79 return _nIdPortlet;
80 }
81
82 /**
83 * Sets the IdBlog
84 *
85 * @param nIdPortlet
86 * The portlet Id
87 */
88 public void setIdPortlet( int nIdPortlet )
89 {
90 _nIdPortlet = nIdPortlet;
91 }
92
93 /**
94 * @return the _dateBeginPublishing
95 */
96 public Date getDateBeginPublishing( )
97 {
98 return _dateBeginPublishing;
99 }
100
101 /**
102 * @param datePublishing
103 * the _datePublishing to set
104 */
105 public void setDateBeginPublishing( Date datePublishing )
106 {
107 _dateBeginPublishing = datePublishing;
108 }
109
110 /**
111 * @return the _dateEndPublishing
112 */
113 public Date getDateEndPublishing( )
114 {
115 return _dateEndPublishing;
116 }
117
118 /**
119 * @param dateEndPublishing
120 * the End Publishing date
121 */
122 public void setDateEndPublishing( Date dateEndPublishing )
123 {
124 _dateEndPublishing = dateEndPublishing;
125 }
126
127 /**
128 * @return the _nBlogOrder
129 */
130 public int getBlogOrder( )
131 {
132 return _nBlogOrder;
133 }
134
135 /**
136 * @param nBlogOrder
137 * the _nBlogOrder to set
138 */
139 public void setBlogOrder( int nBlogOrder )
140 {
141 _nBlogOrder = nBlogOrder;
142 }
143
144 /**
145 * @return the _nStatus
146 */
147 public int getStatus( )
148 {
149 return _nStatus;
150 }
151
152 /**
153 * @param nStatus
154 * the _nStatus to set
155 */
156 public void setStatus( int nStatus )
157 {
158 _nStatus = nStatus;
159 }
160
161 /**
162 * return the Portlet
163 *
164 * @return
165 */
166 public Portlet getPortlet( )
167 {
168 return PortletHome.findByPrimaryKey( _nIdPortlet );
169 }
170
171 }