Package org.alfresco.repo.jscript
Class ApplicationScriptUtils
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.jscript.BaseScopableProcessorExtension
org.alfresco.repo.jscript.ApplicationScriptUtils
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension,Scopeable
Utility functions specifically for external application use.
- Author:
- Mike Hatfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDownloadAPIUrl(ScriptNode node) voidsetJsonConversionComponent(JSONConversionComponent jsonConversionComponent) toJSON(ScriptNode node) Returns the JSON representation of a node.toJSON(ScriptNode node, boolean useShortQNames) Returns the JSON representation of this node.Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScopeMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
Constructor Details
-
ApplicationScriptUtils
public ApplicationScriptUtils()
-
-
Method Details
-
setJsonConversionComponent
- Parameters:
jsonConversionComponent- JSON conversion component
-
toJSON
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
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
- 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
-