protected Node createScript ( Node parent , String name , boolean autoload , InputStream stream ) throws Exception { Node scriptFile = parent . addNode ( name , "nt:file" ) ; Node script = scriptFile . addNode ( "jcr:content" , getNodeType ( ) ) ; script . setProperty ( "exo:autoload" , autoload ) ; script . setProperty ( "jcr:mimeType" , "script/groovy" ) ; script . setProperty ( "jcr:lastModified" , Calendar . getInstance ( ) ) ; script . setProperty ( "jcr:data" , stream ) ; return scriptFile ; }
Create JCR node .