Class DocumentReferenceUtils

java.lang.Object
org.hippoecm.frontend.util.DocumentReferenceUtils

public class DocumentReferenceUtils extends Object
Utility class for document reference related operations.
  • Method Details

    • getReferencingXPageComponents

      public static List<Node> getReferencingXPageComponents(Node handle, String channelRootPath, boolean preview) throws RepositoryException
      Returns the list of xpage component nodes by the given document handle and HstSite.
      Parameters:
      handle - document handle
      hstSite - the site to search the document on
      Returns:
      list of xpage component nodes
      Throws:
      RepositoryException
    • getReferredDocuments

      public static List<Node> getReferredDocuments(Node variant) throws RepositoryException
      Returns the list of 1st level referred documents by the given document variant.
      Parameters:
      variant - document variant node
      Returns:
      list of referred document nodes
      Throws:
      RepositoryException
    • getSiteReferences

      public static List<SiteReference> getSiteReferences(Node handle, String hostGroup, boolean preview) throws RepositoryException
      Returns the list of SiteReferences for the given document handle.
      Parameters:
      handle - document handle
      hostGroup - host group of the caller
      Returns:
      list of site references
      Throws:
      RepositoryException
    • getComponentVariants

      public static Set<String> getComponentVariants(ComponentReference reference, String locale)
      Returns the set of variants for the given ComponentReference.
      Parameters:
      reference - the component reference
      locale - the locale
      Returns:
      set of component variants