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
Nested ClassesModifier and TypeClassDescription(package private) static enumThe granularity of events to publish. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionTheLocaleto use when determining week boundaries.getShiftedQuarter(LocalDate reference) Returns theShiftedQuarterfor the given reference date.TheZoneIdto determine times which are attached to the events published.booleanWhether to enable theTimeMachine.(package private) booleanisHourly()Returns whether to create hourly events.(package private) MomentsPropertieswithGranularity(MomentsProperties.Granularity granularity) (package private) MomentsPropertieswithLocale(Locale locale) (package private) MomentsPropertieswithZoneId(ZoneId zoneId)
-
Field Details
-
DEFAULTS
-
-
Method Details
-
getZoneId
TheZoneIdto determine times which are attached to the events published. Defaults toZoneOffset.UTC.- Returns:
- will never be null.
-
getLocale
TheLocaleto 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 theShiftedQuarterfor the given reference date.- Parameters:
reference- must not be null.- Returns:
- will never be null.
-
withGranularity
-
withZoneId
-
withLocale
-