@ POST @ Path ( "load/{repository}/{workspace}/{path:.*}" ) @ RolesAllowed ( { "administrators" } ) public Response load ( @ PathParam ( "repository" ) String repository , @ PathParam ( "workspace" ) String workspace , @ PathParam ( "path" ) String path , @ DefaultValue ( "true" ) @ QueryParam ( "state" ) boolean state , @ QueryParam ( "sources" ) List < String > sources , @ QueryParam ( "file" ) List < String > files , MultivaluedMap < String , String > properties ) { try { return load ( repository , workspace , path , state , properties , createSourceFolders ( sources ) , createSourceFiles ( files ) ) ; } catch ( MalformedURLException e ) { LOG . error ( e . getMessage ( ) , e ) ; return Response . status ( Response . Status . BAD_REQUEST ) . entity ( e . getMessage ( ) ) . type ( MediaType . TEXT_PLAIN ) . build ( ) ; } }
Deploy groovy script as REST service . If this property set to true then script will be deployed as REST service if false the script will be undeployed . NOTE is script already deployed and state is true script will be re - deployed .