1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.digglike.business;
35
36 import fr.paris.lutece.plugins.digglike.business.attribute.DiggAttribute;
37 import fr.paris.lutece.plugins.digglike.utils.DiggUtils;
38 import fr.paris.lutece.portal.service.editor.EditorBbcodeService;
39 import fr.paris.lutece.portal.service.image.ImageResource;
40 import fr.paris.lutece.portal.service.rbac.RBACResource;
41 import fr.paris.lutece.portal.service.regularexpression.RegularExpressionRemovalListenerService;
42 import fr.paris.lutece.portal.service.resource.IExtendableResource;
43 import fr.paris.lutece.portal.service.role.RoleRemovalListenerService;
44 import fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource;
45 import fr.paris.lutece.portal.service.workgroup.WorkgroupRemovalListenerService;
46 import fr.paris.lutece.util.xml.XmlUtil;
47
48 import java.sql.Timestamp;
49 import java.util.List;
50 import java.util.Locale;
51
52 import javax.servlet.http.HttpServletRequest;
53
54
55
56
57
58
59
60 public class Digg implements IExtendableResource, AdminWorkgroupResource, RBACResource
61 {
62 public static final String RESOURCE_TYPE = "DIGGLIKE_DIGG_TYPE";
63 public static final String ROLE_NONE = "none";
64 public static final String TAG_LIST_ENTRY = "digg-entries";
65 public static final int STATE_ENABLE = 1;
66 public static final int STATE_DISABLE = 0;
67
68 private static final String TAG_DIGG = "digg";
69 private static final String TAG_DIGG_TITLE = "digg-title";
70 private static final String TAG_DIGG_SUBMITS = "digg-submits";
71
72 private static DiggWorkgroupRemovalListener _listenerWorkgroup;
73 private static DiggRegularExpressionRemovalListener _listenerRegularExpression;
74 private static DiggRoleRemovalListener _listenerRole;
75 private int _nIdDigg;
76 private String _strTitle;
77 private String _strUnavailabilityMessage;
78 private String _strWorkgroup;
79 private int _nIdMailingListDiggSubmit;
80 private int _nNumberVoteRequired = -1;
81 private int _nNumberDayRequired = -1;
82 private int _nNumberDiggSubmitInTopScore = -1;
83 private int _nNumberDiggSubmitInTopComment = -1;
84 private int _nNumberDiggSubmitCaractersShown = -1;
85 private int _nNumberDiggSubmitPerPage = -1;
86 private boolean _bActiveCaptcha;
87 private boolean _bActiveDiggSubmitAuthentification;
88 private boolean _bActiveVoteAuthentification;
89 private boolean _bActiveCommentAuthentification;
90 private boolean _bActiveDiggPropositionState;
91 private boolean _bActiveDiggSubmitPaginator;
92 private boolean _bAuthorizedComment;
93 private boolean _bDisableNewDiggSubmit;
94 private boolean _bEnableMailNewDiggSubmit;
95 private boolean _bDisableNewComment;
96 private boolean _nLimitNumberVote;
97 private boolean _bShowCategoryBlock;
98 private boolean _bShowTopScoreBlock;
99 private boolean _bShowTopCommentBlock;
100 private String _strLibelleValidateButton;
101 private String _strLibelleContribution;
102 private Timestamp _tDateCreation;
103 private boolean _bActive;
104 private List<DiggAction> _listActions;
105 private VoteType _voteType;
106 private List<IEntry> _listEntries;
107 private List<Category> _listCategories;
108 private List<DiggSubmit> _listDiggsSubmit;
109 private List<DiggSubmitType> _listDiggSubmitTypes;
110 private String _strRole;
111 private String _strHeader;
112 private int _nSortField;
113 private String _strCodeTheme;
114 private String _strConfirmationMessage;
115 private boolean _bActiveEditorBbcode;
116 private int _nIdDefaultSort = DiggUtils.CONSTANT_ID_NULL;
117 private boolean _bDefaultDigg;
118 @DiggAttribute( "disableVote" )
119 private boolean _bDisableVote;
120 @DiggAttribute( "displayCommentInDiggSubmitList" )
121 private boolean _bDisplayCommentInDiggSubmitList;
122 @DiggAttribute( "numberCommentDisplayInDiggSubmitList" )
123 private Integer _nNumberCommentDisplayInDiggSubmitList;
124 @DiggAttribute( "numberCharCommentDisplayInDiggSubmitList" )
125 private Integer _nNumberCharCommentDisplayInDiggSubmitList;
126 @DiggAttribute( "enableMailNewCommentSubmit" )
127 private boolean _bEnableMailNewCommentSubmit;
128 @DiggAttribute( "enableMailNewReportedSubmit" )
129 private boolean _bEnableMailNewReportedSubmit;
130 @DiggAttribute( "enableTermsOfUse" )
131 private boolean _bEnableTermsOfUse;
132 @DiggAttribute( "termsOfUse" )
133 private String _strTermsOfUse;
134 @DiggAttribute( "enableReports" )
135 private boolean _bEnableReports;
136 @DiggAttribute( "idImageResource" )
137 private Integer _nIdImageResource = DiggUtils.CONSTANT_ID_NULL;
138 private ImageResource _image;
139 @DiggAttribute( "description" )
140 private String _strDescription;
141 @DiggAttribute( "notificationNewCommentSenderName" )
142 private String _strNotificationNewCommentSenderName;
143 @DiggAttribute( "notificationNewCommentTitle" )
144 private String _strNotificationNewCommentTitle;
145 @DiggAttribute( "notificationNewCommentBody" )
146 private String _strNotificationNewCommentBody;
147 @DiggAttribute( "notificationNewDiggSubmitSenderName" )
148 private String _strNotificationNewDiggSubmitSenderName;
149 @DiggAttribute( "notificationNewDiggSubmitTitle" )
150 private String _strNotificationNewDiggSubmitTitle;
151 @DiggAttribute( "notificationNewDiggSubmitBody" )
152 private String _strNotificationNewDiggSubmitBody;
153
154
155
156
157
158 public static void init( )
159 {
160
161 if ( _listenerWorkgroup == null )
162 {
163 _listenerWorkgroup = new DiggWorkgroupRemovalListener( );
164 WorkgroupRemovalListenerService.getService( ).registerListener( _listenerWorkgroup );
165 }
166
167 if ( _listenerRegularExpression == null )
168 {
169 _listenerRegularExpression = new DiggRegularExpressionRemovalListener( );
170 RegularExpressionRemovalListenerService.getService( ).registerListener( _listenerRegularExpression );
171 }
172
173 if ( _listenerRole == null )
174 {
175 _listenerRole = new DiggRoleRemovalListener( );
176 RoleRemovalListenerService.getService( ).registerListener( _listenerRole );
177 }
178 }
179
180
181
182
183
184 public int getIdMailingListDiggSubmit( )
185 {
186 return _nIdMailingListDiggSubmit;
187 }
188
189
190
191
192
193 public void setIdMailingListDiggSubmit( int mailingListId )
194 {
195 _nIdMailingListDiggSubmit = mailingListId;
196 }
197
198
199
200
201
202 public boolean isActiveCaptcha( )
203 {
204 return _bActiveCaptcha;
205 }
206
207
208
209
210
211 public void setActiveCaptcha( boolean activeCaptcha )
212 {
213 _bActiveCaptcha = activeCaptcha;
214 }
215
216
217
218
219
220 public String getLibelleValidateButton( )
221 {
222 return _strLibelleValidateButton;
223 }
224
225
226
227
228
229 public void setLibelleValidateButton( String libelleValidateButton )
230 {
231 _strLibelleValidateButton = libelleValidateButton;
232 }
233
234
235
236
237
238 public String getLibelleContribution( )
239 {
240 return _strLibelleContribution;
241 }
242
243
244
245
246
247 public void setLibelleContribution( String libelleDiggName )
248 {
249 _strLibelleContribution = libelleDiggName;
250 }
251
252
253
254
255
256 public String getTitle( )
257 {
258 return _strTitle;
259 }
260
261
262
263
264
265 public void setTitle( String strTitle )
266 {
267 this._strTitle = strTitle;
268 }
269
270
271
272
273
274 public String getUnavailabilityMessage( )
275 {
276 return _strUnavailabilityMessage;
277 }
278
279
280
281
282
283 public void setUnavailabilityMessage( String unavailabilityMessage )
284 {
285 _strUnavailabilityMessage = unavailabilityMessage;
286 }
287
288
289
290
291
292 public String getWorkgroup( )
293 {
294 return _strWorkgroup;
295 }
296
297
298
299
300
301 public void setWorkgroup( String workGroup )
302 {
303 _strWorkgroup = workGroup;
304 }
305
306
307
308
309
310 public int getIdDigg( )
311 {
312 return _nIdDigg;
313 }
314
315
316
317
318
319 public void setIdDigg( int idDigg )
320 {
321 _nIdDigg = idDigg;
322 }
323
324
325
326
327
328 public boolean isActive( )
329 {
330 return _bActive;
331 }
332
333
334
335
336
337 public void setActive( boolean active )
338 {
339 _bActive = active;
340 }
341
342
343
344
345
346 public Timestamp getDateCreation( )
347 {
348 return _tDateCreation;
349 }
350
351
352
353
354
355 public void setDateCreation( Timestamp dateCreation )
356 {
357 _tDateCreation = dateCreation;
358 }
359
360
361
362
363
364 public String getResourceTypeCode( )
365 {
366 return RESOURCE_TYPE;
367 }
368
369
370
371
372
373 public String getResourceId( )
374 {
375 return "" + _nIdDigg;
376 }
377
378
379
380
381
382 public List<DiggAction> getActions( )
383 {
384 return _listActions;
385 }
386
387
388
389
390
391 public void setActions( List<DiggAction> diggActions )
392 {
393 _listActions = diggActions;
394 }
395
396
397
398
399
400 public int getNumberVoteRequired( )
401 {
402 return _nNumberVoteRequired;
403 }
404
405
406
407
408
409 public void setNumberVoteRequired( int numberVoteRequired )
410 {
411 _nNumberVoteRequired = numberVoteRequired;
412 }
413
414
415
416
417
418 public int getNumberDayRequired( )
419 {
420 return _nNumberDayRequired;
421 }
422
423
424
425
426
427 public void setNumberDayRequired( int numberDayRequired )
428 {
429 _nNumberDayRequired = numberDayRequired;
430 }
431
432
433
434
435
436 public boolean isActiveDiggSubmitAuthentification( )
437 {
438 return _bActiveDiggSubmitAuthentification;
439 }
440
441
442
443
444
445 public void setActiveDiggSubmitAuthentification( boolean activeDiggSubmitAuthentification )
446 {
447 _bActiveDiggSubmitAuthentification = activeDiggSubmitAuthentification;
448 }
449
450
451
452
453
454 public boolean isActiveVoteAuthentification( )
455 {
456 return _bActiveVoteAuthentification;
457 }
458
459
460
461
462
463 public void setActiveVoteAuthentification( boolean activeVoteAuthentification )
464 {
465 _bActiveVoteAuthentification = activeVoteAuthentification;
466 }
467
468
469
470
471
472 public boolean isActiveCommentAuthentification( )
473 {
474 return _bActiveCommentAuthentification;
475 }
476
477
478
479
480
481 public void setActiveCommentAuthentification( boolean activeCommentAuthentification )
482 {
483 _bActiveCommentAuthentification = activeCommentAuthentification;
484 }
485
486
487
488
489
490 public boolean isDisableNewDiggSubmit( )
491 {
492 return _bDisableNewDiggSubmit;
493 }
494
495
496
497
498
499 public void setDisableNewDiggSubmit( boolean disableNewDiggSubmit )
500 {
501 _bDisableNewDiggSubmit = disableNewDiggSubmit;
502 }
503
504
505
506
507
508 public boolean isEnableMailNewDiggSubmit( )
509 {
510 return _bEnableMailNewDiggSubmit;
511 }
512
513
514
515
516
517 public void setEnableMailNewDiggSubmit( boolean enableMailNewDiggSubmit )
518 {
519 _bEnableMailNewDiggSubmit = enableMailNewDiggSubmit;
520 }
521
522
523
524
525
526 public boolean isDisableNewComment( )
527 {
528 return _bDisableNewComment;
529 }
530
531
532
533
534
535 public void setDisableNewComment( boolean disableNewComment )
536 {
537 _bDisableNewComment = disableNewComment;
538 }
539
540
541
542
543
544 public List<IEntry> getEntries( )
545 {
546 return _listEntries;
547 }
548
549
550
551
552
553 public void setEntries( List<IEntry> listEntries )
554 {
555 _listEntries = listEntries;
556 }
557
558
559
560
561
562 public List<Category> getCategories( )
563 {
564 return _listCategories;
565 }
566
567
568
569
570
571 public void setCategories( List<Category> listCategories )
572 {
573 _listCategories = listCategories;
574 }
575
576
577
578
579
580 public VoteType getVoteType( )
581 {
582 return _voteType;
583 }
584
585
586
587
588
589 public void setVoteType( VoteType type )
590 {
591 _voteType = type;
592 }
593
594
595
596
597
598 public boolean isAuthorizedComment( )
599 {
600 return _bAuthorizedComment;
601 }
602
603
604
605
606
607 public void setAuthorizedComment( boolean authorizedComment )
608 {
609 _bAuthorizedComment = authorizedComment;
610 }
611
612
613
614
615
616 public boolean isActiveDiggPropositionState( )
617 {
618 return _bActiveDiggPropositionState;
619 }
620
621
622
623
624
625 public void setActiveDiggPropositionState( boolean activeDiggPropositionState )
626 {
627 _bActiveDiggPropositionState = activeDiggPropositionState;
628 }
629
630
631
632
633
634 public int getNumberDiggSubmitInTopComment( )
635 {
636 return _nNumberDiggSubmitInTopComment;
637 }
638
639
640
641
642
643 public void setNumberDiggSubmitInTopComment( int numberTopComment )
644 {
645 _nNumberDiggSubmitInTopComment = numberTopComment;
646 }
647
648
649
650
651
652 public int getNumberDiggSubmitInTopScore( )
653 {
654 return _nNumberDiggSubmitInTopScore;
655 }
656
657
658
659
660
661 public void setNumberDiggSubmitInTopScore( int numberTopScore )
662 {
663 _nNumberDiggSubmitInTopScore = numberTopScore;
664 }
665
666
667
668
669
670 public boolean isLimitNumberVote( )
671 {
672 return _nLimitNumberVote;
673 }
674
675
676
677
678
679 public void setLimitNumberVote( boolean numberVote )
680 {
681 _nLimitNumberVote = numberVote;
682 }
683
684
685
686
687
688 public int getNumberDiggSubmitCaractersShown( )
689 {
690 return _nNumberDiggSubmitCaractersShown;
691 }
692
693
694
695
696
697 public void setNumberDiggSubmitCaractersShown( int numberCaractersShown )
698 {
699 _nNumberDiggSubmitCaractersShown = numberCaractersShown;
700 }
701
702
703
704
705
706 public boolean isShowCategoryBlock( )
707 {
708 return _bShowCategoryBlock;
709 }
710
711
712
713
714
715 public void setShowCategoryBlock( boolean activeCategoryBloc )
716 {
717 _bShowCategoryBlock = activeCategoryBloc;
718 }
719
720
721
722
723
724 public boolean isShowTopScoreBlock( )
725 {
726 return _bShowTopScoreBlock;
727 }
728
729
730
731
732
733 public void setShowTopScoreBlock( boolean activeTopScoreBloc )
734 {
735 _bShowTopScoreBlock = activeTopScoreBloc;
736 }
737
738
739
740
741
742 public boolean isShowTopCommentBlock( )
743 {
744 return _bShowTopCommentBlock;
745 }
746
747
748
749
750
751 public void setShowTopCommentBlock( boolean activeTopCommentBloc )
752 {
753 _bShowTopCommentBlock = activeTopCommentBloc;
754 }
755
756
757
758
759
760 public List<DiggSubmit> getDiggsSubmit( )
761 {
762 return _listDiggsSubmit;
763 }
764
765
766
767
768
769 public void setDiggsSubmit( List<DiggSubmit> diggsSubmit )
770 {
771 _listDiggsSubmit = diggsSubmit;
772 }
773
774
775
776
777
778
779
780
781
782 public String getXml( HttpServletRequest request, StringBuffer sbListDiggSubmit, Locale locale )
783 {
784 StringBuffer strXml = new StringBuffer( );
785 XmlUtil.beginElement( strXml, TAG_DIGG );
786 XmlUtil.addElementHtml( strXml, TAG_DIGG_TITLE, getTitle( ) );
787 XmlUtil.beginElement( strXml, TAG_LIST_ENTRY );
788
789 if ( ( this.getEntries( ) != null ) && !this.getEntries( ).isEmpty( ) )
790 {
791 for ( IEntry entry : this.getEntries( ) )
792 {
793 entry.getXml( locale, strXml );
794 }
795 }
796
797 XmlUtil.endElement( strXml, TAG_LIST_ENTRY );
798 XmlUtil.beginElement( strXml, TAG_DIGG_SUBMITS );
799 strXml.append( sbListDiggSubmit );
800 XmlUtil.endElement( strXml, TAG_DIGG_SUBMITS );
801 XmlUtil.endElement( strXml, TAG_DIGG );
802
803 return strXml.toString( );
804 }
805
806
807
808
809
810 public int getNumberDiggSubmitPerPage( )
811 {
812 return _nNumberDiggSubmitPerPage;
813 }
814
815
816
817
818
819 public void setNumberDiggSubmitPerPage( int numberDiggSubmitPerPage )
820 {
821 _nNumberDiggSubmitPerPage = numberDiggSubmitPerPage;
822 }
823
824
825
826
827
828 public boolean isActiveDiggSubmitPaginator( )
829 {
830 return _bActiveDiggSubmitPaginator;
831 }
832
833
834
835
836
837 public void setActiveDiggSubmitPaginator( boolean activeDiggSubmitPaginator )
838 {
839 _bActiveDiggSubmitPaginator = activeDiggSubmitPaginator;
840 }
841
842
843
844
845
846
847 public String getRole( )
848 {
849 return _strRole;
850 }
851
852
853
854
855
856
857 public void setRole( String strRole )
858 {
859 _strRole = strRole;
860 }
861
862
863
864
865 public void setHeader( String strHeader )
866 {
867 this._strHeader = strHeader;
868 }
869
870
871
872
873 public String getHeader( )
874 {
875 return _strHeader;
876 }
877
878
879
880
881 public void setSortField( int nSortField )
882 {
883 this._nSortField = nSortField;
884 }
885
886
887
888
889 public int getSortField( )
890 {
891 return _nSortField;
892 }
893
894
895
896
897
898 public String getCodeTheme( )
899 {
900 return _strCodeTheme;
901 }
902
903
904
905
906
907 public void setCodeTheme( String strCodeTheme )
908 {
909 _strCodeTheme = strCodeTheme;
910 }
911
912
913
914
915 public String getConfirmationMessage( )
916 {
917 return _strConfirmationMessage;
918 }
919
920
921
922
923 public void setConfirmationMessage( String strConfirmationMessage )
924 {
925 _strConfirmationMessage = strConfirmationMessage;
926 }
927
928
929
930
931
932 public void setActiveEditorBbcode( boolean nActiveEditorBbCode )
933 {
934 this._bActiveEditorBbcode = nActiveEditorBbCode;
935 }
936
937
938
939
940
941 public boolean isActiveEditorBbcode( )
942 {
943 return _bActiveEditorBbcode;
944 }
945
946
947
948
949
950
951 public String parseBbcodeValue( String strValue )
952 {
953 if ( isActiveEditorBbcode( ) )
954 {
955 return EditorBbcodeService.getInstance( ).parse( strValue );
956 }
957
958 return strValue;
959 }
960
961
962
963
964
965 public int getIdDefaultSort( )
966 {
967 return _nIdDefaultSort;
968 }
969
970
971
972
973
974 public void setIdDefaultSort( int nIdDefaultSort )
975 {
976 _nIdDefaultSort = nIdDefaultSort;
977 }
978
979
980
981
982
983 public boolean isDefaultDigg( )
984 {
985 return _bDefaultDigg;
986 }
987
988
989
990
991
992 public void setDefaultDigg( boolean bDefaultDigg )
993 {
994 _bDefaultDigg = bDefaultDigg;
995 }
996
997
998
999
1000
1001 public boolean isDisableVote( )
1002 {
1003 return _bDisableVote;
1004 }
1005
1006
1007
1008
1009
1010 public void setDisableVote( boolean bDisable )
1011 {
1012 _bDisableVote = bDisable;
1013 }
1014
1015
1016
1017
1018
1019 public boolean isDisplayCommentInDiggSubmitList( )
1020 {
1021 return _bDisplayCommentInDiggSubmitList;
1022 }
1023
1024
1025
1026
1027
1028 public void setDisplayCommentInDiggSubmitList( boolean bDisplayCommentInDiggSubmitList )
1029 {
1030 this._bDisplayCommentInDiggSubmitList = bDisplayCommentInDiggSubmitList;
1031 }
1032
1033
1034
1035
1036
1037 public Integer getNumberCommentDisplayInDiggSubmitList( )
1038 {
1039 return _nNumberCommentDisplayInDiggSubmitList;
1040 }
1041
1042
1043
1044
1045
1046 public void setNumberCommentDisplayInDiggSubmitList( Integer nNumberCommentDisplayInDiggSubmitList )
1047 {
1048 this._nNumberCommentDisplayInDiggSubmitList = nNumberCommentDisplayInDiggSubmitList;
1049 }
1050
1051
1052
1053
1054
1055 public Integer getNumberCharCommentDisplayInDiggSubmitList( )
1056 {
1057 return _nNumberCharCommentDisplayInDiggSubmitList;
1058 }
1059
1060
1061
1062
1063
1064 public void setNumberCharCommentDisplayInDiggSubmitList( Integer nNumberCommentDisplayInDiggSubmitList )
1065 {
1066 this._nNumberCharCommentDisplayInDiggSubmitList = nNumberCommentDisplayInDiggSubmitList;
1067 }
1068
1069
1070
1071
1072
1073 public boolean isEnableMailNewCommentSubmit( )
1074 {
1075 return _bEnableMailNewCommentSubmit;
1076 }
1077
1078
1079
1080
1081
1082 public void setEnableMailNewCommentSubmit( boolean bEnableMailNewCommentSubmit )
1083 {
1084 _bEnableMailNewCommentSubmit = bEnableMailNewCommentSubmit;
1085 }
1086
1087
1088
1089
1090
1091 public boolean isEnableMailNewReportedSubmit( )
1092 {
1093 return _bEnableMailNewReportedSubmit;
1094 }
1095
1096
1097
1098
1099
1100 public void setEnableMailNewReportedSubmit( boolean bEnableMailNewReportedSubmit )
1101 {
1102 _bEnableMailNewReportedSubmit = bEnableMailNewReportedSubmit;
1103 }
1104
1105
1106
1107
1108
1109 public List<DiggSubmitType> getDiggSubmitTypes( )
1110 {
1111 return _listDiggSubmitTypes;
1112 }
1113
1114
1115
1116
1117
1118 public void setDiggSubmiTypes( List<DiggSubmitType> diggSubmitTypes )
1119 {
1120 _listDiggSubmitTypes = diggSubmitTypes;
1121 }
1122
1123
1124
1125
1126
1127 public boolean isEnableTermsOfUse( )
1128 {
1129 return _bEnableTermsOfUse;
1130 }
1131
1132
1133
1134
1135
1136 public void setEnableTermsOfUse( boolean bEnableTermsOfUse )
1137 {
1138 _bEnableTermsOfUse = bEnableTermsOfUse;
1139 }
1140
1141
1142
1143
1144
1145 public String getTermsOfUse( )
1146 {
1147 return _strTermsOfUse;
1148 }
1149
1150
1151
1152
1153
1154 public void setTermsOfUse( String strTermsOfUse )
1155 {
1156 this._strTermsOfUse = strTermsOfUse;
1157 }
1158
1159
1160
1161
1162
1163 public String getDescription( )
1164 {
1165 return _strDescription;
1166 }
1167
1168
1169
1170
1171
1172 public void setDescription( String strDescription )
1173 {
1174 this._strDescription = strDescription;
1175 }
1176
1177
1178
1179
1180
1181 public boolean isEnableReports( )
1182 {
1183 return _bEnableReports;
1184 }
1185
1186
1187
1188
1189
1190 public void setEnableReports( boolean bEnableReports )
1191 {
1192 this._bEnableReports = bEnableReports;
1193 }
1194
1195
1196
1197
1198
1199 public Integer getIdImageResource( )
1200 {
1201 return _nIdImageResource;
1202 }
1203
1204
1205
1206
1207
1208 public void setIdImageResource( Integer nIdImageResource )
1209 {
1210 _nIdImageResource = nIdImageResource;
1211 }
1212
1213
1214
1215
1216
1217 public ImageResource getImage( )
1218 {
1219 return _image;
1220 }
1221
1222
1223
1224
1225
1226 public void setImage( ImageResource image )
1227 {
1228 this._image = image;
1229 }
1230
1231
1232
1233
1234 @Override
1235 public String getIdExtendableResource( )
1236 {
1237 return Integer.toString( _nIdDigg );
1238 }
1239
1240
1241
1242
1243 @Override
1244 public String getExtendableResourceType( )
1245 {
1246 return RESOURCE_TYPE;
1247 }
1248
1249
1250
1251
1252 @Override
1253 public String getExtendableResourceName( )
1254 {
1255 return _strTitle;
1256 }
1257
1258
1259
1260
1261 @Override
1262 public String getExtendableResourceDescription( )
1263 {
1264 return _strDescription;
1265 }
1266
1267
1268
1269
1270 @Override
1271 public String getExtendableResourceImageUrl( )
1272 {
1273 if ( _nIdImageResource != null )
1274 {
1275 StringBuilder sbUrl = new StringBuilder( DiggUtils.SERVLET_IMAGE_PATH );
1276 sbUrl.append( _nIdImageResource );
1277
1278 return sbUrl.toString( );
1279 }
1280
1281 return null;
1282 }
1283
1284
1285
1286
1287
1288 public String getNotificationNewCommentSenderName() {
1289 return _strNotificationNewCommentSenderName;
1290 }
1291
1292
1293
1294
1295
1296 public void setNotificationNewCommentSenderName(
1297 String _strNotificationNewCommentSenderName) {
1298 this._strNotificationNewCommentSenderName = _strNotificationNewCommentSenderName;
1299 }
1300
1301
1302
1303
1304
1305 public String getNotificationNewCommentTitle() {
1306 return _strNotificationNewCommentTitle;
1307 }
1308
1309
1310
1311
1312 public void setNotificationNewCommentTitle(
1313 String _strNotificationNewCommentTitle) {
1314 this._strNotificationNewCommentTitle = _strNotificationNewCommentTitle;
1315 }
1316
1317
1318
1319
1320 public String getNotificationNewCommentBody() {
1321 return _strNotificationNewCommentBody;
1322 }
1323
1324
1325
1326
1327 public void setNotificationNewCommentBody(
1328 String _strNotificationNewCommentBody) {
1329 this._strNotificationNewCommentBody = _strNotificationNewCommentBody;
1330 }
1331
1332
1333
1334
1335 public String getNotificationNewDiggSubmitSenderName() {
1336 return _strNotificationNewDiggSubmitSenderName;
1337 }
1338
1339
1340
1341
1342 public void setNotificationNewDiggSubmitSenderName(
1343 String _strNotificationNewDiggSubmitSenderName) {
1344 this._strNotificationNewDiggSubmitSenderName = _strNotificationNewDiggSubmitSenderName;
1345 }
1346
1347
1348
1349
1350 public String getNotificationNewDiggSubmitTitle() {
1351 return _strNotificationNewDiggSubmitTitle;
1352 }
1353
1354
1355
1356
1357 public void setNotificationNewDiggSubmitTitle(
1358 String _strNotificationNewDiggSubmitTitle) {
1359 this._strNotificationNewDiggSubmitTitle = _strNotificationNewDiggSubmitTitle;
1360 }
1361
1362
1363
1364
1365 public String getNotificationNewDiggSubmitBody() {
1366 return _strNotificationNewDiggSubmitBody;
1367 }
1368
1369
1370
1371
1372 public void setNotificationNewDiggSubmitBody(
1373 String _strNotificationDiggSubmitBody) {
1374 this._strNotificationNewDiggSubmitBody = _strNotificationDiggSubmitBody;
1375 }
1376 }