Record Class CalendarFeedParser.ImportedEvent

java.lang.Object
java.lang.Record
org.exoplatform.agenda.util.CalendarFeedParser.ImportedEvent
Record Components:
key - UID and original instant, stable across refreshes
summary - the title, plain text, may be null
description - the description, plain text, may be null
location - the location, plain text, may be null
allDay - whether the occurrence spans whole days
start - the start; for an all-day occurrence, its first day at UTC midnight
end - the end; for an all-day occurrence, its last day at UTC midnight
timeZone - the time zone the event is expressed in
availability - FREE for a transparent event, BUSY otherwise
Enclosing class:
CalendarFeedParser

public static record CalendarFeedParser.ImportedEvent(String key, String summary, String description, String location, boolean allDay, ZonedDateTime start, ZonedDateTime end, ZoneId timeZone, org.exoplatform.agenda.constant.EventAvailability availability) extends Record
One occurrence, ready to be written as an agenda event.
  • Constructor Details

    • ImportedEvent

      public ImportedEvent(String key, String summary, String description, String location, boolean allDay, ZonedDateTime start, ZonedDateTime end, ZoneId timeZone, org.exoplatform.agenda.constant.EventAvailability availability)
      Creates an instance of a ImportedEvent record class.
      Parameters:
      key - the value for the key record component
      summary - the value for the summary record component
      description - the value for the description record component
      location - the value for the location record component
      allDay - the value for the allDay record component
      start - the value for the start record component
      end - the value for the end record component
      timeZone - the value for the timeZone record component
      availability - the value for the availability record component
  • Method Details

    • contentHash

      public String contentHash()
      A digest of everything imported, so an unchanged occurrence is not rewritten.
      Returns:
      lowercase hexadecimal SHA-256
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • location

      public String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • allDay

      public boolean allDay()
      Returns the value of the allDay record component.
      Returns:
      the value of the allDay record component
    • start

      public ZonedDateTime start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public ZonedDateTime end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • timeZone

      public ZoneId timeZone()
      Returns the value of the timeZone record component.
      Returns:
      the value of the timeZone record component
    • availability

      public org.exoplatform.agenda.constant.EventAvailability availability()
      Returns the value of the availability record component.
      Returns:
      the value of the availability record component