Class TemplateNode

    • Field Detail

      • nodeRef

        protected NodeRef nodeRef
        Cached values
    • Constructor Detail

      • TemplateNode

        public TemplateNode​(NodeRef nodeRef,
                            ServiceRegistry services,
                            TemplateImageResolver resolver)
        Constructor
        Parameters:
        nodeRef - The NodeRef this Node wrapper represents
        services - The ServiceRegistry the TemplateNode can use to access services
        resolver - Image resolver to use to retrieve icons
    • Method Detail

      • getStoreType

        public String getStoreType()
        Returns:
        the store type for the node
      • getStoreId

        public String getStoreId()
        Returns:
        the store id for the node
      • getExists

        public boolean getExists()
        Returns:
        true if this node still exists
      • getIsWorkingCopy

        public boolean getIsWorkingCopy()
        Returns:
        true if this node is a working copy
      • getParentTypeShort

        public String getParentTypeShort()
        Returns:
        Returns the type of the parent
      • getTypeShort

        public String getTypeShort()
        Returns:
        Returns the type in short format.
      • getAssocs

        public Map<String,​List<TemplateNode>> getAssocs()
        Returns:
        Target associations for this Node. As a Map of assoc name to a List of TemplateNodes.
      • getSourceAssocs

        public Map<String,​List<TemplateNode>> getSourceAssocs()
        Returns:
        Source associations for this Node. As a Map of assoc name to a List of TemplateNodes.
      • getChildAssocs

        public Map<String,​List<TemplateNode>> getChildAssocs()
        Returns:
        The child associations for this Node. As a Map of assoc name to a List of TemplateNodes.
      • getChildAssocsByType

        public List<TemplateNode> getChildAssocsByType​(String type)
        Returns:
        The list of children of this Node that match a specific object type.
      • getIsLocked

        public boolean getIsLocked()
        Returns:
        true if the node is currently locked
      • getIsCategory

        public boolean getIsCategory()
        Returns:
        true if the node is a Category instance
      • getPrimaryParentAssoc

        public ChildAssociationRef getPrimaryParentAssoc()
        Returns:
        the primary parent association so we can access the association QName and association type QName.
      • getXmlNodeModel

        public freemarker.ext.dom.NodeModel getXmlNodeModel()
        Returns:
        FreeMarker NodeModel for the XML content of this node, or null if no parsable XML found
      • getChildByNamePath

        public Map getChildByNamePath()
        Returns:
        A map capable of returning the TemplateNode at the specified Path as a child of this node.
      • getChildrenByXPath

        public Map getChildrenByXPath()
        Returns:
        A map capable of returning a List of TemplateNode objects from an XPath query as children of this node.
      • getChildrenBySavedSearch

        public Map getChildrenBySavedSearch()
        Returns:
        A map capable of returning a List of TemplateNode objects from an NodeRef to a Saved Search object. The Saved Search is executed and the resulting nodes supplied as a sequence.
      • getChildrenByLuceneSearch

        public Map getChildrenByLuceneSearch()
        Returns:
        A map capable of returning a List of TemplateNode objects from an NodeRef to a Lucene search string. The Saved Search is executed and the resulting nodes supplied as a sequence.
      • getNodeByReference

        public Map getNodeByReference()
        Returns:
        A map capable of returning a TemplateNode for a single specified NodeRef reference.
      • getImageResolver

        public TemplateImageResolver getImageResolver()
        Returns:
        the image resolver instance used by this node