Class LocationImporter
- java.lang.Object
-
- org.motechproject.mots.management.LocationImporter
-
- All Implemented Interfaces:
org.springframework.boot.ApplicationRunner
@Component public class LocationImporter extends java.lang.Object implements org.springframework.boot.ApplicationRunner
-
-
Constructor Summary
Constructors Constructor Description LocationImporter(LocationService locationService)
Initializes locationService and locations lists.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run(org.springframework.boot.ApplicationArguments args)
Implementation of run method.
-
-
-
Constructor Detail
-
LocationImporter
@Autowired public LocationImporter(LocationService locationService)
Initializes locationService and locations lists.- Parameters:
locationService
- service to autowire.
-
-
Method Detail
-
run
public void run(org.springframework.boot.ApplicationArguments args) throws java.io.IOException
Implementation of run method. A container for all actions which loads locations data to db.- Specified by:
run
in interfaceorg.springframework.boot.ApplicationRunner
- Parameters:
args
- Arguments passed to the application- Throws:
java.io.IOException
- if location of the .xlsx file is wrong.
-
-