Class WhatsNewService
java.lang.Object
fr.paris.lutece.plugins.whatsnew.service.WhatsNewService
WhatsNewService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.paris.lutece.util.ReferenceListInitialize the number of days' combogetDocumentsByCriterias(Timestamp limitTimestamp, Locale locale) Get the documents by criteriastatic WhatsNewServiceReturn the WhatsNewService singletongetModeratedDocuments(int nWhatsNewPortletId, Locale locale) Get the moderated document from the given whatsNewPortletIdgetModeratedElementsListHtml(WhatsNewPortlet whatsNewPortlet, Locale locale) Get the HTML code of the moderated elements listgetModeratedPages(int nWhatsNewPortletId, Locale locale) Get the moderated pages from the given whatsNewPortletIdgetModeratedPortlets(int nWhatsNewPortletId, Locale locale) Get the moderated portlets from the given whatsNewPortletIdgetPagesByCriterias(Timestamp limitTimestamp, Locale locale) Get the pages by criteriagetPortletsByCriterias(Timestamp limitTimestamp, Locale locale) Get the portlets by criteriagetTimestampFromPeriodAndCurrentDate(int nDays, Locale locale) Get the timestamp correspnding to a given day in the past.getWhatsNewType(Locale locale) Get the list of WhatsNewTypevoidinit()InitbooleanisDocumentOutOfDate(PortletDocumentLink pdLink, Timestamp limitTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin) Check if the given document is out of datebooleanisPageOutOfDate(int nPageId, Timestamp limitTimestamp) Check if the given page is out of datebooleanCheck if the plugin-document is activated and its pool is not nullbooleanisPortletOutOfDate(int nPortletId, Timestamp limitTimestamp) Check if the given portlet is out of date
-
Constructor Details
-
WhatsNewService
public WhatsNewService()
-
-
Method Details
-
getInstance
Return the WhatsNewService singleton- Returns:
- the WhatsNewService singleton
-
init
public void init()Init -
isPluginDocumentActivated
public boolean isPluginDocumentActivated()Check if the plugin-document is activated and its pool is not null- Returns:
- true if the plugin-document is activated, false otherwise
-
isPageOutOfDate
Check if the given page is out of date- Parameters:
nPageId- the page IDlimitTimestamp- the date limit- Returns:
- true if it is out of date, false otherwise
-
isPortletOutOfDate
Check if the given portlet is out of date- Parameters:
nPortletId- the portlet IDlimitTimestamp- the date limit- Returns:
- true if it is out of date, false otherwise
-
isDocumentOutOfDate
public boolean isDocumentOutOfDate(PortletDocumentLink pdLink, Timestamp limitTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin) Check if the given document is out of date- Parameters:
pdLink-PortletDocumentLinklimitTimestamp- the date limitplugin-Plugin- Returns:
- true if it is out of date, false otherwise
-
getComboDays
public fr.paris.lutece.util.ReferenceList getComboDays()Initialize the number of days' combo- Returns:
- the html code of the combo
-
getWhatsNewType
Get the list of WhatsNewType- Parameters:
locale-Locale- Returns:
- a list of
WhatsNewType
-
getTimestampFromPeriodAndCurrentDate
Get the timestamp correspnding to a given day in the past. It is calculated from a period to remove from the current date.- Parameters:
nDays- the number of days between the current day and the timestamp to calculate.locale-Locale- Returns:
- the timestamp corresponding to the limit in the past for the period given in days, with hours, minutesn sec. and millisec. set to 0.
-
getPagesByCriterias
Get the pages by criteria -
getPortletsByCriterias
Get the portlets by criteria -
getDocumentsByCriterias
Get the documents by criteria -
getModeratedPortlets
Get the moderated portlets from the given whatsNewPortletId -
getModeratedPages
Get the moderated pages from the given whatsNewPortletId -
getModeratedDocuments
Get the moderated document from the given whatsNewPortletId -
getModeratedElementsListHtml
Get the HTML code of the moderated elements list- Parameters:
whatsNewPortlet- the portletlocale-Locale- Returns:
- a HTML code
-