Package org.restheart.mongodb.services
Class CsvLoader
java.lang.Object
org.restheart.mongodb.services.CsvLoader
- All Implemented Interfaces:
CORSHeaders,ConfigurablePlugin,ExchangeTypeResolver<BsonFromCsvRequest,,BsonResponse> HandlingPlugin<BsonFromCsvRequest,,BsonResponse> Plugin,Service<BsonFromCsvRequest,BsonResponse>
service to upload a csv file in a MongoDb 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");
- 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 <andrea@softinstigate.com>
-
Field Summary
FieldsFields inherited from interface org.restheart.exchange.CORSHeaders
ACCESS_CONTROL_ALLOW_CREDENTIAL, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_EXPOSE_HEADERS, DEFAULT_ACCESS_CONTROL_ALLOW_CREDENTIALS, DEFAULT_ACCESS_CONTROL_ALLOW_HEADERS, DEFAULT_ACCESS_CONTROL_ALLOW_METHODS, DEFAULT_ACCESS_CONTROL_ALLOW_ORIGIN, DEFAULT_ACCESS_CONTROL_EXPOSE_HEADERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(BsonFromCsvRequest request, BsonResponse response) Function<io.undertow.server.HttpServerExchange,BsonFromCsvRequest> request()Consumer<io.undertow.server.HttpServerExchange>Function<io.undertow.server.HttpServerExchange,BsonResponse> response()Consumer<io.undertow.server.HttpServerExchange>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefaultMethods inherited from interface org.restheart.exchange.CORSHeaders
accessControlAllowCredentials, accessControlAllowHeaders, accessControlAllowMethods, accessControlAllowOrigin, accessControlExposeHeadersMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseTypeMethods inherited from interface org.restheart.plugins.Service
handle, handleOptions, handleOptions
-
Field Details
-
FILTER_PROPERTY
- See Also:
-
-
Constructor Details
-
CsvLoader
public CsvLoader()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceService<BsonFromCsvRequest,BsonResponse> - Throws:
Exception
-
requestInitializer
- Specified by:
requestInitializerin interfaceService<BsonFromCsvRequest,BsonResponse>
-
responseInitializer
- Specified by:
responseInitializerin interfaceService<BsonFromCsvRequest,BsonResponse>
-
request
- Specified by:
requestin interfaceService<BsonFromCsvRequest,BsonResponse>
-
response
- Specified by:
responsein interfaceService<BsonFromCsvRequest,BsonResponse>
-