fr.paris.lutece.plugins.calendar.business
Class MultiAgenda

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.MultiAgenda
All Implemented Interfaces:
Agenda, Serializable

public class MultiAgenda
extends Object
implements Agenda

This Class provides an agenda that aggregate other agendas.

See Also:
Serialized Form

Constructor Summary
MultiAgenda()
          Default constructor
 
Method Summary
 void addAgenda(Agenda agenda)
          Add an agenda
 String[] getAgendaIds()
          Fetch agenda ids
 List<Agenda> getAgendas()
          Gets agendas
 List<Event> getEvents()
          Retrieves all events of the agenda
 List<Event> getEventsByDate(Date dateBegin, Date dateEnd, Locale localeEnv)
          Fetches the events present between two dates
 List<Event> getEventsByDate(String strDate)
          Retrieves events for a given date
 String getKeyName()
          Returns the KeyName
 String getName()
          Returns the name of the Agenda
 boolean hasEvents(String strDate)
          Indicates if the agenda gets events for a given date
 void setKeyName(String strKeyName)
          Sets the KeyName
 void setName(String strName)
          Defines the name of the Agenda
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiAgenda

public MultiAgenda()
Default constructor

Method Detail

hasEvents

public boolean hasEvents(String strDate)
Indicates if the agenda gets events for a given date

Specified by:
hasEvents in interface Agenda
Parameters:
strDate - A date code
Returns:
True if there is events, otherwise false

getEventsByDate

public List<Event> getEventsByDate(String strDate)
Retrieves events for a given date

Specified by:
getEventsByDate in interface Agenda
Parameters:
strDate - A date code
Returns:
A list of events

getEvents

public List<Event> getEvents()
Retrieves all events of the agenda

Specified by:
getEvents in interface Agenda
Returns:
A list of events

getName

public String getName()
Returns the name of the Agenda

Specified by:
getName in interface Agenda
Returns:
The agenda's name

setName

public void setName(String strName)
Defines the name of the Agenda

Specified by:
setName in interface Agenda
Parameters:
strName - The agenda's name

addAgenda

public void addAgenda(Agenda agenda)
Add an agenda

Parameters:
agenda - The agenda

getKeyName

public String getKeyName()
Returns the KeyName

Specified by:
getKeyName in interface Agenda
Returns:
The KeyName

setKeyName

public void setKeyName(String strKeyName)
Sets the KeyName

Specified by:
setKeyName in interface Agenda
Parameters:
strKeyName - The KeyName

getAgendas

public List<Agenda> getAgendas()
Gets agendas

Returns:
A list that contain all agendas

getEventsByDate

public List<Event> getEventsByDate(Date dateBegin,
                                   Date dateEnd,
                                   Locale localeEnv)
Fetches the events present between two dates

Specified by:
getEventsByDate in interface Agenda
Parameters:
dateBegin - The start date
dateEnd - The end date
localeEnv - the locale
Returns:
The events

getAgendaIds

public String[] getAgendaIds()
Fetch agenda ids

Returns:
agenda ids


Copyright © 2014 Mairie de Paris. All Rights Reserved.