Class SolrContentStore

  • All Implemented Interfaces:
    org.alfresco.repo.content.ContentStore

    public class SolrContentStore
    extends Object
    implements org.alfresco.repo.content.ContentStore
    A content store specific to SOLR's requirements: The URL is generated from a set of properties such as:
    • ACL ID
    • DB ID
    • Other metadata
    The URL, if not known, can be reliably regenerated using the SolrContentUrlBuilder.
    Since:
    5.0
    Author:
    Derek Hulley, Michael Suzuki
    • Field Detail

      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • SolrContentStore

        public SolrContentStore​(String solrHome)
        Constructor.
        Parameters:
        solrHome -
    • Method Detail

      • retrieveDocFromSolrContentStore

        public org.apache.solr.common.SolrInputDocument retrieveDocFromSolrContentStore​(String tenant,
                                                                                        long dbId)
                                                                                 throws IOException
        Retrieve document from SolrContentStore.
        Parameters:
        tenant - identifier
        dbId - identifier
        Returns:
        SolrInputDocument searched document
        Throws:
        IOException - if error
      • isContentUrlSupported

        public boolean isContentUrlSupported​(String contentUrl)
        Specified by:
        isContentUrlSupported in interface org.alfresco.repo.content.ContentStore
      • isWriteSupported

        public boolean isWriteSupported()
        Specified by:
        isWriteSupported in interface org.alfresco.repo.content.ContentStore
        Returns:
        true always
      • getSpaceFree

        public long getSpaceFree()
        Specified by:
        getSpaceFree in interface org.alfresco.repo.content.ContentStore
        Returns:
        -1 always
      • getSpaceTotal

        public long getSpaceTotal()
        Specified by:
        getSpaceTotal in interface org.alfresco.repo.content.ContentStore
        Returns:
        -1 always
      • getRootLocation

        public String getRootLocation()
        Specified by:
        getRootLocation in interface org.alfresco.repo.content.ContentStore
      • exists

        public boolean exists​(String contentUrl)
        Specified by:
        exists in interface org.alfresco.repo.content.ContentStore
      • getReader

        public org.alfresco.service.cmr.repository.ContentReader getReader​(String contentUrl)
        Specified by:
        getReader in interface org.alfresco.repo.content.ContentStore
      • getWriter

        public org.alfresco.service.cmr.repository.ContentWriter getWriter​(org.alfresco.repo.content.ContentContext context)
        Specified by:
        getWriter in interface org.alfresco.repo.content.ContentStore
      • delete

        public boolean delete​(String contentUrl)
        Specified by:
        delete in interface org.alfresco.repo.content.ContentStore
      • storeDocOnSolrContentStore

        public void storeDocOnSolrContentStore​(String tenant,
                                               long dbId,
                                               org.apache.solr.common.SolrInputDocument doc)
                                        throws IOException
        Stores a SolrInputDocument into Alfresco solr content store.
        Parameters:
        tenant -
        dbId -
        doc -
        Throws:
        IOException
      • storeDocOnSolrContentStore

        public void storeDocOnSolrContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData,
                                               org.apache.solr.common.SolrInputDocument doc)
                                        throws IOException
        Store SolrInputDocument in to Alfresco solr content store.
        Parameters:
        nodeMetaData - identifier
        doc - to store
        Throws:
        IOException - if error
      • removeDocFromContentStore

        public void removeDocFromContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData)
        Removes SolrInputDocument from Alfresco solr content store.
        Parameters:
        nodeMetaData -