use of com.salesmanager.shop.model.content.Content in project shopizer by shopizer-ecommerce.
the class ContentAdministrationApi method list.
/**
* Works with ng-file-man client
*
* @param path
* @param merchantStore
* @param language
* @return
* @throws Exception
*/
@GetMapping(value = "/private/content/list", produces = MediaType.APPLICATION_JSON_VALUE)
@ApiImplicitParams({ @ApiImplicitParam(name = "store", dataType = "String", defaultValue = "DEFAULT"), @ApiImplicitParam(name = "lang", dataType = "String", defaultValue = "en") })
public List<ImageFile> list(@RequestParam(value = "parentPath", required = false) String path, @ApiIgnore MerchantStore merchantStore, @ApiIgnore Language language) throws Exception {
String decodedPath = decodeContentPath(path);
ContentFolder folder = contentFacade.getContentFolder(decodedPath, merchantStore);
List<ImageFile> files = folder.getContent().stream().map(x -> convertToImageFile(merchantStore, x)).collect(Collectors.toList());
return files;
}
Aggregations