Package org.hippoecm.frontend.util
Class DocumentReferenceUtils
java.lang.Object
org.hippoecm.frontend.util.DocumentReferenceUtils
Utility class for document reference related operations.
-
Method Summary
Modifier and TypeMethodDescriptiongetComponentVariants
(ComponentReference reference, String locale) Returns the set of variants for the givenComponentReference
.getReferencingXPageComponents
(Node handle, String channelRootPath, boolean preview) getReferredDocuments
(Node variant) Returns the list of 1st level referred documents by the given documentvariant
.static List<SiteReference>
getSiteReferences
(Node handle, String hostGroup, boolean preview) Returns the list ofSiteReference
s for the given documenthandle
.
-
Method Details
-
getReferencingXPageComponents
public static List<Node> getReferencingXPageComponents(Node handle, String channelRootPath, boolean preview) throws RepositoryException - Parameters:
handle
- document handlehstSite
- the site to search the document on- Returns:
- list of xpage component nodes
- Throws:
RepositoryException
-
getReferredDocuments
Returns the list of 1st level referred documents by the given documentvariant
.- 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 ofSiteReference
s for the given documenthandle
.- Parameters:
handle
- document handlehostGroup
- host group of the caller- Returns:
- list of site references
- Throws:
RepositoryException
-
getComponentVariants
Returns the set of variants for the givenComponentReference
.- Parameters:
reference
- the component referencelocale
- the locale- Returns:
- set of component variants
-