@RestController
@RequestMapping(value="/api/v1")
public class ContentResource
extends java.lang.Object
Constructor and Description |
---|
ContentResource() |
Modifier and Type | Method and Description |
---|---|
org.springframework.data.domain.Page<Content> |
assignedContent(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params,
org.springframework.data.domain.Pageable pageable) |
long |
assignedCount(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params) |
long |
contentCount(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params) |
Content |
getContent(java.lang.String id) |
org.springframework.data.domain.Page<Content> |
getContentHistory(java.lang.String id,
org.springframework.data.domain.Pageable pageable) |
Content |
getContentHistoryVersion(java.lang.String id,
int version) |
org.springframework.data.domain.Page<Content> |
listContent(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params,
org.springframework.data.domain.Pageable pageable) |
long |
mineCount(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params) |
org.springframework.data.domain.Page<Content> |
myCountent(java.lang.String q,
java.util.Map<java.lang.String,java.lang.String> params,
org.springframework.data.domain.Pageable pageable) |
Content |
postContent(@Valid ContentSubmission contentSubmission) |
Content |
postContentMultipart(org.springframework.web.multipart.MultipartHttpServletRequest request,
java.lang.String content) |
Content |
revertToVersion(java.lang.String id,
int version) |
org.springframework.http.ResponseEntity<ValidationResult> |
validationException(FieldValidationException e) |
org.springframework.http.ResponseEntity<?> |
validationException(OptimisticLockingException e) |
org.springframework.http.ResponseEntity<?> |
validationException(PermissionException e) |
org.springframework.http.ResponseEntity<?> |
validationException(SubmissionValidationException e) |
@PostMapping(value="content") public Content postContent(@Valid @RequestBody @Valid ContentSubmission contentSubmission)
@PostMapping(value="content", consumes="multipart/form-data") public Content postContentMultipart(org.springframework.web.multipart.MultipartHttpServletRequest request, @RequestParam(value="content") java.lang.String content) throws java.io.IOException
java.io.IOException
@GetMapping(value="content/{id}") public Content getContent(@PathVariable(value="id") java.lang.String id)
@GetMapping(value="content/{id}/history") public org.springframework.data.domain.Page<Content> getContentHistory(@PathVariable(value="id") java.lang.String id, @PageableDefault(sort="modified",direction=DESC) org.springframework.data.domain.Pageable pageable)
@GetMapping(value="content/{id}/history/{version}") public Content getContentHistoryVersion(@PathVariable(value="id") java.lang.String id, @PathVariable(value="version") int version)
@PostMapping(value="content/{id}/history/{version}") public Content revertToVersion(@PathVariable(value="id") java.lang.String id, @PathVariable(value="version") int version)
@GetMapping(value="content") public org.springframework.data.domain.Page<Content> listContent(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params, @PageableDefault(sort="modified",direction=DESC) org.springframework.data.domain.Pageable pageable)
@GetMapping(value="assigned") public org.springframework.data.domain.Page<Content> assignedContent(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params, @PageableDefault(sort="modified",direction=DESC) org.springframework.data.domain.Pageable pageable)
@GetMapping(value="mine") public org.springframework.data.domain.Page<Content> myCountent(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params, @PageableDefault(sort="modified",direction=DESC) org.springframework.data.domain.Pageable pageable)
@GetMapping(value="content-count") public long contentCount(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params)
@GetMapping(value="assigned-count") public long assignedCount(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params)
@GetMapping(value="mine-count") public long mineCount(@RequestParam(value="q",required=false) java.lang.String q, @RequestParam java.util.Map<java.lang.String,java.lang.String> params)
@ExceptionHandler(value=FieldValidationException.class) public org.springframework.http.ResponseEntity<ValidationResult> validationException(FieldValidationException e)
@ExceptionHandler(value=OptimisticLockingException.class) public org.springframework.http.ResponseEntity<?> validationException(OptimisticLockingException e)
@ExceptionHandler(value=PermissionException.class) public org.springframework.http.ResponseEntity<?> validationException(PermissionException e)
@ExceptionHandler(value=SubmissionValidationException.class) public org.springframework.http.ResponseEntity<?> validationException(SubmissionValidationException e)