/** * @return the description */ public String getDescription() { return _datastore.getDescription(); }
@RequestMapping(method = RequestMethod.GET, produces = "application/json") @ResponseBody public List<Map<String, String>> datastoresFolderJson(@PathVariable("tenant") String tenant) { final TenantContext context = _contextFactory.getContext(tenant); final DatastoreCatalog datastoreCatalog = context.getConfiguration().getDatastoreCatalog(); final String[] names = datastoreCatalog.getDatastoreNames(); final List<Map<String, String>> result = new ArrayList<Map<String, String>>(); for (String name : names) { final Datastore datastore = datastoreCatalog.getDatastore(name); final Map<String, String> map = new LinkedHashMap<String, String>(); map.put("name", name); map.put("description", datastore.getDescription()); map.put("type", datastore.getClass().getSimpleName()); result.add(map); } return result; }
pojoDatastoreType.setDescription(datastore.getDescription());
public static String getDescription(final Datastore datastore) { if (datastore.getDescription() != null) { return datastore.getDescription();
final PojoDatastoreType datastoreType = new PojoDatastoreType(); datastoreType.setName(datastore.getName()); datastoreType.setDescription(datastore.getDescription());