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.digglike.business;
35  
36  import fr.paris.lutece.portal.service.rbac.RBACResource;
37  
38  
39  /**
40   *
41   *class DefaultMessage
42   *
43   */
44  public class DefaultMessage implements RBACResource
45  {
46      public static final String RESOURCE_TYPE = "DIGGLIKE_DEFAULT_MESSAGE_TYPE";
47      private String _strUnavailabilityMessage;
48      private String _strLibelleValidateButton;
49      private String _strLibelleContribution;
50      private int _nNumberDiggSubmitInTopScore = -1;
51      private int _nNumberDiggSubmitInTopComment = -1;
52      private int _nNumberDiggSubmitCaractersShown = -1;
53      private String _strNotificationNewCommentTitle;
54      private String _strNotificationNewCommentBody;
55      private String _strNotificationNewDiggSubmitTitle;
56      private String _strNotificationNewDiggSubmitBody;
57  
58      /**
59       * 
60       * @return getNotificationNewCommentTitle
61       */
62      public String getNotificationNewCommentTitle() {
63  		return _strNotificationNewCommentTitle;
64  	}
65  
66      /**
67       * 
68       * @param _strNotificationNewCommentTitle NotificationNewCommentTitle
69       */
70  	public void setNotificationNewCommentTitle(
71  			String _strNotificationNewCommentTitle) {
72  		this._strNotificationNewCommentTitle = _strNotificationNewCommentTitle;
73  	}
74  	
75  	/**
76  	 * 
77  	 * @return NotificationNewCommentBody
78  	 */
79  	public String getNotificationNewCommentBody() {
80  		return _strNotificationNewCommentBody;
81  	}
82  	/**
83  	 * 
84  	 * @param _strNotificationNewCommentBody NotificationNewCommentBody
85  	 */
86  	public void setNotificationNewCommentBody(
87  			String _strNotificationNewCommentBody) {
88  		this._strNotificationNewCommentBody = _strNotificationNewCommentBody;
89  	}
90  	
91  	/**
92  	 * 
93  	 * @return NotificationNewDiggSubmitTitle
94  	 */
95  	public String getNotificationNewDiggSubmitTitle() {
96  		return _strNotificationNewDiggSubmitTitle;
97  	}
98  	/**
99  	 * 
100 	 * @param _strNotificationNewDiggSubmitTitle NotificationNewDiggSubmitTitle
101 	 */
102 	public void setNotificationNewDiggSubmitTitle(
103 			String _strNotificationNewDiggSubmitTitle) {
104 		this._strNotificationNewDiggSubmitTitle = _strNotificationNewDiggSubmitTitle;
105 	}
106 	/**
107 	 * 
108 	 * @return NotificationDiggSubmitBody
109 	 */
110 	public String getNotificationNewDiggSubmitBody() {
111 		return _strNotificationNewDiggSubmitBody;
112 	}
113 	/**
114 	 * 
115 	 * @param _strNotificationDiggSubmitBody NotificationDiggSubmitBody
116 	 */
117 	public void setNotificationNewDiggSubmitBody(
118 			String _strNotificationDiggSubmitBody) {
119 		this._strNotificationNewDiggSubmitBody = _strNotificationDiggSubmitBody;
120 	}
121 
122 	
123     /**
124      *
125      * @return the default value of validate button
126      */
127     public String getLibelleValidateButton(  )
128     {
129         return _strLibelleValidateButton;
130     }
131 
132     /**
133      * set the default value of validate button
134      * @param libelleValidateButton value of validate button
135      */
136     public void setLibelleValidateButton( String libelleValidateButton )
137     {
138         _strLibelleValidateButton = libelleValidateButton;
139     }
140 
141     /**
142      *
143      * @return the default Unavailability Message who see by the user when the form will be enable
144      */
145     public String getUnavailabilityMessage(  )
146     {
147         return _strUnavailabilityMessage;
148     }
149 
150     /**
151      * set the Unavailability Message who see by the user when the form will be enable
152      * @param unavailabilityMessage the default Unavailability Message
153      */
154     public void setUnavailabilityMessage( String unavailabilityMessage )
155     {
156         _strUnavailabilityMessage = unavailabilityMessage;
157     }
158 
159     /**
160      * RBAC resource implmentation
161      * @return The resource type code
162      */
163     public String getResourceTypeCode(  )
164     {
165         return RESOURCE_TYPE;
166     }
167 
168     /**
169      * RBAC resource implmentation
170      * @return The resourceId
171      */
172     public String getResourceId(  )
173     {
174         return "";
175     }
176 
177     /**
178     *
179     * @return the default libelle of  digg contribution
180     */
181     public String getLibelleContribution(  )
182     {
183         return _strLibelleContribution;
184     }
185 
186     /**
187      * set the default libelle of  digg contribution
188      * @param libelleDiggName  the default libelle of  digg contribution
189      */
190     public void setLibelleContribution( String libelleDiggName )
191     {
192         _strLibelleContribution = libelleDiggName;
193     }
194 
195     /**
196      * return the number of digg submit display in the list of top comment
197      * @return the number of digg submit display in the list of top comment
198      */
199     public int getNumberDiggSubmitInTopComment(  )
200     {
201         return _nNumberDiggSubmitInTopComment;
202     }
203 
204     /**
205      * Set the number of digg submit display in the list of top comment
206      * @param numberTopComment the number of  digg submit in the list of top comment
207      */
208     public void setNumberDiggSubmitInTopComment( int numberTopComment )
209     {
210         _nNumberDiggSubmitInTopComment = numberTopComment;
211     }
212 
213     /**
214     * return the number of  digg submit display in the list of top score
215     * @return the number of digg submit  display in the list of top score
216     */
217     public int getNumberDiggSubmitInTopScore(  )
218     {
219         return _nNumberDiggSubmitInTopScore;
220     }
221 
222     /**
223      * Set the number of comment display in the list of top score
224      * @param numberTopScore the number of comment display in the list of top score
225      */
226     public void setNumberDiggSubmitInTopScore( int numberTopScore )
227     {
228         _nNumberDiggSubmitInTopScore = numberTopScore;
229     }
230 
231     /**
232         * return the nunber of caracters shown in the list of digg submit
233         * @return the nunber of caracters shown in the list of digg submit
234         */
235     public int getNumberDiggSubmitCaractersShown(  )
236     {
237         return _nNumberDiggSubmitCaractersShown;
238     }
239 
240     /**
241      * set the nunber of caracters shown in the list of digg submit
242      * @param numberCaractersShown the nunber of caracters shown in the list of digg submit
243      */
244     public void setNumberDiggSubmitCaractersShown( int numberCaractersShown )
245     {
246         _nNumberDiggSubmitCaractersShown = numberCaractersShown;
247     }
248 }