public class WhatsNewService extends Object
| Constructor and Description |
|---|
WhatsNewService() |
| Modifier and Type | Method and Description |
|---|---|
fr.paris.lutece.util.ReferenceList |
getComboDays()
Initialize the number of days' combo
|
Collection<IWhatsNew> |
getDocumentsByCriterias(Timestamp limitTimestamp,
Locale locale)
Get the documents by criteria
|
static WhatsNewService |
getInstance()
Return the WhatsNewService singleton
|
Collection<IWhatsNew> |
getModeratedDocuments(int nWhatsNewPortletId,
Locale locale)
Get the moderated document from the given whatsNewPortletId
|
String |
getModeratedElementsListHtml(WhatsNewPortlet whatsNewPortlet,
Locale locale)
Get the HTML code of the moderated elements list
|
Collection<IWhatsNew> |
getModeratedPages(int nWhatsNewPortletId,
Locale locale)
Get the moderated pages from the given whatsNewPortletId
|
Collection<IWhatsNew> |
getModeratedPortlets(int nWhatsNewPortletId,
Locale locale)
Get the moderated portlets from the given whatsNewPortletId
|
Collection<IWhatsNew> |
getPagesByCriterias(Timestamp limitTimestamp,
Locale locale)
Get the pages by criteria
|
Collection<IWhatsNew> |
getPortletsByCriterias(Timestamp limitTimestamp,
Locale locale)
Get the portlets by criteria
|
Timestamp |
getTimestampFromPeriodAndCurrentDate(int nDays,
Locale locale)
Get the timestamp correspnding to a given day in the past.
|
List<WhatsNewType> |
getWhatsNewType(Locale locale)
Get the list of WhatsNewType
|
void |
init()
Init
|
boolean |
isDocumentOutOfDate(PortletDocumentLink pdLink,
Timestamp limitTimestamp,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the given document is out of date
|
boolean |
isPageOutOfDate(int nPageId,
Timestamp limitTimestamp)
Check if the given page is out of date
|
boolean |
isPluginDocumentActivated()
Check if the plugin-document is activated and its pool is not null
|
boolean |
isPortletOutOfDate(int nPortletId,
Timestamp limitTimestamp)
Check if the given portlet is out of date
|
public static WhatsNewService getInstance()
public void init()
public boolean isPluginDocumentActivated()
public boolean isPageOutOfDate(int nPageId,
Timestamp limitTimestamp)
nPageId - the page IDlimitTimestamp - the date limitpublic boolean isPortletOutOfDate(int nPortletId,
Timestamp limitTimestamp)
nPortletId - the portlet IDlimitTimestamp - the date limitpublic boolean isDocumentOutOfDate(PortletDocumentLink pdLink, Timestamp limitTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
pdLink - PortletDocumentLinklimitTimestamp - the date limitplugin - Pluginpublic fr.paris.lutece.util.ReferenceList getComboDays()
public List<WhatsNewType> getWhatsNewType(Locale locale)
locale - LocaleWhatsNewTypepublic Timestamp getTimestampFromPeriodAndCurrentDate(int nDays, Locale locale)
nDays - the number of days between the current day and the timestamp to calculate.locale - Localepublic Collection<IWhatsNew> getPagesByCriterias(Timestamp limitTimestamp, Locale locale)
public Collection<IWhatsNew> getPortletsByCriterias(Timestamp limitTimestamp, Locale locale)
public Collection<IWhatsNew> getDocumentsByCriterias(Timestamp limitTimestamp, Locale locale)
public Collection<IWhatsNew> getModeratedPortlets(int nWhatsNewPortletId, Locale locale)
public Collection<IWhatsNew> getModeratedPages(int nWhatsNewPortletId, Locale locale)
public Collection<IWhatsNew> getModeratedDocuments(int nWhatsNewPortletId, Locale locale)
public String getModeratedElementsListHtml(WhatsNewPortlet whatsNewPortlet, Locale locale)
whatsNewPortlet - the portletlocale - LocaleCopyright © 2015 City of Paris. All rights reserved.