java.lang.Object
org.apache.camel.quarkus.component.mongodb.gridfs.it.MongodbGridfsResource
@Path("/mongodb-gridfs")
public class MongodbGridfsResource
extends Object
-
Field Summary
Fields
(package private) static final String
(package private) static final String
(package private) com.mongodb.client.MongoClient
(package private) org.apache.camel.ProducerTemplate
-
Constructor Summary
Constructors
-
Method Summary
jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
DEFAULT_MONGO_CLIENT_NAME
static final String DEFAULT_MONGO_CLIENT_NAME
- See Also:
-
-
NAMED_MONGO_CLIENT_NAME
static final String NAMED_MONGO_CLIENT_NAME
- See Also:
-
-
namedMongoClient
@Inject
@MongoClientName("myMongoClient")
com.mongodb.client.MongoClient namedMongoClient
-
producerTemplate
@Inject
org.apache.camel.ProducerTemplate producerTemplate
-
Constructor Details
-
MongodbGridfsResource
public MongodbGridfsResource()
-
Method Details
-
uploadFile
@Path("/upload/{fileName}")
@POST
@Produces("text/plain")
public jakarta.ws.rs.core.Response uploadFile(@PathParam("fileName")
String fileName,
String content,
@HeaderParam("mongoClientName")
String mongoClientName)
throws Exception
- Throws:
Exception
-
retrieveFile
@Path("/get/{fileName}")
@GET
@Produces("text/plain")
public jakarta.ws.rs.core.Response retrieveFile(@PathParam("fileName")
String fileName,
@HeaderParam("mongoClientName")
String mongoClientName)
-
deleteFile
@Path("/delete/{fileName}")
@DELETE
public jakarta.ws.rs.core.Response deleteFile(@PathParam("fileName")
String fileName,
@HeaderParam("mongoClientName")
String mongoClientName)