fr.paris.lutece.plugins.calendar.service
Class EventListService

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.service.EventListService

public class EventListService
extends java.lang.Object

This class provides an event list service.


Constructor Summary
EventListService()
          Private constructor
 
Method Summary
 void doAddEvent(SimpleEvent event, fr.paris.lutece.portal.service.security.LuteceUser user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add an event and reset the caches
 void doModifyOccurrenceEvent(OccurrenceEvent occurrenceEvent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Modify an OccurrenceEvent and reset the caches
 void doModifySimpleEvent(SimpleEvent event, boolean bPeriociteModify, fr.paris.lutece.portal.service.security.LuteceUser user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Modify a SimpleEvent and reset the caches
 void doRemoveEvent(int nAgendaId, int nEventId, fr.paris.lutece.portal.service.security.LuteceUser user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove an event and reset the caches
 SimpleEvent getEvent(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the event from a given event ID.
 java.util.List<OccurrenceEvent> getOccurrenceEvents(int nAgendaId, int nEventId, int nIsAscSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of OccurrenceEvent.
 int getRepititionDays(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the number repitition days of an event from a given event ID
 java.util.List<SimpleEvent> getSimpleEvents(int nAgendaId, int nSortEvents)
          Get the list of SimpleEvent.
 java.util.List<SimpleEvent> getSimpleEventsByUserLogin(int nAgendaId, fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the list of SimpleEvent from the user login.
 EventList newEventList(int nViewType)
          Load an eventlist object from its keyname
 void setCalendarService(CalendarService calendarService)
           
 void setEventListCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the agenda cache key service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListService

public EventListService()
Private constructor

Method Detail

newEventList

public EventList newEventList(int nViewType)
Load an eventlist object from its keyname

Parameters:
strKeyName - The keyname of the EventList
Returns:
An EventList object

getSimpleEvents

public java.util.List<SimpleEvent> getSimpleEvents(int nAgendaId,
                                                   int nSortEvents)
Get the list of SimpleEvent. If the cache is enable, then it will retrieve from the cache.

Parameters:
nAgendaId - the agenda ID
nSortEvents - 1 if it must be sorted ascendly, 0 otherwis
Returns:
a list of SimpleEvent

getSimpleEventsByUserLogin

public java.util.List<SimpleEvent> getSimpleEventsByUserLogin(int nAgendaId,
                                                              fr.paris.lutece.portal.service.security.LuteceUser user)
Get the list of SimpleEvent from the user login. If the cache is enable, then it will retrieve from the cache.

Parameters:
nAgendaId - the agenda ID
user - the LuteceUser
Returns:
a list of SimpleEvent

getOccurrenceEvents

public java.util.List<OccurrenceEvent> getOccurrenceEvents(int nAgendaId,
                                                           int nEventId,
                                                           int nIsAscSort,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of OccurrenceEvent. If the cache is enable, then it will retrieve from the cache.

Parameters:
nAgendaId - the agenda ID
nEventId - the event ID
nIsAscSort - 1 if it must be sorted ascendly, 0 otherwis
plugin - Plugin
Returns:
a list of OccurrenceEvent

getEvent

public SimpleEvent getEvent(int nEventId,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the event from a given event ID.

Parameters:
nEventId - the event ID
plugin - Plugin
Returns:
a SimpleEvent

getRepititionDays

public int getRepititionDays(int nEventId,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the number repitition days of an event from a given event ID

Parameters:
nEventId - the event id
plugin - Plugin
Returns:
the number of repitition day

doAddEvent

public void doAddEvent(SimpleEvent event,
                       fr.paris.lutece.portal.service.security.LuteceUser user,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add an event and reset the caches

Parameters:
event - the event
user - the LuteceUser
plugin - Plugin

doModifyOccurrenceEvent

public void doModifyOccurrenceEvent(OccurrenceEvent occurrenceEvent,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify an OccurrenceEvent and reset the caches

Parameters:
occurrenceEvent - the event
plugin - Plugin

doModifySimpleEvent

public void doModifySimpleEvent(SimpleEvent event,
                                boolean bPeriociteModify,
                                fr.paris.lutece.portal.service.security.LuteceUser user,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify a SimpleEvent and reset the caches

Parameters:
event - the event
bPeriociteModify - true if the periodicity has to be updated, false otherwise
user - the LuteceUser
plugin - Plugin

doRemoveEvent

public void doRemoveEvent(int nAgendaId,
                          int nEventId,
                          fr.paris.lutece.portal.service.security.LuteceUser user,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove an event and reset the caches

Parameters:
nAgendaId - the agenda ID
nEventId - the event ID
user - the LuteceUser
plugin - Plugin

setEventListCacheKeyService

public void setEventListCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the agenda cache key service

Parameters:
cacheKeyService - the cache key service

setCalendarService

public void setCalendarService(CalendarService calendarService)


Copyright © 2011 Mairie de Paris. All Rights Reserved.