Class MomentsProperties
java.lang.Object
org.springframework.modulith.moments.support.MomentsProperties
@ConfigurationProperties(prefix="spring.modulith.moments")
public class MomentsProperties
extends Object
Configuration properties for
Moments
.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static enum
The granularity of events to publish. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionTheLocale
to use when determining week boundaries.getShiftedQuarter
(LocalDate reference) Returns theShiftedQuarter
for the given reference date.TheZoneId
to determine times which are attached to the events published.boolean
Whether to enable theTimeMachine
.(package private) boolean
isHourly()
Returns whether to create hourly events.(package private) MomentsProperties
withGranularity
(MomentsProperties.Granularity granularity) (package private) MomentsProperties
withLocale
(Locale locale) (package private) MomentsProperties
withZoneId
(ZoneId zoneId)
-
Field Details
-
DEFAULTS
-
-
Method Details
-
getZoneId
TheZoneId
to determine times which are attached to the events published. Defaults toZoneOffset.UTC
.- Returns:
- will never be null.
-
getLocale
TheLocale
to use when determining week boundaries. Defaults toLocale.getDefault()
.- Returns:
- will never be null.
-
isEnableTimeMachine
public boolean isEnableTimeMachine()Whether to enable theTimeMachine
. -
isHourly
boolean isHourly()Returns whether to create hourly events. -
getShiftedQuarter
Returns theShiftedQuarter
for the given reference date.- Parameters:
reference
- must not be null.- Returns:
- will never be null.
-
withGranularity
-
withZoneId
-
withLocale
-