List of usage examples for com.mongodb.gridfs GridFS DEFAULT_BUCKET
String DEFAULT_BUCKET
To view the source code for com.mongodb.gridfs GridFS DEFAULT_BUCKET.
Click Source Link
From source file:org.apache.camel.component.gridfs.GridFsEndpoint.java
License:Apache License
@SuppressWarnings("deprecation") public void initializeConnection() throws Exception { LOG.info("Initialize GridFS endpoint: {}", this.toString()); if (database == null) { throw new IllegalStateException("Missing required endpoint configuration: database"); }// ww w. jav a 2s . co m db = mongoConnection.getDB(database); if (db == null) { throw new IllegalStateException( "Could not initialize GridFsComponent. Database " + database + " does not exist."); } gridFs = new GridFS(db, bucket == null ? GridFS.DEFAULT_BUCKET : bucket) { { filesCollection = getFilesCollection(); } }; }
From source file:org.sakaiproject.nakamura.lite.storage.mongo.GridFSContentHelper.java
License:Apache License
public GridFSContentHelper(DB mongodb, RowHasher rowHasher, Map<String, Object> properties) { this.rowHasher = rowHasher; String bucket = StorageClientUtils.getSetting(properties.get(MongoClientPool.PROP_BUCKET), GridFS.DEFAULT_BUCKET); this.contentBodies = new GridFS(mongodb, bucket); }