public interface GridFsOperations extends ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIXCLASSPATH_URL_PREFIX| Modifier and Type | Method and Description |
|---|---|
void |
delete(Query query)
Deletes all files matching the given
Query. |
List<com.mongodb.gridfs.GridFSDBFile> |
find(Query query)
Returns all files matching the given query.
|
com.mongodb.gridfs.GridFSDBFile |
findOne(Query query)
Returns a single file matching the given query or null in case no file matches.
|
GridFsResource |
getResource(String filename)
Returns all
GridFsResource with the given file name. |
GridFsResource[] |
getResources(String filenamePattern)
Returns all
GridFsResources matching the given file name pattern. |
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
com.mongodb.DBObject metadata)
Stores the given content into a file with the given name.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
Object metadata)
Stores the given content into a file with the given name.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename)
Stores the given content into a file with the given name.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename,
com.mongodb.DBObject metadata)
Stores the given content into a file with the given name using the given metadata.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename,
Object metadata)
Stores the given content into a file with the given name using the given metadata.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename,
String contentType)
Stores the given content into a file with the given name and content type.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename,
String contentType,
com.mongodb.DBObject metadata)
Stores the given content into a file with the given name and content type using the given metadata.
|
com.mongodb.gridfs.GridFSFile |
store(InputStream content,
String filename,
String contentType,
Object metadata)
Stores the given content into a file with the given name and content type using the given metadata.
|
getClassLoadercom.mongodb.gridfs.GridFSFile store(InputStream content, String filename)
content - must not be null.filename - must not be null or empty.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, Object metadata)
content - must not be null.metadata - can be null.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, com.mongodb.DBObject metadata)
content - must not be null.metadata - can be null.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, String filename, String contentType)
content - must not be null.filename - must not be null or empty.contentType - can be null.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, String filename, Object metadata)
content - must not be null.filename - must not be null or empty.metadata - can be null.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, String filename, String contentType, Object metadata)
content - must not be null.filename - must not be null or empty.contentType - can be null.metadata - can be nullGridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, String filename, com.mongodb.DBObject metadata)
content - must not be null.filename - must not be null or empty.metadata - can be null.GridFSFile just createdcom.mongodb.gridfs.GridFSFile store(InputStream content, String filename, String contentType, com.mongodb.DBObject metadata)
content - must not be null.filename - must not be null or empty.contentType - can be null.metadata - can be null.GridFSFile just createdList<com.mongodb.gridfs.GridFSDBFile> find(Query query)
Sort criterias defined at the
Query will not be regarded as MongoDB does not support ordering for GridFS file access.query - com.mongodb.gridfs.GridFSDBFile findOne(Query query)
query - GridFsResource getResource(String filename)
GridFsResource with the given file name.getResource in interface ResourceLoaderfilename - ResourceLoader.getResource(String)GridFsResource[] getResources(String filenamePattern)
GridFsResources matching the given file name pattern.getResources in interface ResourcePatternResolverfilenamePattern - ResourcePatternResolver.getResources(String)Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.