public boolean deleteApplication ( String appName , String key ) { Utils . require ( ! m_restClient . isClosed ( ) , "Client has been closed" ) ; Utils . require ( appName != null && appName . length ( ) > 0 , "appName" ) ; try { // Send a DELETE request to "/_applications/{application}/{key}". StringBuilder uri = new StringBuilder ( Utils . isEmpty ( m_apiPrefix ) ? "" : "/" + m_apiPrefix ) ; uri . append ( "/_applications/" ) ; uri . append ( Utils . urlEncode ( appName ) ) ; if ( ! Utils . isEmpty ( key ) ) { uri . append ( "/" ) ; uri . append ( Utils . urlEncode ( key ) ) ; } RESTResponse response = m_restClient . sendRequest ( HttpMethod . DELETE , uri . toString ( ) ) ; m_logger . debug ( "deleteApplication() response: {}" , response . toString ( ) ) ; if ( response . getCode ( ) != HttpCode . NOT_FOUND ) { // Notfound is acceptable throwIfErrorResponse ( response ) ; } return true ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Delete an existing application from the current Doradus tenant including all of its tables and data . Because updates are idempotent deleting an already - deleted application is acceptable . Hence if no error is thrown the result is always true . An exception is thrown if an error occurs .