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;
35
36 /**
37 *
38 */
39 public class BlogFilter
40 {
41
42 // Variables declarations
43 private Integer [ ] _arrayTagsId;
44 private Integer [ ] _arrayId;
45
46 // The default value is true to assure ascendant compatibility
47 private boolean _bLoadBinaries = true;
48 private Boolean _bIsPublished;
49 private String _dateMin;
50 private String _dateMax;
51 private int _nPortletId;
52 private boolean _bOrderInPortlet;
53 private boolean _bIsArchived;
54
55 /**
56 * @return the _arrayTagsId
57 */
58 public Integer [ ] getTagsId( )
59 {
60 return _arrayTagsId;
61 }
62
63 /**
64 * @param arrayTagsId
65 * the _arrayTagsId to set
66 */
67 public void setTagsId( Integer [ ] arrayTagsId )
68 {
69 _arrayTagsId = arrayTagsId;
70 }
71
72 /**
73 * Tell if the filter contains a criteria on the tag
74 *
75 * @return True if the filter contains a criteria on the tags otherwise false
76 */
77 public boolean containsTagsCriteria( )
78 {
79 return ( ( _arrayTagsId != null ) && ( _arrayTagsId.length != 0 ) );
80 }
81
82 /**
83 * Tell if the filter contains a criteria on the Id
84 *
85 * @return True if the filter contains a criteria on the Ids otherwise false
86 */
87 public boolean containsIdsCriteria( )
88 {
89 return ( ( _arrayId != null ) && ( _arrayId.length != 0 ) );
90 }
91
92 /**
93 * @return the _arrayId
94 */
95 public Integer [ ] getIds( )
96 {
97 return _arrayId;
98 }
99
100 /**
101 * @param arrayId
102 * the _arrayId to set
103 */
104 public void setIds( Integer [ ] arrayId )
105 {
106 _arrayId = arrayId;
107 }
108
109 /**
110 * Get the boolean that indicates whether binaries of documents should be loaded
111 *
112 * @return True if binaries should be loaded, false otherwise
113 */
114 public boolean getLoadBinaries( )
115 {
116 return _bLoadBinaries;
117 }
118
119 /**
120 * Set the boolean that indicates whether binaries of documents should be loaded
121 *
122 * @param bLoadBinaries
123 * True if binaries should be loaded, false otherwise
124 */
125 public void setLoadBinaries( boolean bLoadBinaries )
126 {
127 this._bLoadBinaries = bLoadBinaries;
128 }
129
130 /**
131 * @return the _bIsPublished
132 */
133 public Boolean isPublished( )
134 {
135 return _bIsPublished;
136 }
137
138 /**
139 * @param bIsPublished
140 * the _bIsPublished to set
141 */
142 public void setIsPublished( Boolean bIsPublished )
143 {
144 this._bIsPublished = bIsPublished;
145 }
146
147 /**
148 * @return the _dateMin
149 */
150 public String getDateMin( )
151 {
152 return _dateMin;
153 }
154
155 /**
156 * @param dateMin
157 * the _dateMin to set
158 */
159 public void setDateMin( String dateMin )
160 {
161 this._dateMin = dateMin;
162 }
163
164 /**
165 * @return the _dateMax
166 */
167 public String getDateMax( )
168 {
169 return _dateMax;
170 }
171
172 /**
173 * @param dateMax
174 * the _dateMax to set
175 */
176 public void setDateMax( String dateMax )
177 {
178 this._dateMax = dateMax;
179 }
180
181 /**
182 * Get the boolean that indicates whether loaded by order in the portlet list
183 *
184 * @return True if loaded by order in the portlet list, false otherwise
185 */
186 public boolean getOrderInPortlet( )
187 {
188 return _bOrderInPortlet;
189 }
190
191 /**
192 * Set the boolean that indicates whether loaded by order in the portlet list
193 *
194 * @param bOrder
195 * True if if loaded by order in the portlet list, false otherwise
196 */
197 public void setOrderInPortlet( boolean bOrder )
198 {
199 this._bOrderInPortlet = bOrder;
200 }
201
202 /**
203 * Returns the nPortletId
204 *
205 * @return The nPortletId
206 */
207 public int getPortletId( )
208 {
209 return _nPortletId;
210 }
211
212 /**
213 * Sets the IdPortlet
214 *
215 * @param nPortletId
216 * The nPortletId
217 */
218 public void setPortletId( int nPortletId )
219 {
220 _nPortletId = nPortletId;
221 }
222
223 /**
224 * @return the _bisArchived
225 */
226 public boolean isArchived( )
227 {
228 return _bIsArchived;
229 }
230
231 /**
232 * @param bIsArchived
233 * the _bIsArchived to set
234 */
235 public void setIsArchived( boolean bIsArchived )
236 {
237 this._bIsArchived = bIsArchived;
238 }
239
240 }