Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.core.web; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | import net.floodlightcontroller.storage.IStorageSourceService; |
| 6 | |
| 7 | import org.restlet.resource.Get; |
| 8 | import org.restlet.resource.ServerResource; |
| 9 | |
| 10 | public class StorageSourceTablesResource extends ServerResource { |
| 11 | @Get("json") |
| 12 | public Set<String> retrieve() { |
| 13 | IStorageSourceService storageSource = (IStorageSourceService)getContext(). |
| 14 | getAttributes().get(IStorageSourceService.class.getCanonicalName()); |
| 15 | Set<String> allTableNames = storageSource.getAllTableNames(); |
| 16 | return allTableNames; |
| 17 | } |
| 18 | } |