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

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

public class SimpleAgenda
extends Object
implements Agenda

A basic implementation of an agenda

See Also:
Serialized Form

Constructor Summary
SimpleAgenda()
          Default constructor
 
Method Summary
 void addEvent(Event event)
          Add an event to the agenda
 List<Event> getEvents()
          Retrieves all events of the agenda
 List<Event> getEventsByDate(Date dateBegin, Date dateEnd, Locale localeEnv)
          Fetches the events by date
 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

SimpleAgenda

public SimpleAgenda()
Default constructor

Method Detail

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

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

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

addEvent

public void addEvent(Event event)
Add an event to the agenda

Parameters:
event - The event to add

getEvents

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

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

getEventsByDate

public List<Event> getEventsByDate(Date dateBegin,
                                   Date dateEnd,
                                   Locale localeEnv)
Fetches the events by date

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


Copyright © 2014 Mairie de Paris. All Rights Reserved.