- Enclosing class:
- ICalBuilder
-
Field Summary
Fields inherited from class org.bzdev.net.calendar.ICalBuilder.Base
contentLines -
Constructor Summary
ConstructorsConstructorDescriptionEvent(String uid, int sequence, TemporalAccessor created, TemporalAccessor lastModified) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCreate the content for this event (a sequence of lines) that will make up part of an iCalendar file).voidsetDescription(String description, String... parameters) Set the description for this event.voidsetEndTime(TemporalAccessor endTime, String... params) Set the ending time for this iCalendar component.voidsetLocation(String location, String... parameters) Set the location for this iCalendar component.voidsetPriority(int priority) Set the priority of this iCalendar component.voidsetStartTime(TemporalAccessor startTime, String... params) Set the starting time for this iCalendar component.voidsetStatus(ICalBuilder.Status status) Set the status for this iCalendar component The status property is described in Section 3.8.1.11 of RFC 5545.voidsetSummary(String summary, String... parameters) Set the summary property for this event.voidIndicate that this component is transparent (that is, it will not 'hide' other calendar components or prevent them from being present over the same time interval).Methods inherited from class org.bzdev.net.calendar.ICalBuilder.CommonWithAlarm
clearContentLinesMethods inherited from class org.bzdev.net.calendar.ICalBuilder.Common
addAttendee, addCategories, addComment, addContact, addRelatedTo, setClassification, setGeo, setURLMethods inherited from class org.bzdev.net.calendar.ICalBuilder.Base
addAttachment, addAttachment, addProperty, addProperty, addProperty, setDuration
-
Constructor Details
-
Event
public Event(String uid, int sequence, TemporalAccessor created, TemporalAccessor lastModified) throws IllegalArgumentException Constructor. The first argument (uid) is described in Section 3.8.4.7 of RFC 5545. The second argument (sequence) is described in Section 3.8.7.4 of RFC 5545. The third argument (created) is described in Section 3.8.7.1 of RFC 5545. The fourth argument (lastModified) is described in Section of 3.8.7.3 RFC 5545.The types of the
TemporalAccessorarguments must be eitherLocalDate,LocalDateTime,ZonedDateTime, orInstant, The classesLocalDateandLocalDateTimewill be treated as a "floating time" (see RFC 5545) and bothZonedDateTimeandInstantwill have their times represented using UTC. To convert a LocalDate value to a LocalDateTime value, use methods such asLocalDate.atStartOfDay(). To convert a LocalDateTime value to a ZonedDateTime object, use the methodLocalDateTime.atZone(java.time.ZoneId). To get the default time zone for the Java virtual machine, use the methodZoneId.systemDefault().- Parameters:
uid- a unique identifier labeling this eventsequence- the sequence number for updates for this eventcreated- the time at which this event was createdlastModified- the last time at which this event was modified- Throws:
IllegalArgumentException- an argument was null or the sequence number was negative or a temporal accessor argument's type is not a recognized subclass of TemporalAccesssor
-
-
Method Details
-
setStartTime
Set the starting time for this iCalendar component. Please see Section 3.8.2.4 of RFC 5545 for a description of the start-time property Parameters should not be used unless the run-time type of the first argument isLocalDateorLocalDateTime. The parameters defined by RFC 5545 are- VALUE. Values (which follow an "=" character) can be DATE-TIME or DATE.
- TZID. Please see Section 3.2.19 of RFC 5545.
The type of the
TemporalAccessorargument must be eitherLocalDate,LocalDateTime,ZonedDateTime, orInstant, The classesLocalDateandLocalDateTimewill be treated as a "floating time" (see RFC 5545) and bothZonedDateTimeandInstantwill have their times represented using UTC. To convert a LocalDate value to a LocalDateTime value, use methods such asLocalDate.atStartOfDay(). To convert a LocalDateTime value to a ZonedDateTime object, use the methodLocalDateTime.atZone(java.time.ZoneId). To get the default time zone for the Java virtual machine, use the methodZoneId.systemDefault().- Overrides:
setStartTimein classICalBuilder.Common- Parameters:
startTime- the time at which this item starts; null if there is no start timeparams- the parameters for the starting time, if any- Throws:
IllegalArgumentException- the temporal accessor argument's type is not a recognized subclass of TemporalAccesssor
-
setEndTime
Set the ending time for this iCalendar component. Section 3.8.2.2 of RFC 5545 for a description of the end-time property. Parameters should not be used unless the run-time type of the first argument isLocalDateorLocalDateTime. The parameters defined by RFC 5545 are- VALUE. Values (which follow an "=" character) can be DATE-TIME or DATE.
- TZID. Please see Section 3.2.19 of RFC 5545.
- Parameters:
endTime- the time at which this item ends; null if there is no end timeparams- the parameters for the starting time, if any- Throws:
IllegalArgumentException- the temporal accessor argument's type is not a recognized subclass of TemporalAccesssor
-
setSummary
Set the summary property for this event. The first argument is typically a short string describing an event and is described in Section 3.8.1.12 of RFC 5545.Parameters defined by RFC 5545 for a comment are LANGUAGE and ALTREP.
- Overrides:
setSummaryin classICalBuilder.Common- Parameters:
summary- a summary describing this event; null if there is no summaryparameters- the parameters for this property
-
setDescription
Set the description for this event. The description of an iCalendar component and is described in Section 3.8.1.5 of RFC 5545.Parameters defined by RFC 5545 for a comment are LANGUAGE and ALTREP.
- Overrides:
setDescriptionin classICalBuilder.Common- Parameters:
description- a full description of this event; null if there is no descriptionparameters- the parameters for this property
-
setLocation
Set the location for this iCalendar component. The location property describes the location of an event and is described in Section 3.8.1.7 of RFC 5545.Parameters defined by RFC 5545 for a comment are LANGUAGE and ALTREP.
- Overrides:
setLocationin classICalBuilder.Common- Parameters:
location- the location for this event; null if no location is specifiedparameters- the parameters for this property
-
setStatus
Set the status for this iCalendar component The status property is described in Section 3.8.1.11 of RFC 5545.- Overrides:
setStatusin classICalBuilder.Common- Parameters:
status- the status (ICalBuilder.Status.TENTATIVE,ICalBuilder.Status.CONFIRMED, orICalBuilder.Status.CANCELLED); null to indicate that their is no status.- Throws:
IllegalArgumentException- the status is not allowed for this iCalendar component
-
setPriority
public void setPriority(int priority) Set the priority of this iCalendar component. Please see Section 3.8.1.9 of RFC 5545 for a description of the priority property.- Overrides:
setPriorityin classICalBuilder.Common- Parameters:
priority- the priority, a value in the range [0, 9]
-
setTransparent
public void setTransparent()Indicate that this component is transparent (that is, it will not 'hide' other calendar components or prevent them from being present over the same time interval). Section 3.8.2.7 of RFC 5545. -
createContentLines
protected void createContentLines()Description copied from class:ICalBuilder.CommonWithAlarmCreate the content for this event (a sequence of lines) that will make up part of an iCalendar file).- Overrides:
createContentLinesin classICalBuilder.CommonWithAlarm
-