Class MarketplaceController
- java.lang.Object
-
- org.craftercms.studio.controller.rest.v2.MarketplaceController
-
@Validated @RestController @RequestMapping("/api/2/marketplace") public class MarketplaceController extends Object
REST controller that provides access to Marketplace operations- Since:
- 3.1.2
- Author:
- joseross
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MarketplaceController.CopyPluginRequest
protected static class
MarketplaceController.RemovePluginRequest
-
Field Summary
Fields Modifier and Type Field Description protected MarketplaceService
marketplaceService
-
Constructor Summary
Constructors Constructor Description MarketplaceController(MarketplaceService marketplaceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseBody
copyPlugin(@Valid MarketplaceController.CopyPluginRequest request)
ResponseBody
getDependantItems(String siteId, String pluginId)
ResponseBody
getInstalledPlugins(String siteId)
ResponseBody
installPlugin(@Valid InstallPluginRequest request)
ResponseBody
removePlugin(@Valid MarketplaceController.RemovePluginRequest request)
ResponseBody
searchPlugins(String type, String keywords, boolean showIncompatible, @javax.validation.constraints.PositiveOrZero long offset, @javax.validation.constraints.PositiveOrZero long limit)
-
-
-
Field Detail
-
marketplaceService
protected final MarketplaceService marketplaceService
-
-
Constructor Detail
-
MarketplaceController
@ConstructorProperties("marketplaceService") public MarketplaceController(MarketplaceService marketplaceService)
-
-
Method Detail
-
searchPlugins
@GetMapping("/search") public ResponseBody searchPlugins(@RequestParam(required=false) String type, @RequestParam(required=false) String keywords, @RequestParam(required=false,defaultValue="false") boolean showIncompatible, @PositiveOrZero @RequestParam(required=false,defaultValue="0") @javax.validation.constraints.PositiveOrZero long offset, @PositiveOrZero @RequestParam(required=false,defaultValue="10") @javax.validation.constraints.PositiveOrZero long limit) throws MarketplaceException
- Throws:
MarketplaceException
-
getInstalledPlugins
@GetMapping("/installed") public ResponseBody getInstalledPlugins(@RequestParam String siteId) throws MarketplaceException
- Throws:
MarketplaceException
-
installPlugin
@PostMapping("/install") public ResponseBody installPlugin(@Valid @RequestBody @Valid InstallPluginRequest request) throws MarketplaceException
- Throws:
MarketplaceException
-
getDependantItems
@GetMapping("/usage") public ResponseBody getDependantItems(@RequestParam String siteId, @RequestParam String pluginId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
removePlugin
@PostMapping("/remove") public ResponseBody removePlugin(@Valid @RequestBody @Valid MarketplaceController.RemovePluginRequest request) throws ServiceLayerException
- Throws:
ServiceLayerException
-
copyPlugin
@PostMapping("copy") public ResponseBody copyPlugin(@Valid @RequestBody @Valid MarketplaceController.CopyPluginRequest request) throws MarketplaceException
- Throws:
MarketplaceException
-
-