@RestController @RequestMapping(value="/rest/widgets") public class WidgetResource extends AssetResource<Widget>
assetService, assetVisitor, logger, repository| Constructor and Description |
|---|
WidgetResource(JacksonObjectMapper objectMapper,
WidgetRepository widgetRepository,
WidgetService widgetService,
AssetService<Widget> widgetAssetService,
Path widgetPath,
List<WidgetContainerRepository> widgetContainerRepositories,
AssetVisitor assetVisitor) |
| Modifier and Type | Method and Description |
|---|---|
List<Property> |
addProperty(String widgetId,
Property property) |
protected void |
checkArtifactId(String artifactId) |
Widget |
create(Widget widget,
String sourceWidgetId) |
void |
delete(String widgetId) |
List<Property> |
deleteProperty(String widgetId,
String propertyName) |
void |
favorite(String pageId,
Boolean favorite) |
org.springframework.http.ResponseEntity<Object> |
get(String widgetId) |
org.springframework.http.ResponseEntity<String> |
getAll(String view) |
void |
save(String widgetId,
Widget widget) |
void |
serveWidgetFiles(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String widgetId) |
List<Property> |
updateProperty(String widgetId,
String propertyName,
Property property) |
assets, deleteAsset, downloadAsset, saveAsset, saveOrUpdate, updateAsset@Inject public WidgetResource(JacksonObjectMapper objectMapper, WidgetRepository widgetRepository, WidgetService widgetService, AssetService<Widget> widgetAssetService, @Named(value="widgetPath") Path widgetPath, List<WidgetContainerRepository> widgetContainerRepositories, AssetVisitor assetVisitor)
protected void checkArtifactId(String artifactId)
checkArtifactId in class AssetResource<Widget>@RequestMapping(method=GET) public org.springframework.http.ResponseEntity<String> getAll(@RequestParam(value="view",defaultValue="full") String view) throws RepositoryException, IOException
RepositoryExceptionIOException@RequestMapping(value="/{widgetId}",
method=GET)
public org.springframework.http.ResponseEntity<Object> get(@PathVariable(value="widgetId")
String widgetId)
throws RepositoryException,
NotAllowedException
@RequestMapping(method=POST) public Widget create(@RequestBody Widget widget, @RequestParam(value="duplicata",required=false) String sourceWidgetId) throws IllegalArgumentException
IllegalArgumentException@RequestMapping(value="/{widgetId}",
method=PUT)
public void save(@PathVariable(value="widgetId")
String widgetId,
@RequestBody
Widget widget)
throws RepositoryException,
NotAllowedException
@RequestMapping(value="/{widgetId}",
method=DELETE)
public void delete(@PathVariable(value="widgetId")
String widgetId)
throws RepositoryException,
NotFoundException,
NotAllowedException
@RequestMapping(value="/{widgetId}/properties",
method=POST)
public List<Property> addProperty(@PathVariable(value="widgetId")
String widgetId,
@RequestBody
Property property)
throws RepositoryException,
NotFoundException,
NotAllowedException
@RequestMapping(value="/{widgetId}/properties/{propertyName}",
method=PUT)
public List<Property> updateProperty(@PathVariable(value="widgetId")
String widgetId,
@PathVariable(value="propertyName")
String propertyName,
@RequestBody
Property property)
throws RepositoryException,
NotFoundException,
NotAllowedException
@RequestMapping(value="/{widgetId}/properties/{propertyName}",
method=DELETE)
public List<Property> deleteProperty(@PathVariable(value="widgetId")
String widgetId,
@PathVariable(value="propertyName")
String propertyName)
throws RepositoryException,
NotFoundException,
NotAllowedException
@RequestMapping(value="/{widgetId}/favorite",
method=PUT)
public void favorite(@PathVariable(value="widgetId")
String pageId,
@RequestBody
Boolean favorite)
throws RepositoryException
RepositoryException@RequestMapping(value="/{widgetId}/help",
method=GET,
produces="text/html; charset=UTF-8")
public void serveWidgetFiles(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
@PathVariable(value="widgetId")
String widgetId)
throws IOException
IOExceptionCopyright © 2020. All rights reserved.