Class AbstractLinksWebScript

  • All Implemented Interfaces:
    org.springframework.extensions.webscripts.WebScript
    Direct Known Subclasses:
    LinkDelete, LinkGet, LinkPut, LinksDeletePost, LinksListGet, LinksPost

    public abstract class AbstractLinksWebScript
    extends org.springframework.extensions.webscripts.DeclarativeWebScript
    Since:
    4.0
    Author:
    Nick Burch
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript

        org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addActivityEntry​(java.lang.String event, org.alfresco.service.cmr.links.LinkInfo link, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json)
      Generates an activity entry for the link
      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
      protected abstract java.util.Map<java.lang.String,​java.lang.Object> executeImpl​(org.alfresco.service.cmr.site.SiteInfo site, java.lang.String linkName, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)  
      protected java.util.Map<java.lang.String,​java.lang.Object> executeImpl​(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)  
      protected java.lang.String getOrNull​(org.json.simple.JSONObject json, java.lang.String key)  
      protected java.util.List<java.lang.String> getTags​(org.json.simple.JSONObject json)  
      protected java.util.Map<java.lang.String,​java.lang.Object> renderLink​(org.alfresco.service.cmr.links.LinkInfo link)  
      void setActivityService​(org.alfresco.service.cmr.activities.ActivityService activityService)  
      void setLinksService​(org.alfresco.service.cmr.links.LinksService linksService)  
      void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)  
      void setPersonService​(org.alfresco.service.cmr.security.PersonService personService)  
      void setProtocolsWhiteList​(java.lang.String protocolsWhiteList)  
      void setSiteService​(org.alfresco.service.cmr.site.SiteService siteService)  
      void setXssRegexp​(java.util.ArrayList<java.lang.String> xssRegexp)  
      • Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript

        execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
      • Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript

        addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LINKS_SERVICE_ACTIVITY_APP_NAME

        public static final java.lang.String LINKS_SERVICE_ACTIVITY_APP_NAME
        See Also:
        Constant Field Values
      • nodeService

        protected org.alfresco.service.cmr.repository.NodeService nodeService
      • siteService

        protected org.alfresco.service.cmr.site.SiteService siteService
      • linksService

        protected org.alfresco.service.cmr.links.LinksService linksService
      • personService

        protected org.alfresco.service.cmr.security.PersonService personService
      • activityService

        protected org.alfresco.service.cmr.activities.ActivityService activityService
    • Constructor Detail

      • AbstractLinksWebScript

        public AbstractLinksWebScript()
    • Method Detail

      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setSiteService

        public void setSiteService​(org.alfresco.service.cmr.site.SiteService siteService)
      • setLinksService

        public void setLinksService​(org.alfresco.service.cmr.links.LinksService linksService)
      • setPersonService

        public void setPersonService​(org.alfresco.service.cmr.security.PersonService personService)
      • setActivityService

        public void setActivityService​(org.alfresco.service.cmr.activities.ActivityService activityService)
      • setProtocolsWhiteList

        public void setProtocolsWhiteList​(java.lang.String protocolsWhiteList)
      • setXssRegexp

        public void setXssRegexp​(java.util.ArrayList<java.lang.String> xssRegexp)
      • getOrNull

        protected java.lang.String getOrNull​(org.json.simple.JSONObject json,
                                             java.lang.String key)
      • getTags

        protected java.util.List<java.lang.String> getTags​(org.json.simple.JSONObject json)
      • 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
      • addActivityEntry

        protected void addActivityEntry​(java.lang.String event,
                                        org.alfresco.service.cmr.links.LinkInfo link,
                                        org.alfresco.service.cmr.site.SiteInfo site,
                                        org.springframework.extensions.webscripts.WebScriptRequest req,
                                        org.json.simple.JSONObject json)
        Generates an activity entry for the link
      • renderLink

        protected java.util.Map<java.lang.String,​java.lang.Object> renderLink​(org.alfresco.service.cmr.links.LinkInfo link)
      • executeImpl

        protected java.util.Map<java.lang.String,​java.lang.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 java.util.Map<java.lang.String,​java.lang.Object> executeImpl​(org.alfresco.service.cmr.site.SiteInfo site,
                                                                                              java.lang.String linkName,
                                                                                              org.springframework.extensions.webscripts.WebScriptRequest req,
                                                                                              org.json.simple.JSONObject json,
                                                                                              org.springframework.extensions.webscripts.Status status,
                                                                                              org.springframework.extensions.webscripts.Cache cache)