Class Repository

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class Repository
    extends Object
    implements org.springframework.context.ApplicationContextAware
    Provision of Repository Context
    Author:
    davidc
    • Constructor Detail

      • Repository

        public Repository()
    • Method Detail

      • setCompanyHomeStore

        public void setCompanyHomeStore​(String companyHomeStore)
        Sets the Company Home Store
        Parameters:
        companyHomeStore - String
      • setCompanyHomePath

        public void setCompanyHomePath​(String companyHomePath)
        Sets the Company Home Path
        Parameters:
        companyHomePath - String
      • setSharedHomePath

        public void setSharedHomePath​(String sharedHomePath)
        Sets the Shared Home Path
        Parameters:
        sharedHomePath - String
      • setSingletonCache

        public void setSingletonCache​(org.alfresco.repo.cache.SimpleCache<String,​org.alfresco.service.cmr.repository.NodeRef> singletonCache)
      • setGuestHomePath

        public void setGuestHomePath​(String guestHomePath)
      • setTransactionHelper

        public void setTransactionHelper​(RetryingTransactionHelper retryingTransactionHelper)
        Sets helper that provides transaction callbacks
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
        Sets the namespace service
      • setSearchService

        public void setSearchService​(org.alfresco.service.cmr.search.SearchService searchService)
        Sets the search service
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
        Sets the node service
      • setFileFolderService

        public void setFileFolderService​(FileFolderService fileFolderService)
        Sets the file folder service
      • setPersonService

        public void setPersonService​(PersonService personService)
        Sets the person service
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.ApplicationEvent event)
      • initContext

        protected void initContext()
        Initialise Repository Context
      • getRootHome

        public org.alfresco.service.cmr.repository.NodeRef getRootHome()
        Gets the root home of the company home store
        Returns:
        root node ref
      • getCompanyHome

        public org.alfresco.service.cmr.repository.NodeRef getCompanyHome()
        Gets the Company Home. Note this is tenant-aware if the correct Cache is supplied.
        Returns:
        company home node ref
      • getGuestHome

        public org.alfresco.service.cmr.repository.NodeRef getGuestHome()
        Gets the Guest Home. Note this is tenant-aware if the correct Cache is supplied.
        Returns:
        guest home node ref
      • getSharedHome

        public org.alfresco.service.cmr.repository.NodeRef getSharedHome()
        Gets the Shared Home. Note this is tenant-aware if the correct Cache is supplied.
        Returns:
        shared home node ref
      • getPerson

        public org.alfresco.service.cmr.repository.NodeRef getPerson()
        Gets the currently authenticated person Includes any overlay authentication set by runas
        Returns:
        person node ref
      • getFullyAuthenticatedPerson

        public org.alfresco.service.cmr.repository.NodeRef getFullyAuthenticatedPerson()
        Gets the currently fully authenticated person, Excludes any overlay authentication set by runas
        Returns:
        person node ref
      • getUserHome

        public org.alfresco.service.cmr.repository.NodeRef getUserHome​(org.alfresco.service.cmr.repository.NodeRef person)
        Gets the user home of the currently authenticated person
        Parameters:
        person - person
        Returns:
        user home of person
      • findNodeRef

        public org.alfresco.service.cmr.repository.NodeRef findNodeRef​(String referenceType,
                                                                       String[] reference)
        Helper to convert a Web Script Request URL to a Node Ref

        1) Node - {store_type}/{store_id}/{node_id}
        Resolve to node via its Node Reference.
        2) Path - {store_type}/{store_id}/{path}
        Resolve to node via its display path.
        3) QName - {store_type}/{store_id}/{child_qname_path} TODO: Implement
        Resolve to node via its child qname path.

        Parameters:
        referenceType - one of node, path or qname
        Returns:
        reference array of reference segments (as described above for each reference type)