|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.jscript.BaseScopableProcessorExtension
org.alfresco.repo.jscript.ApplicationScriptUtils
public final class ApplicationScriptUtils
Utility functions specifically for external application use.
| Constructor Summary | |
|---|---|
ApplicationScriptUtils()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getDownloadAPIUrl(ScriptNode node)
|
protected java.lang.String |
getShortQName(org.alfresco.service.namespace.QName longQName)
Given a long-form QName, this method uses the namespace service to create a short-form QName string. |
protected java.util.Map |
parseToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map properties,
boolean useShortQNames)
Converts a map of node properties to a format suitable for JSON output |
void |
setDecoratedProperties(java.util.Map decoratedProperties)
Set the properties that require decorator beans |
void |
setServiceRegistry(ServiceRegistry serviceRegistry)
Set the service registry |
void |
setUserPermissions(java.lang.String[] userPermissions)
Define the list of user permissions to return in the JSON body |
java.lang.String |
toJSON(ScriptNode node)
Returns the JSON representation of a node. |
java.lang.String |
toJSON(ScriptNode node,
boolean useShortQNames)
Returns the JSON representation of this node. |
protected java.lang.Object |
toJSONObj(ScriptNode node,
boolean useShortQNames)
Returns a JSON object representing the node. |
| Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension |
|---|
getScope, setScope |
| Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension |
|---|
getExtensionName, register, setExtensionName, setProcessor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationScriptUtils()
| Method Detail |
|---|
public void setServiceRegistry(ServiceRegistry serviceRegistry)
serviceRegistry - the service registrypublic void setDecoratedProperties(java.util.Map decoratedProperties)
decoratedProperties - public void setUserPermissions(java.lang.String[] userPermissions)
userPermissions - public java.lang.String toJSON(ScriptNode node)
node - the node to convert to JSON representation.
public java.lang.String toJSON(ScriptNode node,
boolean useShortQNames)
node - the node to convert to JSON representation.useShortQNames - if true short-form qnames will be returned, else long-form.
protected java.lang.Object toJSONObj(ScriptNode node,
boolean useShortQNames)
node - the node to convert to JSON representation.useShortQNames - if true short-form qnames will be returned, else long-form.
protected java.lang.String getShortQName(org.alfresco.service.namespace.QName longQName)
longQName -
protected java.util.Map parseToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map properties,
boolean useShortQNames)
nodeRef - properties - useShortQNames -
public java.lang.String getDownloadAPIUrl(ScriptNode node)
node - the node to construct the download URL for
For a container node, this method returns an empty string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||