Professional Documents
Culture Documents
Overview(http://docs.alfresco.com/4.0/concepts/systemabout.html)
HowTovideos(http://docs.alfresco.com/4.0/topics/alfrescovideotutorials.html)
GettingStartedtutorials(http://docs.alfresco.com/4.0/concepts/mastergsintro.html)
Installing(http://docs.alfresco.com/4.0/concepts/masterchinstall.html)
Upgrading(http://docs.alfresco.com/4.0/concepts/chupgrade.html)
Administering(http://docs.alfresco.com/4.0/concepts/chadministering.html)
UsingAlfresco(http://docs.alfresco.com/4.0/concepts/masterusingintro.html)
Customizing(http://docs.alfresco.com/4.0/concepts/chcustomize.html)
Programming(http://docs.alfresco.com/4.0/concepts/programmingintro.html)
IntegratingyourapplicationwithAlfresco(http://docs.alfresco.com/4.0/concepts/integrationoptions.html)
Designingyourapplication(http://docs.alfresco.com/4.0/concepts/alfrescoconsiderations.html)
ProgrammingwithCMIS(http://docs.alfresco.com/4.0/concepts/cmisabout.html)
Configuringtherepository(http://docs.alfresco.com/4.0/concepts/introcore.html?m=2)
ProgrammingwithAlfrescoservices(http://docs.alfresco.com/4.0/concepts/servusingabout.html)
ProgrammingwithSurf(http://docs.alfresco.com/4.0/concepts/surffworkintro.html)
WebScripts(http://docs.alfresco.com/4.0/concepts/wsarchitecture.html)
AlfrescoAPIReference(http://docs.alfresco.com/4.0/concepts/APIintro4.html)
RepositoryJavaScriptAPI(http://docs.alfresco.com/4.0/concepts/APIJSintro.html)
Aboutscriptfiles(http://docs.alfresco.com/4.0/concepts/APIJSScripts.html)
ScriptingAPI(http://docs.alfresco.com/4.0/references/APIJSScriptingAPI.html)
Rootobjects(http://docs.alfresco.com/4.0/references/APIJSrootscoped.html)
ScriptNodeObjectAPI(http://docs.alfresco.com/4.0/references/APIJSScriptNode.html)
SearchAPI(http://docs.alfresco.com/4.0/references/APIJSSearch.html)
PeopleAPI(http://docs.alfresco.com/4.0/references/APIJSPeople.html)
ActionsAPI(http://docs.alfresco.com/4.0/references/APIJSActions.html)
ScriptActionAPI(http://docs.alfresco.com/4.0/references/APIJSScriptAction.html)
LoggingAPI(http://docs.alfresco.com/4.0/references/APIJSLogging.html)
SessionAPI(http://docs.alfresco.com/4.0/references/APIJSSession.html)
ClassificationAPI(http://docs.alfresco.com/4.0/references/APIJSClassification.html)
AVMAPI(http://docs.alfresco.com/4.0/references/APIJSAVM.html)
WCMWebProjects(http://docs.alfresco.com/4.0/references/APIJSWCMWebProjects.html)
Utilitymethods(http://docs.alfresco.com/4.0/references/APIJSUtility.html)
ServicesAPI(http://docs.alfresco.com/4.0/references/APIJSServices.html)
RESTfulAPIreference(http://docs.alfresco.com/4.0/references/RESTfulintro.html)
RepositoryFreeMarkerTemplatereference(http://docs.alfresco.com/4.0/references/APIFreeMarkerintro.html)
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 1/10
02/02/2017 Rootobjects|AlfrescoDocumentation
SurfPlatformAPIreference(http://docs.alfresco.com/4.0/references/APISurfPlatformintro.html)
Troubleshooting(http://docs.alfresco.com/4.0/concepts/chtroubleshoot.html)
Reference(http://docs.alfresco.com/4.0/concepts/chreference.html)
Copyright(http://docs.alfresco.com/4.0/reuse/copyright.html)
Disclaimer(http://docs.alfresco.com/4.0/reuse/disclaimer.html)
AlfrescoEnterprise4.0.2(http://docs.alfresco.com/4.0/concepts/welcomeinfocenter.html)Programming
(http://docs.alfresco.com/4.0/concepts/programmingintro.html)AlfrescoAPIReference
(http://docs.alfresco.com/4.0/concepts/APIintro4.html)RepositoryJavaScriptAPI
(http://docs.alfresco.com/4.0/concepts/APIJSintro.html)ScriptingAPI
(http://docs.alfresco.com/4.0/references/APIJSScriptingAPI.html)
Root objects
TheJavaScriptAPIprovidesanumberofrootobjectswhichareavailablefromyourJavaScriptcode.
Therootobjectshavevarioustypes,dependingonwhichpartofthesystemtheyexpose.Forexample,thecommon
Alfrescorepositoryconcepts,suchastheCompanyHomefolderandtheloggedinuser,arerepresentedthrough
objectsoftypeScriptNode.TheseobjectssupportthefullrangeofpropertiesandobjectorientedAPIofthe
ScriptNodeclass.
Dependingonthecontextinwhichthescriptisinvoked,othertypesofrootobjectmaybeavailablethatrepresent
aspectsofthesystemsuchasserverdetails,userinformation,requestheadersandparameterspassedtothe
script.Further,avarietyofAlfrescoservicesareaccessiblefromyourJavaScriptcode,eachoftheseserviceshasa
correspondingrootobject,onwhichpropertiescanbeaccessedandavarietyofmethodscalledasdictatedbythe
service'sAPI.
TherootobjectsavailabletoyourJavaScriptcodewilldependonthecontextinwhichthecodeisinvoked.Different
contextswillhaveaccesstoadifferentsetofrootobjects.Thereareseveralcontextstobeconsidered:
Webscripts
Surf
Rules/actions
Workflow
Explorer
Thissectionofthereferencedocumentationlooksatthemostcommonlyusedrootobjects.Morespecializedroot
objectsaredescribedinmoredetailintherelevantsectionsofthisdocumentation.
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 2/10
02/02/2017 Rootobjects|AlfrescoDocumentation
FurtherinformationonrootobjectsprovidedbyservicesandtheexposedAPIscanbefoundintheServicesAPI
reference(APIJSServices.html).
Seealsotherelatedlinksattheendofthissection.
Root TypeinScript
Object Runtime Description
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 3/10
02/02/2017 Rootobjects|AlfrescoDocumentation
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 4/10
02/02/2017 Rootobjects|AlfrescoDocumentation
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 5/10
02/02/2017 Rootobjects|AlfrescoDocumentation
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 6/10
02/02/2017 Rootobjects|AlfrescoDocumentation
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 8/10
02/02/2017 Rootobjects|AlfrescoDocumentation
Parenttopic:ScriptingAPI(../references/APIJSScriptingAPI.html)
Relatedconcepts
Webscriptreference(../concepts/devwsreference.html)
Relatedreference
Rootscopedobjects(APISurfrootscoped.html)
Displayaprinterfriendlyversionofthispage(/print/book/export/html/1057562)
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 9/10
02/02/2017 Rootobjects|AlfrescoDocumentation
2ratings
First Last
2017AlfrescoSoftware,Inc.AllRightsReserved.Legal(http://www.alfresco.com/termsuse)|Privacy
Follow@alfrescodocs
(http://www.alfresco.com/privacy)|alfresco.com(http://www.alfresco.com)
http://docs.alfresco.com/4.0/references/APIJSrootscoped.html 10/10