Class CommentsController<T extends SocialUgc>

    • Constructor Detail

      • CommentsController

        public CommentsController()
    • Method Detail

      • create

        @RequestMapping(method=POST)
        @ResponseBody
        public T create​(@RequestParam
                        String body,
                        @RequestParam
                        String thread,
                        @RequestParam(required=false,defaultValue="")
                        String parent,
                        @RequestParam(required=false,defaultValue="false",value="anonymous")
                        boolean anonymous,
                        @RequestParam(required=false,defaultValue="",value="subject")
                        String subject,
                        @RequestParam(required=false,defaultValue="{}")
                        String attributes,
                        org.springframework.web.multipart.MultipartFile attachment)
                 throws SocialException,
                        org.springframework.web.bind.MissingServletRequestParameterException,
                        IOException
        Throws:
        SocialException
        org.springframework.web.bind.MissingServletRequestParameterException
        IOException
      • update

        @RequestMapping(value="{id}",
                        method=PUT)
        @ResponseBody
        public T update​(@PathVariable("id")
                        String id,
                        @RequestParam
                        String body,
                        @RequestParam(required=false,defaultValue="{}")
                        String attributes)
                 throws SocialException,
                        org.springframework.web.bind.MissingServletRequestParameterException,
                        UGCNotFound
        Throws:
        SocialException
        org.springframework.web.bind.MissingServletRequestParameterException
        UGCNotFound
      • updatePost

        @RequestMapping(value="{id}/update",
                        method=POST)
        @ResponseBody
        public T updatePost​(@PathVariable("id")
                            String id,
                            @RequestParam
                            String body,
                            @RequestParam(required=false,defaultValue="{}")
                            String attributes)
                     throws SocialException,
                            org.springframework.web.bind.MissingServletRequestParameterException,
                            UGCNotFound
        Throws:
        SocialException
        org.springframework.web.bind.MissingServletRequestParameterException
        UGCNotFound
      • deletePost

        @RequestMapping(value="{id}/delete",
                        method=POST)
        @ResponseBody
        public boolean deletePost​(@PathVariable("id")
                                  String id)
                           throws SocialException
        Throws:
        SocialException
      • removeAttributes

        @RequestMapping(value="{id}/attributes",
                        method=DELETE)
        @ResponseBody
        public boolean removeAttributes​(@PathVariable("id")
                                        String id,
                                        @RequestParam
                                        String attributes)
                                 throws SocialException
        Throws:
        SocialException
      • removeAttributesPost

        @RequestMapping(value="{id}/attributes/delete",
                        method=POST)
        @ResponseBody
        public boolean removeAttributesPost​(@PathVariable("id")
                                            String id,
                                            @RequestParam
                                            String attributes)
                                     throws SocialException
        Throws:
        SocialException
      • unflagUgc

        @RequestMapping(value="{id}/flags/{flagId}",
                        method={POST,DELETE})
        @ResponseBody
        public boolean unflagUgc​(@PathVariable("id")
                                 String id,
                                 @PathVariable("flagId")
                                 String flagId)
                          throws SocialException
        Throws:
        SocialException
      • byStatus

        @RequestMapping(value="moderation/{status}",
                        method=GET)
        @ResponseBody
        public Iterable<T> byStatus​(@PathVariable("status")
                                    ModerationStatus status,
                                    @RequestParam(defaultValue="",required=false)
                                    String thread,
                                    @RequestParam(required=false,defaultValue="0")
                                    int pageNumber,
                                    @RequestParam(required=false,defaultValue="666")
                                    int pageSize,
                                    @RequestParam(required=false)
                                    List<String> sortBy,
                                    @RequestParam(required=false)
                                    List<SocialSortOrder> sortOrder)
                             throws UGCException
        Throws:
        UGCException
      • flagged

        @RequestMapping(value="flagged",
                        method=GET)
        @ResponseBody
        public Iterable<T> flagged​(@RequestParam(required=false,defaultValue="0")
                                   int pageNumber,
                                   @RequestParam(required=false,defaultValue="666")
                                   int pageSize,
                                   @RequestParam(required=false)
                                   List<String> sortBy,
                                   @RequestParam(required=false)
                                   List<SocialSortOrder> sortOrder)
                            throws UGCException
        Throws:
        UGCException
      • flaggedCount

        @RequestMapping(value="flagged/count",
                        method=GET)
        @ResponseBody
        public long flaggedCount​(@RequestParam(required=false,defaultValue="0")
                                 int pageNumber,
                                 @RequestParam(required=false,defaultValue="666")
                                 int pageSize,
                                 @RequestParam(required=false)
                                 List<String> sortBy,
                                 @RequestParam(required=false)
                                 List<SocialSortOrder> sortOrder)
                          throws UGCException
        Throws:
        UGCException
      • byStatusCount

        @RequestMapping(value="moderation/{status}/count",
                        method=GET)
        @ResponseBody
        public long byStatusCount​(@PathVariable("status")
                                  ModerationStatus status,
                                  @RequestParam(defaultValue="",required=false)
                                  String thread)
                           throws UGCException
        Throws:
        UGCException
      • checkAnonymous

        protected boolean checkAnonymous​(boolean anonymous)