public void exportDataSetExcel ( final DataSetLookup request , final DataSetExportReadyCallback listener ) throws Exception { if ( dataSetLookupServices != null ) { // Look always into the client data set manager. if ( clientDataSetManager . getDataSet ( request . getDataSetUUID ( ) ) != null ) { DataSet dataSet = clientDataSetManager . lookupDataSet ( request ) ; try { dataSetExportServices . call ( new RemoteCallback < Path > ( ) { public void callback ( Path excelFilePath ) { listener . exportReady ( excelFilePath ) ; } } ) . exportDataSetExcel ( dataSet ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } // Data set not found on client. else { // If the data set is not in client, then look up remotely (only if the remote access is available). try { dataSetExportServices . call ( new RemoteCallback < Path > ( ) { public void callback ( Path excelFilePath ) { listener . exportReady ( excelFilePath ) ; } } , new ErrorCallback < Message > ( ) { public boolean error ( Message message , Throwable throwable ) { listener . onError ( new ClientRuntimeError ( throwable ) ) ; return true ; } } ) . exportDataSetExcel ( request ) ; } catch ( Exception e ) { listener . onError ( new ClientRuntimeError ( e ) ) ; } } } else { listener . onError ( new ClientRuntimeError ( CommonConstants . INSTANCE . exc_no_client_side_data_export ( ) ) ) ; } }
Export a data set specified by a data set lookup request to Excel format .