Package org.restheart.mongodb.services
Class CsvLoader
- java.lang.Object
-
- org.restheart.mongodb.services.CsvLoader
-
- All Implemented Interfaces:
ByteArrayService,ConfigurablePlugin,ExchangeTypeResolver<ByteArrayRequest,ByteArrayResponse>,HandlingPlugin<ByteArrayRequest,ByteArrayResponse>,Plugin,Service<ByteArrayRequest,ByteArrayResponse>
public class CsvLoader extends Object implements ByteArrayService
service to upload a csv file in a collection query parameters:
- db=<db_name> *required
- coll=<collection_name> *required
- id=<id_column_index> optional (default: no _id column, each row will get an new ObjectId)
- sep=<column_separator> optional (default: ,)
- props=<props> optional (default: no props) additional props to add to each row
- values=<values> optional (default: no values) values of additional props to add to each row
defined in conf file) of a tranformer to apply to imported data - update optional (default: no). use data to update matching documents");- Author:
- Andrea Di Cesare
-
-
Field Summary
Fields Modifier and Type Field Description static StringCVS_CONTENT_TYPEstatic StringFILTER_PROPERTY
-
Constructor Summary
Constructors Constructor Description CsvLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(ByteArrayRequest request, ByteArrayResponse response)voidinit(PluginsRegistry pluginsRegistry)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.restheart.plugins.ByteArrayService
request, requestInitializer, response, responseInitializer
-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Methods inherited from interface org.restheart.plugins.Service
handleOptions
-
-
-
-
Field Detail
-
CVS_CONTENT_TYPE
public static final String CVS_CONTENT_TYPE
- See Also:
- Constant Field Values
-
FILTER_PROPERTY
public static final String FILTER_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(PluginsRegistry pluginsRegistry)
-
handle
public void handle(ByteArrayRequest request, ByteArrayResponse response) throws Exception
- Specified by:
handlein interfaceService<ByteArrayRequest,ByteArrayResponse>- Throws:
Exception
-
-