View Javadoc
1   /*
2    * Copyright (c) 2002-2014, 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.whatsnew.business;
35  
36  import fr.paris.lutece.portal.business.XmlContent;
37  
38  import java.sql.Timestamp;
39  
40  import java.util.Locale;
41  
42  import javax.servlet.http.HttpServletRequest;
43  
44  
45  /**
46   *
47   * IWhatsNew
48   *
49   */
50  public interface IWhatsNew extends XmlContent
51  {
52      /**
53      * Returns the type of the whatsnew object
54      * @return the type of the whatsnew object
55      */
56      WhatsNewType getWhatsNewType(  );
57  
58      /**
59       * Returns the title of the whatsnew object
60       * @return the title of the whatsnew object
61       */
62      String getTitle(  );
63  
64      /**
65       * Returns the description of the whatsnew object
66       * @return the description of the whatsnew object
67       */
68      String getDescription(  );
69  
70      /**
71       * Returns the date of the last update of the whatsnew object
72       * @return the date of the last update of the whatsnew object
73       */
74      Timestamp getDateUpdate(  );
75  
76      /**
77       * Sets the type of the whatsnew object to the specified String
78       * @param whatsNewType the new type of the whatsnew object
79       */
80      void setWhatsNewType( WhatsNewType whatsNewType );
81  
82      /**
83       * Set the whatsnew type
84       * @param locale {@link Locale}
85       */
86      void setWhatsNewType( Locale locale );
87  
88      /**
89       * Sets the title of the whatsnew object to the specified String
90       * @param strTitle the new title of the whatsnew object
91       */
92      void setTitle( String strTitle );
93  
94      /**
95       * Sets the description of the whatsnew object to the specified String
96       * @param strDescription the new description of the whatsnew object
97       */
98      void setDescription( String strDescription );
99  
100     /**
101      * Sets the date of the last update of the whatsnew object
102      * @param date the date update of the whatsnew object
103      */
104     void setDateUpdate( Timestamp date );
105 
106     /**
107      * Get the document ID
108      * @return Returns the _nDocumentId.
109      */
110     int getDocumentId(  );
111 
112     /**
113      * Set the document ID
114      * @param nDocumentId The _nDocumentId to set.
115      */
116     void setDocumentId( int nDocumentId );
117 
118     /**
119      * Get the page ID
120      * @return Returns the _nPageId.
121      */
122     int getPageId(  );
123 
124     /**
125      * Set the page ID
126      * @param nPageId The _nPageId to set.
127      */
128     void setPageId( int nPageId );
129 
130     /**
131      * Get the portlet ID
132      * @return Returns the _nPortletId.
133      */
134     int getPortletId(  );
135 
136     /**
137      * Set the portlet ID
138      * @param nPortletId The _nPortletId to set.
139      */
140     void setPortletId( int nPortletId );
141 
142     /**
143      * Get the type of the whatsnew
144      * @return the type of the whatsnew
145      */
146     String getType(  );
147 
148     /**
149      * Set the type of the whatsnew
150      * @param strType the type
151      */
152     void setType( String strType );
153 
154     /**
155      * Get the HTML code of the moderated elements
156      * @return HTML code
157      */
158     String getTemplateModeratedElement(  );
159 
160     /**
161      * Build the url of the whatsnew
162      * @return the url
163      */
164     String buildUrl(  );
165 
166     /**
167      * Adds the XML header to the XML content of this whatsnew object and returns it
168      * @param request The HTTP Servlet request
169      * @return the Xml document with header
170      */
171     String getXmlDocument( HttpServletRequest request );
172 
173     /**
174      * Builds the XML content of this whatsnew object and returns it
175      * @param request The HTTP Servlet request
176      * @return the Xml content of this whatsnew object
177      */
178     String getXml( HttpServletRequest request );
179 }