com.stratelia.webactiv.almanach.control
Class DisplayableEventOccurrence

java.lang.Object
  extended by com.stratelia.webactiv.almanach.model.EventOccurrence
      extended by com.stratelia.webactiv.almanach.control.DisplayableEventOccurrence
All Implemented Interfaces:
Comparable<EventOccurrence>

public class DisplayableEventOccurrence
extends EventOccurrence

An occurrence of an event in the time and that can be rendered in a calendar view. A DisplayableEventOccurrence instance decorates an event occurrence by adding to it rendering information so that the occurrence can be displayed into a calendar view.


Method Summary
static DisplayableEventOccurrence decorate(EventOccurrence occurrence)
          Decorates the specified event occurrence with rendering features.
static List<DisplayableEventOccurrence> decorate(List<EventOccurrence> occurrences)
          Decorates the specified event occurrences with rendering features.
protected  List<String> getCSSClasses()
          Gets the CSS class(es) that is applied to this event rendering.
 boolean isEndTimeDefined()
           
 boolean isStartTimeDefined()
           
 String toJSON()
          Gets a JSON (JavaScript Object Notation) representation of this event.
static String toJSON(List<DisplayableEventOccurrence> events)
          Gets a JSON (JavaScript Object Notation) representation of all the specified events.
protected  org.json.JSONObject toJSONObject()
          Converts this event DTO into a JSON object.
 
Methods inherited from class com.stratelia.webactiv.almanach.model.EventOccurrence
anOccurrenceOf, anOccurrenceOf, compareTo, endingAt, getEndDate, getEndDateTimeInISO, getEventDetail, getStartDate, getStartDateTimeInISO, isAllDay, isPriority, startingAt, withPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decorate

public static DisplayableEventOccurrence decorate(EventOccurrence occurrence)
Decorates the specified event occurrence with rendering features.

Parameters:
occurrence - the event occurrence to decorate.
Returns:
a DisplayableEventOccurrence instance.

decorate

public static List<DisplayableEventOccurrence> decorate(List<EventOccurrence> occurrences)
Decorates the specified event occurrences with rendering features.

Parameters:
occurrences - a list of event occurrences to decorate.
Returns:
a list of DisplayableEventOccurrence instances, each of them decorating one of the specified occurrences.

getCSSClasses

protected List<String> getCSSClasses()
Gets the CSS class(es) that is applied to this event rendering.

Returns:
a list with the CSS classes that are applied to this.

toJSON

public String toJSON()
Gets a JSON (JavaScript Object Notation) representation of this event.

Returns:
a JSON representation of this event.

isStartTimeDefined

public boolean isStartTimeDefined()

isEndTimeDefined

public boolean isEndTimeDefined()

toJSON

public static String toJSON(List<DisplayableEventOccurrence> events)
Gets a JSON (JavaScript Object Notation) representation of all the specified events.

Parameters:
events - the events.
Returns:
a JSON array with the JSON representation of all the specified events.

toJSONObject

protected org.json.JSONObject toJSONObject()
Converts this event DTO into a JSON object.

Returns:
a JSON object of this event DTO.


Copyright © 2016 Silverpeas. All Rights Reserved.