Initial load configuration properties
How to customize the initial load data location
By default, Atoti Limits will attempt to load the data from CSV files located in the directory specified by thelimits.initial-load.root-dir property. When Atoti Limits starts and connects to your Atoti Server
instance, it will look in the location specified by this property for a subdirectory with the name of your
Atoti Server instance which is specified by the limits.autoconfiguration.server-name property.
The
limits.autoconfiguration.server-name property is autoconfigured by default, but you can set it explicitly in the
configuration for your Atoti Server if needed../src/main/resources/data. If you need to change this location,
set the limits.initial-load.root-dir property to the desired path in your application.yml file.
How to customize the initial load data file patterns
Within the directory specified by thelimits.initial-load.root-dir property, Atoti Limits will look for files
that match the patterns specified by the limits.initial-load.file-path-matchers.* properties. The default patterns are:
| Property Name | Default Value | Description |
|---|---|---|
limits.initial-load.file-path-matchers.limits | glob:**/*limits_approve*.csv | Pattern to match limit files |
limits.initial-load.file-path-matchers.limit-structures | glob:**/*limit_structures*.csv | Pattern to match limit structure files |
limits.initial-load.file-path-matchers.incidents | glob:**/incident/**/*incident*.csv | Pattern to match incident files |
limits.initial-load.file-path-matchers.as-of-date | glob:**/*as_of_date*.csv | Pattern to match AsOfDate files |
application.yml file. If you only wish to
customize the pattern for some of the file types, you can set only those specific properties, and the others will use the
default values.
How to choose the initial as-of-date
The as-of-date file is optional. Atoti Limits can take the initial as-of-date from anILimitsInitialAsOfDateProvider bean instead. The limits.as-of-date.initial-provider property
selects the default provider bean. It also decides whether Atoti Limits reads the as-of-date file matching
limits.initial-load.file-path-matchers.as-of-date:
file(default): reads the as-of-date file. At startup, if there is noas_of_date.csvfile inlimits.initial-load.root-dir, writes one with the current date in the default time zone of the server. Later restarts read this file.utc-time: ignores the as-of-date file and starts with the current UTC date at each startup. Writes no file.none: ignores the as-of-date file and provides no default bean. The as-of-date must come from a declaredILimitsInitialAsOfDateProviderbean. Without a declared bean and without an as-of-date already set, the data load fails with aLimitsRuntimeException. The Atoti Limits server stays up: only the data load of the connected server fails.
/asOfDate/set REST endpoint, is kept. Otherwise, the provider bean, if any, gives the
initial as-of-date.
To choose another date, declare an ILimitsInitialAsOfDateProvider bean. A declared bean replaces the default one,
whatever the value of limits.as-of-date.initial-provider. With a declared bean, Atoti Limits ignores the as-of-date
file, so an existing as-of-date file does not need to be deleted. The interface has a single method, which must return a date. If it
returns null, the data load fails with a LimitsRuntimeException.
How to customize the file loading service
If you need to customize the initial load process beyond what is possible with the configuration properties, you can implement your own file loading service by creating a customILimitsFileLoadingService implementation to replace the
default DefaultLimitsFileLoadingService.
ILimitsFileLoadingService
ILimitsFileLoadingService