Class LinksServiceImpl

  • All Implemented Interfaces:
    LinksService

    public class LinksServiceImpl
    extends java.lang.Object
    implements LinksService
    Since:
    4.0
    Author:
    Nick Burch (based on existing webscript controllers in the REST API)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LinkInfo createLink​(java.lang.String siteShortName, java.lang.String title, java.lang.String description, java.lang.String url, boolean internal)
      Creates a new LinkInfo in the given site, with the specified settings
      void deleteLink​(LinkInfo link)
      Deletes an existing LinkInfo from the repository
      org.alfresco.query.PagingResults<LinkInfo> findLinks​(java.lang.String siteShortName, java.lang.String user, java.util.Date from, java.util.Date to, java.lang.String tag, org.alfresco.query.PagingRequest paging)
      Finds all LinkInfo instances indexed in the repository for the given site, created by the specified user in the specified date range, with the given tag
      LinkInfo getLink​(java.lang.String siteShortName, java.lang.String linkName)
      Retrieves an existing LinkInfo from the repository
      protected org.alfresco.service.cmr.repository.NodeRef getSiteLinksContainer​(java.lang.String siteShortName, boolean create)
      Fetches the Links Container on a site, creating as required if requested.
      org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName, java.lang.String user, org.alfresco.query.PagingRequest paging)
      Retrieves all LinkInfo instances in the repository for the given site and the specified user.
      org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName, java.util.Date from, java.util.Date to, org.alfresco.query.PagingRequest paging)
      Retrieves all LinkInfo instances in the repository for the given site, created in the specified date range
      org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName, org.alfresco.query.PagingRequest paging)
      Retrieves all LinkInfo instances in the repository for the given site.
      void setCannedQueryRegistry​(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<? extends java.lang.Object>> cannedQueryRegistry)
      Set the registry of canned queries
      void setContentService​(ContentService contentService)  
      void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)  
      void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)  
      void setNodeDAO​(NodeDAO nodeDAO)  
      void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)  
      void setSearchService​(org.alfresco.service.cmr.search.SearchService searchService)  
      void setSiteService​(SiteService siteService)  
      void setTaggingService​(TaggingService taggingService)  
      void setTransactionService​(TransactionService transactionService)  
      LinkInfo updateLink​(LinkInfo link)
      Updates an existing LinkInfo in the repository.
      • Methods inherited from class java.lang.Object

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

      • CANNED_QUERY_GET_CHILDREN

        protected static final java.lang.String CANNED_QUERY_GET_CHILDREN
        See Also:
        Constant Field Values
    • Constructor Detail

      • LinksServiceImpl

        public LinksServiceImpl()
    • Method Detail

      • setNodeDAO

        public void setNodeDAO​(NodeDAO nodeDAO)
      • setNodeService

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

        public void setSiteService​(SiteService siteService)
      • setSearchService

        public void setSearchService​(org.alfresco.service.cmr.search.SearchService searchService)
      • setContentService

        public void setContentService​(ContentService contentService)
      • setTaggingService

        public void setTaggingService​(TaggingService taggingService)
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • setCannedQueryRegistry

        public void setCannedQueryRegistry​(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<? extends java.lang.Object>> cannedQueryRegistry)
        Set the registry of canned queries
      • getSiteLinksContainer

        protected org.alfresco.service.cmr.repository.NodeRef getSiteLinksContainer​(java.lang.String siteShortName,
                                                                                    boolean create)
        Fetches the Links Container on a site, creating as required if requested.
      • getLink

        public LinkInfo getLink​(java.lang.String siteShortName,
                                java.lang.String linkName)
        Description copied from interface: LinksService
        Retrieves an existing LinkInfo from the repository
        Specified by:
        getLink in interface LinksService
      • createLink

        public LinkInfo createLink​(java.lang.String siteShortName,
                                   java.lang.String title,
                                   java.lang.String description,
                                   java.lang.String url,
                                   boolean internal)
        Description copied from interface: LinksService
        Creates a new LinkInfo in the given site, with the specified settings
        Specified by:
        createLink in interface LinksService
        Returns:
        The newly created LinkInfo
      • listLinks

        public org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName,
                                                                    org.alfresco.query.PagingRequest paging)
        Description copied from interface: LinksService
        Retrieves all LinkInfo instances in the repository for the given site.
        Specified by:
        listLinks in interface LinksService
      • listLinks

        public org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName,
                                                                    java.lang.String user,
                                                                    org.alfresco.query.PagingRequest paging)
        Description copied from interface: LinksService
        Retrieves all LinkInfo instances in the repository for the given site and the specified user.
        Specified by:
        listLinks in interface LinksService
      • listLinks

        public org.alfresco.query.PagingResults<LinkInfo> listLinks​(java.lang.String siteShortName,
                                                                    java.util.Date from,
                                                                    java.util.Date to,
                                                                    org.alfresco.query.PagingRequest paging)
        Description copied from interface: LinksService
        Retrieves all LinkInfo instances in the repository for the given site, created in the specified date range
        Specified by:
        listLinks in interface LinksService
      • findLinks

        public org.alfresco.query.PagingResults<LinkInfo> findLinks​(java.lang.String siteShortName,
                                                                    java.lang.String user,
                                                                    java.util.Date from,
                                                                    java.util.Date to,
                                                                    java.lang.String tag,
                                                                    org.alfresco.query.PagingRequest paging)
        Description copied from interface: LinksService
        Finds all LinkInfo instances indexed in the repository for the given site, created by the specified user in the specified date range, with the given tag
        Specified by:
        findLinks in interface LinksService