Skip to content

Commit 751c348

Browse files
authored
GENERICATT-131: Add an entry type published (#42)
GENERICATT-131: Add an entry type published
1 parent 59ad963 commit 751c348

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/java/fr/paris/lutece/plugins/genericattributes/business/Entry.java

+9
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,15 @@ public boolean isExportablePdf( )
566566
Field fieldExportablePdf = getFieldByCode( IEntryTypeService.FIELD_EXPORTABLE_PDF );
567567
return fieldExportablePdf != null && Boolean.valueOf( fieldExportablePdf.getValue( ) );
568568
}
569+
570+
/**
571+
* @return true if the field published is present and set to true
572+
*/
573+
public boolean isPublished( )
574+
{
575+
Field fieldPublished = getFieldByCode( IEntryTypeService.FIELD_PUBLISHED );
576+
return fieldPublished != null && Boolean.valueOf( fieldPublished.getValue( ) );
577+
}
569578

570579
/**
571580
* Get the selected map provider

src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/IEntryTypeService.java

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public interface IEntryTypeService
8484
String PARAMETER_USED_COMPLETE_RESPONSE = "used_in_complete_form_response";
8585
String PARAMETER_EXPORTABLE = "exportable";
8686
String PARAMETER_EXPORTABLE_PDF = "exportable_pdf";
87+
String PARAMETER_PUBLISHED = "published";
8788
String PARAMETER_DISPLAY_BO = "display_in_bo";
8889
String PARAMETER_FILE = "file";
8990
String PARAMETER_MIN = "min";
@@ -129,6 +130,7 @@ public interface IEntryTypeService
129130
String FIELD_TEXT_CONF = "text_config";
130131
String FIELD_EXPORTABLE = "exportable";
131132
String FIELD_EXPORTABLE_PDF = "exportable_pdf";
133+
String FIELD_PUBLISHED = "published";
132134
String FIELD_RICHTEXT = "richtext";
133135
String FIELD_DISPLAY_BO = PARAMETER_DISPLAY_BO;
134136
String FIELD_DOWNLOADABLE_FILE = "downloadable_file";

0 commit comments

Comments
 (0)