Search in sources :

Example 1 with GridFSSerializer

use of utils.GridFSSerializer in project play-cookbook by spinscale.

the class Application method getImages.

public static void getImages() {
    List<GridFSDBFile> files = GridFsHelper.getFiles();
    Map map = new HashMap();
    map.put("items", files);
    renderJSON(map, new GridFSSerializer());
}
Also used : GridFSSerializer(utils.GridFSSerializer) HashMap(java.util.HashMap) GridFSDBFile(com.mongodb.gridfs.GridFSDBFile) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

GridFSDBFile (com.mongodb.gridfs.GridFSDBFile)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 GridFSSerializer (utils.GridFSSerializer)1