Class AbstractDiscussionWebScript

    • Constructor Detail

      • AbstractDiscussionWebScript

        public AbstractDiscussionWebScript()
    • Method Detail

      • setNodeService

        public void setNodeService​(NodeService nodeService)
      • setSiteService

        public void setSiteService​(SiteService siteService)
      • setPersonService

        public void setPersonService​(PersonService personService)
      • setActivityService

        public void setActivityService​(ActivityService activityService)
      • setDiscussionService

        public void setDiscussionService​(DiscussionService discussionService)
      • setPermissionService

        public void setPermissionService​(PermissionService permissionService)
      • getOrNull

        protected String getOrNull​(org.json.simple.JSONObject json,
                                   String key)
      • buildPagingRequest

        protected org.alfresco.query.PagingRequest buildPagingRequest​(org.springframework.extensions.webscripts.WebScriptRequest req)
        Builds up a listing Paging request, based on the arguments specified in the URL
      • getTags

        protected List<String> getTags​(org.json.simple.JSONObject json)
      • addActivityEntry

        protected void addActivityEntry​(String thing,
                                        String event,
                                        TopicInfo topic,
                                        PostInfo post,
                                        SiteInfo site,
                                        org.springframework.extensions.webscripts.WebScriptRequest req,
                                        org.json.simple.JSONObject json)
        Generates an activity entry for the discussion item
        Parameters:
        thing - Either post or reply
        event - One of created, updated, deleted
      • canUserEditPost

        protected boolean canUserEditPost​(PostInfo post,
                                          SiteInfo site)
        Is the current user allowed to edit this post? In order to be deemed allowed, you first need write permissions on the underlying node of the post. You then also need to either be the cm:creator of the post node, or a site manager
      • buildPerson

        protected Object buildPerson​(String username)
      • renderTopics

        protected Map<String,​Object> renderTopics​(org.alfresco.query.PagingResults<TopicInfo> topics,
                                                        org.alfresco.query.PagingRequest paging,
                                                        SiteInfo site)
      • executeImpl

        protected Map<String,​Object> executeImpl​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                       org.springframework.extensions.webscripts.Status status,
                                                       org.springframework.extensions.webscripts.Cache cache)
        Overrides:
        executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScript
      • executeImpl

        protected abstract Map<String,​Object> executeImpl​(SiteInfo site,
                                                                NodeRef nodeRef,
                                                                TopicInfo topic,
                                                                PostInfo post,
                                                                org.springframework.extensions.webscripts.WebScriptRequest req,
                                                                org.json.simple.JSONObject json,
                                                                org.springframework.extensions.webscripts.Status status,
                                                                org.springframework.extensions.webscripts.Cache cache)