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 voidrun(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.IOExceptionImplementation of run method. A container for all actions which loads locations data to db.- Specified by:
runin interfaceorg.springframework.boot.ApplicationRunner- Parameters:
args- Arguments passed to the application- Throws:
java.io.IOException- if location of the .xlsx file is wrong.
-
-