use of org.apache.openmeetings.db.dto.file.FileExplorerObject in project openmeetings by apache.
the class TestFileService method testGetRoom.
@Test
public void testGetRoom() {
ServiceResult r = login();
FileExplorerObject fo = getClient(getFileUrl()).path("/room/5").query("sid", r.getMessage()).get(FileExplorerObject.class);
assertNotNull(fo);
}
use of org.apache.openmeetings.db.dto.file.FileExplorerObject in project openmeetings by apache.
the class FileWebService method getRoom.
/**
* Get a File Explorer Object by a given Room
*
* @param sid
* The SID of the User. This SID must be marked as logged in
* @param roomId
* Room Id
* @return - File Explorer Object by a given Room
*/
@WebMethod
@GET
@Path("/room/{id}")
public FileExplorerObject getRoom(@WebParam(name = "sid") @QueryParam("sid") String sid, @WebParam(name = "id") @PathParam("id") long roomId) {
log.debug("getRoom::roomId {}", roomId);
return performCall(sid, User.Right.Room, sd -> {
FileExplorerObject fileExplorerObject = new FileExplorerObject();
// Home File List
List<FileItem> fList = fileDao.getByOwner(sd.getUserId());
fileExplorerObject.setUser(fList, fileDao.getSize(fList));
// Public File List
List<FileItem> rList = fileDao.getByRoom(roomId);
fileExplorerObject.setRoom(rList, fileDao.getSize(rList));
return fileExplorerObject;
});
}
Aggregations