Class ApplicationScriptUtils

    • Constructor Detail

      • ApplicationScriptUtils

        public ApplicationScriptUtils()
    • Method Detail

      • setJsonConversionComponent

        public void setJsonConversionComponent​(JSONConversionComponent jsonConversionComponent)
        Parameters:
        jsonConversionComponent - JSON conversion component
      • toJSON

        public String toJSON​(ScriptNode node)
        Returns the JSON representation of a node. Long-form QNames are used in the result.
        Parameters:
        node - the node to convert to JSON representation.
        Returns:
        The JSON representation of this node
      • toJSON

        public String toJSON​(ScriptNode node,
                             boolean useShortQNames)
        Returns the JSON representation of this node.
        Parameters:
        node - the node to convert to JSON representation.
        useShortQNames - if true short-form qnames will be returned, else long-form.
        Returns:
        The JSON representation of this node
      • getDownloadAPIUrl

        public String getDownloadAPIUrl​(ScriptNode node)
        Parameters:
        node - the node to construct the download URL for
        Returns:
        For a content document, this method returns the URL to the /api/node/content API for the default content property

        For a container node, this method returns an empty string