private void loadScript ( Node node ) throws Exception { ResourceId key = new NodeScriptKey ( repository . getConfiguration ( ) . getName ( ) , workspaceName , node ) ; ObjectFactory < AbstractResourceDescriptor > resource = groovyScript2RestLoader . groovyPublisher . unpublishResource ( key ) ; if ( resource != null ) { groovyScript2RestLoader . groovyPublisher . publishPerRequest ( node . getProperty ( "jcr:data" ) . getStream ( ) , key , resource . getObjectModel ( ) . getProperties ( ) ) ; } else { groovyScript2RestLoader . groovyPublisher . publishPerRequest ( node . getProperty ( "jcr:data" ) . getStream ( ) , key , null ) ; } }
Load script form supplied node .