Top Description Inners Fields Constructors Methods
net.fortuna.ical4j.model.property

public Class Trigger

extends DateProperty<Instant>
implements UtcProperty
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.property.UtcProperty
Imports
net.fortuna.ical4j.model.*, net.fortuna.ical4j.model.parameter.Value, net.fortuna.ical4j.validate.ValidationException, .ValidationResult, net.fortuna.ical4j.validate.property.AlarmPropertyValidators, org.slf4j.LoggerFactory, java.time.Instant, .ZoneId, java.time.format.DateTimeParseException, java.time.temporal.TemporalAmount, java.util.Collections, .Optional

$Id$

Created: [Apr 6, 2004]

Defines a TRIGGER iCalendar component property.

    4.8.6.3 Trigger

       Property Name: TRIGGER

       Purpose: This property specifies when an alarm will trigger.

       Value Type: The default value type is DURATION. The value type can be
       set to a DATE-TIME value type, in which case the value MUST specify a
       UTC formatted DATE-TIME value.

       Property Parameters: Non-standard, value data type, time zone
       identifier or trigger relationship property parameters can be
       specified on this property. The trigger relationship property
       parameter MUST only be specified when the value type is DURATION.

       Conformance: This property MUST be specified in the "VALARM" calendar
       component.

       Description: Within the "VALARM" calendar component, this property
       defines when the alarm will trigger. The default value type is
       DURATION, specifying a relative time for the trigger of the alarm.
       The default duration is relative to the start of an event or to-do
       that the alarm is associated with. The duration can be explicitly set

       to trigger from either the end or the start of the associated event
       or to-do with the "RELATED" parameter. A value of START will set the
       alarm to trigger off the start of the associated event or to-do. A
       value of END will set the alarm to trigger off the end of the
       associated event or to-do.

       Either a positive or negative duration may be specified for the
       "TRIGGER" property. An alarm with a positive duration is triggered
       after the associated start or end of the event or to-do. An alarm
       with a negative duration is triggered before the associated start or
       end of the event or to-do.

       The "RELATED" property parameter is not valid if the value type of
       the property is set to DATE-TIME (i.e., for an absolute date and time
       alarm trigger). If a value type of DATE-TIME is specified, then the
       property value MUST be specified in the UTC time format. If an
       absolute trigger is specified on an alarm for a recurring event or
       to-do, then the alarm will only trigger for the specified absolute
       date/time, along with any specified repeating instances.

       If the trigger is set relative to START, then the "DTSTART" property
       MUST be present in the associated "VEVENT" or "VTODO" calendar
       component. If an alarm is specified for an event with the trigger set
       relative to the END, then the "DTEND" property or the "DSTART" and
       "DURATION' properties MUST be present in the associated "VEVENT"
       calendar component. If the alarm is specified for a to-do with a
       trigger set relative to the END, then either the "DUE" property or
       the "DSTART" and "DURATION' properties MUST be present in the
       associated "VTODO" calendar component.

       Alarms specified in an event or to-do which is defined in terms of a
       DATE value type will be triggered relative to 00:00:00 UTC on the
       specified date. For example, if "DTSTART:19980205, then the duration
       trigger will be relative to19980205T000000Z.

       Format Definition: The property is defined by the following notation:

         trigger    = "TRIGGER" (trigrel / trigabs)

         trigrel    = *(

                    ; the following are optional,
                    ; but MUST NOT occur more than once

                      (";" "VALUE" "=" "DURATION") /
                      (";" trigrelparam) /

                    ; the following is optional,
                    ; and MAY occur more than once

                      (";" xparam)
                      ) ":"  dur-value

         trigabs    = 1*(

                    ; the following is REQUIRED,
                    ; but MUST NOT occur more than once

                      (";" "VALUE" "=" "DATE-TIME") /

                    ; the following is optional,
                    ; and MAY occur more than once

                      (";" xparam)

                      ) ":" date-time
Author
Ben Fortuna

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private TemporalAmountAdapter
private static final long

Constructor Summary

AccessConstructor and Description
public
Trigger()

Default constructor.

public
Trigger(final ParameterList
a list of parameters for this component
aList
,
final String
a value string for this component
aValue
)

public
Trigger(final Dur
a duration in milliseconds
duration
)
Deprecated

public
Trigger(final TemporalAmount
a duration in milliseconds
duration
)

private
public
Trigger(final ParameterList
a list of parameters for this component
aList
,
final Dur
a duration in milliseconds
duration
)
Deprecated

public
Trigger(final ParameterList
a list of parameters for this component
aList
,
final TemporalAmount
a duration in milliseconds
duration
)

private
Trigger(final ParameterList aList, final TemporalAmountAdapter duration)

public
Trigger(final Instant
a date representation of a date-time
dateTime
)

public
Trigger(final ParameterList
a list of parameters for this component
aList
,
final Instant
a date representation of a date-time
dateTime
)

Method Summary

Modifier and TypeMethod and Description
public final TemporalAmount

Returns:

Returns the duration.
getDuration
()

public final String
public boolean

Returns:

true if the trigger is absolute
isAbsolute
()

Indicates whether the trigger is relative or absolute.

protected PropertyFactory<Trigger>
newFactory()

Implements abstract net.fortuna.ical4j.model.Property.newFactory.

Returns a new property factory used to create deep copies.

public void
setDate(final Instant
The dateTime to set.
dateTime
)

Overrides net.fortuna.ical4j.model.property.DateProperty.setDate.

Sets the date value of this property.

public void
setDefaultTimeZone(ZoneId
a timezone identifier
defaultTimeZone
)

Overrides net.fortuna.ical4j.model.property.DateProperty.setDefaultTimeZone.

Overrides default net.fortuna.ical4j.model.property.UtcProperty.setDefaultTimeZone.

A default timezone may be specified for interpreting floating DATE-TIME values.

public final void
setDuration(final TemporalAmount
The duration to set.
duration
)

public void
public final void
setValue(final String
a string representation of a DATE or DATE-TIME value
aValue
)

Overrides net.fortuna.ical4j.model.property.DateProperty.setValue.

Default setValue() implementation.

public ValidationResult
validate()

Overrides net.fortuna.ical4j.model.property.DateProperty.validate.

Perform validation on a property.

Inherited from net.fortuna.ical4j.model.property.DateProperty:
compareTogetDatehashCodeisUtcrefreshParameters

Field Detail

durationback to summary
private TemporalAmountAdapter duration
serialVersionUIDback to summary
private static final long serialVersionUID

Hides net.fortuna.ical4j.model.property.DateProperty.serialVersionUID.

Constructor Detail

Triggerback to summary
public Trigger()

Default constructor.

Triggerback to summary
public Trigger(final ParameterList aList, final String aValue)
Parameters
aList:ParameterList

a list of parameters for this component

aValue:String

a value string for this component

Triggerback to summary
public Trigger(final Dur duration)

Deprecated

Parameters
duration:Dur

a duration in milliseconds

Annotations
@Deprecated
Triggerback to summary
public Trigger(final TemporalAmount duration)
Parameters
duration:TemporalAmount

a duration in milliseconds

Triggerback to summary
private Trigger(final TemporalAmountAdapter duration)
Triggerback to summary
public Trigger(final ParameterList aList, final Dur duration)

Deprecated

Parameters
aList:ParameterList

a list of parameters for this component

duration:Dur

a duration in milliseconds

Annotations
@Deprecated
Triggerback to summary
public Trigger(final ParameterList aList, final TemporalAmount duration)
Parameters
aList:ParameterList

a list of parameters for this component

duration:TemporalAmount

a duration in milliseconds

Triggerback to summary
private Trigger(final ParameterList aList, final TemporalAmountAdapter duration)
Triggerback to summary
public Trigger(final Instant dateTime)
Parameters
dateTime:Instant

a date representation of a date-time

Triggerback to summary
public Trigger(final ParameterList aList, final Instant dateTime)
Parameters
aList:ParameterList

a list of parameters for this component

dateTime:Instant

a date representation of a date-time

Method Detail

getDurationback to summary
public final TemporalAmount getDuration()
Returns:TemporalAmount

Returns the duration.

getValueback to summary
public final String getValue()

Overrides net.fortuna.ical4j.model.property.DateProperty.getValue.

Returns:String

Doc from net.fortuna.ical4j.model.Content.getValue.

the content value

Annotations
@Override
isAbsoluteback to summary
public boolean isAbsolute()

Indicates whether the trigger is relative or absolute.

Returns:boolean

true if the trigger is absolute

newFactoryback to summary
protected PropertyFactory<Trigger> newFactory()

Implements abstract net.fortuna.ical4j.model.Property.newFactory.

Doc from net.fortuna.ical4j.model.Property.newFactory.

Returns a new property factory used to create deep copies.

Returns:PropertyFactory<Trigger>

a property factory instance

Annotations
@Override
setDateback to summary
public void setDate(final Instant dateTime)

Overrides net.fortuna.ical4j.model.property.DateProperty.setDate.

Doc from net.fortuna.ical4j.model.property.DateProperty.setDate.

Sets the date value of this property. The timezone and value of this instance will also be updated accordingly.

Parameters
dateTime:Instant

The dateTime to set.

Annotations
@Override
setDefaultTimeZoneback to summary
public void setDefaultTimeZone(ZoneId defaultTimeZone)

Overrides net.fortuna.ical4j.model.property.DateProperty.setDefaultTimeZone.

Overrides default net.fortuna.ical4j.model.property.UtcProperty.setDefaultTimeZone.

Doc from net.fortuna.ical4j.model.property.DateProperty.setDefaultTimeZone.

A default timezone may be specified for interpreting floating DATE-TIME values. In the absence of a default timezone the system default timezone will be used.

Parameters
defaultTimeZone:ZoneId

a timezone identifier

Annotations
@Override
setDurationback to summary
public final void setDuration(final TemporalAmount duration)
Parameters
duration:TemporalAmount

The duration to set.

setTimeZoneRegistryback to summary
public void setTimeZoneRegistry(TimeZoneRegistry timeZoneRegistry)

Overrides net.fortuna.ical4j.model.property.DateProperty.setTimeZoneRegistry.

Overrides default net.fortuna.ical4j.model.property.UtcProperty.setTimeZoneRegistry.

Annotations
@Override
setValueback to summary
public final void setValue(final String aValue)

Overrides net.fortuna.ical4j.model.property.DateProperty.setValue.

Doc from net.fortuna.ical4j.model.property.DateProperty.setValue.

Default setValue() implementation. Allows for either DATE or DATE-TIME values. Note that this method will use the system default zone rules to parse the string value. For parsing string values in a different timezone use TemporalAdapter#parse(String, ZoneId) and DateProperty#setDate(Temporal).

Parameters
aValue:String

a string representation of a DATE or DATE-TIME value

Annotations
@Override
validateback to summary
public ValidationResult validate() throws ValidationException

Overrides net.fortuna.ical4j.model.property.DateProperty.validate.

Doc from net.fortuna.ical4j.model.property.DateProperty.validate.

Perform validation on a property.

Annotations
@Override
Exceptions
ValidationException:

Doc from net.fortuna.ical4j.model.Property.validate.

where the property is not in a valid state

net.fortuna.ical4j.model.property back to summary

public Class Trigger.Factory

extends Factory
implements PropertyFactory<Trigger>
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.PropertyFactory, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Trigger
createProperty(final ParameterList
a list of property parameters
parameters
,
final String
a property value
value
)

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

public Trigger
Inherited from net.fortuna.ical4j.model.Content.Factory:
supports

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

createPropertyback to summary
public Trigger createProperty(final ParameterList parameters, final String value)

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

Parameters
parameters:ParameterList

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a list of property parameters

value:String

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a property value

Returns:Trigger

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a new instance of the specified property

Annotations
@Override
createPropertyback to summary
public Trigger createProperty()

Implements net.fortuna.ical4j.model.PropertyFactory.createProperty.

Returns:Trigger

Doc from net.fortuna.ical4j.model.PropertyFactory.createProperty.

a new instance of the specified property

Annotations
@Override