Class InitialDataLoadConfig
- java.lang.Object
-
- com.activeviam.risk.starter.cfg.impl.InitialDataLoadConfig
-
@Configuration @Profile("dist-data-node | !dist-query-node") public class InitialDataLoadConfig extends Object
Configure the initial data load for theIDataLoadController
, which takes place at application startup.The file that are loaded are:
- configuration CSV files
- Daily SA, IMA, and PL files:
- If the property
initial-load.business-date
is set, use the dates listed here for the intial load. - Otherwise scan the data directory for date-named directories and load these dates.
- If the property
- Historical/summary IMA and PL files
-
-
Field Summary
Fields Modifier and Type Field Description String
folder
static DateTimeFormatter
LOCAL_DATE_DIRECTORY_NAME_FORMAT
-
Constructor Summary
Constructors Constructor Description InitialDataLoadConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LocalDate>
allAvailableDates()
Void
initialDataLoad()
List<LocalDate>
initialLoadAsOfDates()
The set of as-of dates to include in the iniital load.
-
-
-
Field Detail
-
LOCAL_DATE_DIRECTORY_NAME_FORMAT
public static final DateTimeFormatter LOCAL_DATE_DIRECTORY_NAME_FORMAT
-
folder
@Autowired @Qualifier("folder") public String folder
-
-
Method Detail
-
initialDataLoad
@Bean @DependsOn({"startManager","wireSelectionListeners"}) public Void initialDataLoad() throws IOException
- Throws:
IOException
-
allAvailableDates
@Bean public List<LocalDate> allAvailableDates() throws IOException
- Throws:
IOException
-
initialLoadAsOfDates
@Bean public List<LocalDate> initialLoadAsOfDates() throws IOException
The set of as-of dates to include in the iniital load.This first looks at the property
initial-load.business-dates
, if this is set, then load the specified dates. Otherwise, look at all the (immediate) sub-directories of the data directory and pick those whose names are dates.- Returns:
- the collection of dates to load.
- Throws:
IOException
- if problem resolving paths
-
-