Class SystemNodeUtils


  • public abstract class SystemNodeUtils
    extends java.lang.Object
    Utilities for working with System Nodes
    Since:
    4.1
    Author:
    Nick Burch
    • Constructor Summary

      Constructors 
      Constructor Description
      SystemNodeUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​java.lang.Boolean> getOrCreateSystemChildContainer​(org.alfresco.service.namespace.QName childName, org.alfresco.service.cmr.repository.NodeService nodeService, Repository repositoryHelper)
      Returns the NodeRef of a given Child Container within the current Tenant's System Container, creating the Container as System if required.
      static org.alfresco.service.cmr.repository.NodeRef getSystemChildContainer​(org.alfresco.service.namespace.QName childName, org.alfresco.service.cmr.repository.NodeService nodeService, Repository repositoryHelper)
      Returns the NodeRef of a given Child Container within the current Tenant's System Container, if found
      static java.util.List<org.alfresco.service.cmr.repository.NodeRef> getSystemChildContainers​(org.alfresco.service.namespace.QName childName, org.alfresco.service.cmr.repository.NodeService nodeService, Repository repositoryHelper)
      MNT-20212 Avoid using this method.
      static org.alfresco.service.cmr.repository.NodeRef getSystemContainer​(org.alfresco.service.cmr.repository.NodeService nodeService, Repository repositoryHelper)
      Returns the System Container for the current tenant
      • Methods inherited from class java.lang.Object

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

      • SystemNodeUtils

        public SystemNodeUtils()
    • Method Detail

      • getSystemContainer

        public static org.alfresco.service.cmr.repository.NodeRef getSystemContainer​(org.alfresco.service.cmr.repository.NodeService nodeService,
                                                                                     Repository repositoryHelper)
        Returns the System Container for the current tenant
      • getSystemChildContainer

        public static org.alfresco.service.cmr.repository.NodeRef getSystemChildContainer​(org.alfresco.service.namespace.QName childName,
                                                                                          org.alfresco.service.cmr.repository.NodeService nodeService,
                                                                                          Repository repositoryHelper)
        Returns the NodeRef of a given Child Container within the current Tenant's System Container, if found
      • getSystemChildContainers

        public static java.util.List<org.alfresco.service.cmr.repository.NodeRef> getSystemChildContainers​(org.alfresco.service.namespace.QName childName,
                                                                                                           org.alfresco.service.cmr.repository.NodeService nodeService,
                                                                                                           Repository repositoryHelper)
        MNT-20212 Avoid using this method. It is meant only to fix that bug reported in the MNT Returns the list with all the NodeRef of a given Child Container within the current Tenant's System Container, if found
      • getOrCreateSystemChildContainer

        public static org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,​java.lang.Boolean> getOrCreateSystemChildContainer​(org.alfresco.service.namespace.QName childName,
                                                                                                                                                  org.alfresco.service.cmr.repository.NodeService nodeService,
                                                                                                                                                  Repository repositoryHelper)
        Returns the NodeRef of a given Child Container within the current Tenant's System Container, creating the Container as System if required. The calling code should handle retries, locking etc.
        Returns:
        the Child Container NodeRef, and whether the Container has just been created