public void loadUnzippedApplicationTemplate ( String localFilePath ) throws ManagementWsException { this . logger . finer ( "Loading an application from a local directory: " + localFilePath ) ; WebResource path = this . resource . path ( UrlConstants . APPLICATIONS ) . path ( "templates" ) . path ( "local" ) ; if ( localFilePath != null ) path = path . queryParam ( "local-file-path" , localFilePath ) ; ClientResponse response = this . wsClient . createBuilder ( path ) . type ( MediaType . APPLICATION_JSON ) . post ( ClientResponse . class ) ; if ( Family . SUCCESSFUL != response . getStatusInfo ( ) . getFamily ( ) ) { String value = response . getEntity ( String . class ) ; this . logger . finer ( response . getStatusInfo ( ) + ": " + value ) ; throw new ManagementWsException ( response . getStatusInfo ( ) . getStatusCode ( ) , value ) ; } this . logger . finer ( String . valueOf ( response . getStatusInfo ( ) ) ) ; }
Loads an application template from a directory located on the DM s file system .