View Javadoc
1   /*
2    * Copyright (c) 2002-2017, Mairie de 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.xmlpage.service;
35  
36  import org.apache.commons.lang.builder.ToStringBuilder;
37  
38  import java.util.Map;
39  import java.util.Set;
40  
41  
42  /**
43   * This class is used  to gather all the XmlPage data generic to a group of pages.
44   * It is only used by the daemon responsible for the copy and validation of the
45   * xml files. It provides an organised structure more easy to handle for the daemon.
46   */
47  public final class XmlPageGroup
48  {
49      private String _strName;
50      private String _strInputFilesDirectoryPath;
51      private String _strLockPublicationPath;
52      private String _strLockTransfertPath;
53      private String _strXsdFilesDirectoryPath;
54      private String _strMailSenderName;
55      private String _strMailSenderEmail;
56      private String _strMailRecipientList;
57      private String _strMailValidationOkSubject;
58      private String _strMailValidationKoSubject;
59      private String _strMailPublicationOkSubject;
60      private String _strMailPublicationKoSubject;
61      private Set _listExtensionFileCopy;
62      private Map _listXmlPageElement;
63  
64      /**
65       * @return Returns the _listXmlPageElement.
66       */
67      public Map getListXmlPageElement(  )
68      {
69          return _listXmlPageElement;
70      }
71  
72      /**
73       * @param listXmlPageElement The _listXmlPageElement to set.
74       */
75      public void setListXmlPageElement( Map listXmlPageElement )
76      {
77          _listXmlPageElement = listXmlPageElement;
78      }
79  
80      /**
81       * @param strPageName the name of the searching page
82       * @return Returns the XmlPageElement for a given page name
83       */
84      public XmlPageElement getXmlPageElement( String strPageName )
85      {
86          return (XmlPageElement) _listXmlPageElement.get( strPageName );
87      }
88  
89      /**
90       * @return Returns the _strName.
91       */
92      public String getName(  )
93      {
94          return _strName;
95      }
96  
97      /**
98       * @param strName The _strName to set.
99       */
100     public void setName( String strName )
101     {
102         _strName = strName;
103     }
104 
105     /**
106      * @return Returns the _strInputFilesDirectoryPath.
107      */
108     public String getInputFilesDirectoryPath(  )
109     {
110         return _strInputFilesDirectoryPath;
111     }
112 
113     /**
114      * @param strInputFilesDirectoryPath The _strInputFilesDirectoryPath to set.
115      */
116     public void setInputFilesDirectoryPath( String strInputFilesDirectoryPath )
117     {
118         _strInputFilesDirectoryPath = strInputFilesDirectoryPath;
119     }
120 
121     /**
122      * @return Returns the _listExtensionFileCopy.
123      */
124     public Set getListExtensionFileCopy(  )
125     {
126         return _listExtensionFileCopy;
127     }
128 
129     /**
130      * @param listExtensionFileCopy The _listExtensionFileCopy to set.
131      */
132     public void setListExtensionFileCopy( Set listExtensionFileCopy )
133     {
134         _listExtensionFileCopy = listExtensionFileCopy;
135     }
136 
137     /**
138      * @return Returns the _strLockPublicationPath.
139      */
140     public String getLockPublicationPath(  )
141     {
142         return _strLockPublicationPath;
143     }
144 
145     /**
146      * @param strLockPublicationPath The _strLockPublicationPath to set.
147      */
148     public void setLockPublicationPath( String strLockPublicationPath )
149     {
150         _strLockPublicationPath = strLockPublicationPath;
151     }
152 
153     /**
154      * @return Returns the _strLockTransfertPath.
155      */
156     public String getLockTransfertPath(  )
157     {
158         return _strLockTransfertPath;
159     }
160 
161     /**
162      * @param strLockTransfertPath The _strLockTransfertPath to set.
163      */
164     public void setLockTransfertPath( String strLockTransfertPath )
165     {
166         _strLockTransfertPath = strLockTransfertPath;
167     }
168 
169     /**
170      * @return Returns the _strMailRecipientList.
171      */
172     public String getMailRecipientList(  )
173     {
174         return _strMailRecipientList;
175     }
176 
177     /**
178      * @param strMailRecipientList The _strMailRecipientList to set.
179      */
180     public void setMailRecipientList( String strMailRecipientList )
181     {
182         _strMailRecipientList = strMailRecipientList;
183     }
184 
185     /**
186      * @return Returns the _strMailPublicationKoSubject.
187      */
188     public String getMailPublicationKoSubject(  )
189     {
190         return _strMailPublicationKoSubject;
191     }
192 
193     /**
194      * @param strMailPublicationKoSubject The _strMailPublicationKoSubject to set.
195      */
196     public void setMailPublicationKoSubject( String strMailPublicationKoSubject )
197     {
198         _strMailPublicationKoSubject = strMailPublicationKoSubject;
199     }
200 
201     /**
202      * @return Returns the _strMailPublicationOkSubject.
203      */
204     public String getMailPublicationOkSubject(  )
205     {
206         return _strMailPublicationOkSubject;
207     }
208 
209     /**
210      * @param strMailPublicationOkSubject The _strMailPublicationOkSubject to set.
211      */
212     public void setMailPublicationOkSubject( String strMailPublicationOkSubject )
213     {
214         _strMailPublicationOkSubject = strMailPublicationOkSubject;
215     }
216 
217     /**
218      * @return Returns the _strMailSenderEmail.
219      */
220     public String getMailSenderEmail(  )
221     {
222         return _strMailSenderEmail;
223     }
224 
225     /**
226      * @param strMailSenderEmail The _strMailSenderEmail to set.
227      */
228     public void setMailSenderEmail( String strMailSenderEmail )
229     {
230         _strMailSenderEmail = strMailSenderEmail;
231     }
232 
233     /**
234      * @return Returns the _strMailSenderName.
235      */
236     public String getMailSenderName(  )
237     {
238         return _strMailSenderName;
239     }
240 
241     /**
242      * @param strMailSenderName The _strMailSenderName to set.
243      */
244     public void setMailSenderName( String strMailSenderName )
245     {
246         _strMailSenderName = strMailSenderName;
247     }
248 
249     /**
250      * @return Returns the _strMailValidationKoSubject.
251      */
252     public String getMailValidationKoSubject(  )
253     {
254         return _strMailValidationKoSubject;
255     }
256 
257     /**
258      * @param strMailValidationKoSubject The _strMailValidationKoSubject to set.
259      */
260     public void setMailValidationKoSubject( String strMailValidationKoSubject )
261     {
262         _strMailValidationKoSubject = strMailValidationKoSubject;
263     }
264 
265     /**
266      * @return Returns the _strMailValidationOkSubject.
267      */
268     public String getMailValidationOkSubject(  )
269     {
270         return _strMailValidationOkSubject;
271     }
272 
273     /**
274      * @param strMailValidationOkSubject The _strMailValidationOkSubject to set.
275      */
276     public void setMailValidationOkSubject( String strMailValidationOkSubject )
277     {
278         _strMailValidationOkSubject = strMailValidationOkSubject;
279     }
280 
281     /**
282      * @return Returns the _strXsdFilesDirectoryPath.
283      */
284     public String getXsdFilesDirectoryPath(  )
285     {
286         return _strXsdFilesDirectoryPath;
287     }
288 
289     /**
290      * @param strXsdFilesDirectoryPath The _strXsdFilesDirectoryPath to set.
291      */
292     public void setXsdFilesDirectoryPath( String strXsdFilesDirectoryPath )
293     {
294         _strXsdFilesDirectoryPath = strXsdFilesDirectoryPath;
295     }
296 
297     /**
298      * toString method
299      * @return String including all data of this bean
300      */
301     public String toString(  )
302     {
303         return new ToStringBuilder( this ).append( "_strName", _strName )
304                                           .append( "_strInputFilesDirectoryPath", _strInputFilesDirectoryPath )
305                                           .append( "_strLockPublicationPath", _strLockPublicationPath )
306                                           .append( "_strLockTransfertPath", _strLockTransfertPath )
307                                           .append( "_strXsdFilesDirectoryPath", _strXsdFilesDirectoryPath )
308                                           .append( "_strMailSenderName", _strMailSenderName )
309                                           .append( "_strMailSenderEmail", _strMailSenderEmail )
310                                           .append( "_strMailRecipientList", _strMailRecipientList )
311                                           .append( "_strMailValidationOkSubject", _strMailValidationOkSubject )
312                                           .append( "_strMailValidationKoSubject", _strMailValidationKoSubject )
313                                           .append( "_strMailPublicationOkSubject", _strMailPublicationOkSubject )
314                                           .append( "_strMailPublicationKoSubject", _strMailPublicationKoSubject )
315                                           .append( "_listExtensionFileCopy", _listExtensionFileCopy )
316                                           .append( "_listXmlPageElement", _listXmlPageElement ).toString(  );
317     }
318 }