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

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

public class CalendarService
extends Object

CalendarService


Constructor Summary
CalendarService()
          Creates a new instance of CalendarService
 
Method Summary
 void doCreateAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an agenda and reset the caches.
 void doModifyAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Modify an agenda and reset the caches.
 void doRemoveAgenda(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove an agenda and reset the caches.
 List<Integer> getAgendaIds()
          Return the list of agenda IDs
 AgendaResource getAgendaResource(int nAgendaId)
          Returns the agenda
 AgendaResource getAgendaResource(String strAgendaKeyName)
          Get the agenda
 List<AgendaResource> getAgendaResources(fr.paris.lutece.portal.business.user.AdminUser user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of agenda resources.
 List<AgendaResource> getAgendaResources(javax.servlet.http.HttpServletRequest request)
          Get the list of agendas.
 int getCacheSize()
          Get the cache size
 Map<String,String> getCalendarParameters(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the calendar default parameters
 MultiAgenda getMultiAgenda(javax.servlet.http.HttpServletRequest request)
          Get the multiAgenda.
 String getName()
          Get the service name
 void removeCache()
          Reset the cache
 void removeCache(int nAgendaId)
          Reset the cache from the given agenda ID
 void removeCache(String strAgendaId)
          Reset the cache from the given agenda ID
 void resetCache()
          Reset cache
 void setCalendarCacheKeyService(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

CalendarService

public CalendarService()
Creates a new instance of CalendarService

Method Detail

getName

public String getName()
Get the service name

Returns:
the service name

setCalendarCacheKeyService

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

Parameters:
cacheKeyService - the cache key service

getAgendaResource

public AgendaResource getAgendaResource(String strAgendaKeyName)
Get the agenda

Parameters:
strAgendaKeyName - the agenda key name
Returns:
The AgendaResource object

getAgendaResource

public AgendaResource getAgendaResource(int nAgendaId)
Returns the agenda

Parameters:
nAgendaId - the ID agenda
Returns:
The AgendaResource object

getAgendaIds

public List<Integer> getAgendaIds()
Return the list of agenda IDs

Returns:
the list of agenda IDs

getMultiAgenda

public MultiAgenda getMultiAgenda(javax.servlet.http.HttpServletRequest request)
Get the multiAgenda. Only the agenda the user has access to are put in the multiagenda (same role of the agenda, or the user has the role manager)

Parameters:
request - HttpServletRequest
Returns:
the multiagenda

getAgendaResources

public List<AgendaResource> getAgendaResources(javax.servlet.http.HttpServletRequest request)
Get the list of agendas. Only the agenda the user has access to are put in the multiagenda (same role of the agenda, or the user has the role manager)

Parameters:
request - HttpServletRequest
Returns:
the list of agenda

getAgendaResources

public List<AgendaResource> getAgendaResources(fr.paris.lutece.portal.business.user.AdminUser user,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of agenda resources. Returns only the AgendaResource that the AdminUser has the right to (WorkingGroup wise).

Parameters:
user - the AdminUser
plugin - Plugin
Returns:
a list of

getCalendarParameters

public Map<String,String> getCalendarParameters(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the calendar default parameters

Parameters:
plugin - Plugin
Returns:
a map that defines the plugin-calendar parameters

doCreateAgenda

public void doCreateAgenda(AgendaResource agenda,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an agenda and reset the caches.

Parameters:
agenda - the AgendaResource
plugin - Plugin

doModifyAgenda

public void doModifyAgenda(AgendaResource agenda,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify an agenda and reset the caches.

Parameters:
agenda - AgendaResource
plugin - Plugin

doRemoveAgenda

public void doRemoveAgenda(int nAgendaId,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove an agenda and reset the caches.

Parameters:
nAgendaId - the agenda ID
plugin - Plugin

resetCache

public void resetCache()
Reset cache


removeCache

public void removeCache(String strAgendaId)
Reset the cache from the given agenda ID

Parameters:
strAgendaId - the agenda ID

removeCache

public void removeCache(int nAgendaId)
Reset the cache from the given agenda ID

Parameters:
nAgendaId - the agenda ID

removeCache

public void removeCache()
Reset the cache


getCacheSize

public int getCacheSize()
Get the cache size

Returns:
the cache size


Copyright © 2014 Mairie de Paris. All Rights Reserved.