test_class.declarator: dataSetClientServices
test_class.modifier: @Mock
test_class.original_string: @Mock DataSetClientServices dataSetClientServices;
test_class.type: DataSetClientServices
test_class.var_name: dataSetClientServices
test_class.declarator: clientDataSetManager
test_class.modifier: @Mock
test_class.original_string: @Mock ClientDataSetManager clientDataSetManager;
test_class.type: ClientDataSetManager
test_class.var_name: clientDataSetManager
test_class.declarator: errorEvent
test_class.modifier: @Mock
test_class.original_string: @Mock EventSourceMock<ErrorEvent> errorEvent;
test_class.type: EventSourceMock<ErrorEvent>
test_class.var_name: errorEvent
test_class.declarator: dataSetDef
test_class.modifier: @Mock
test_class.original_string: @Mock DataSetDef dataSetDef;
test_class.type: DataSetDef
test_class.var_name: dataSetDef
test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock DataSetSummary.View view;
test_class.type: DataSetSummary.View
test_class.var_name: view
test_class.declarator: presenter
test_class.modifier: private
test_class.original_string: private DataSetSummary presenter;
test_class.type: DataSetSummary
test_class.var_name: presenter
test_class.declarator: dataSetMetadata = mock(DataSetMetadata.class)
test_class.modifier: final
test_class.original_string: final DataSetMetadata dataSetMetadata = mock(DataSetMetadata.class);
test_class.type: DataSetMetadata
test_class.var_name: dataSetMetadata
test_class.file: dashbuilder-client/dashbuilder-widgets/src/test/java/org/dashbuilder/client/widgets/dataset/explorer/DataSetSummaryTest.java
test_class.identifier: DataSetSummaryTest
test_case.body: @Test
      public void testShow() throws Exception {
          final int estimatedSize = 100;
          final int rowCount = 10;
          when(dataSetMetadata.getEstimatedSize()).thenReturn(estimatedSize);
          when(dataSetMetadata.getNumberOfRows()).thenReturn(rowCount);
          presenter.show(dataSetDef);
          verify(view, times(0)).init(presenter);
          verify(view, times(1)).showStatusPanel(true, true, true);
          verify(view, times(1)).showSizePanelIcon(any(IconType.class), anyString(), anyString(), anyBoolean());
          verify(view, times(1)).showSizePanel(anyString(), anyString());
      }
test_case.class_method_signature: DataSetSummaryTest.testShow()
test_case.full_signature: @Test public void testShow()
test_case.identifier: testShow
test_case.invocations: thenReturn when getEstimatedSize thenReturn when getNumberOfRows show init verify times showStatusPanel verify times showSizePanelIcon verify times any anyString anyString anyBoolean showSizePanel verify times anyString anyString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShow()
focal_class.declarator: ESTIMATIONS_FORMAT = "#,###.0"
focal_class.modifier: private final static
focal_class.original_string: private final static String ESTIMATIONS_FORMAT = "#,###.0";
focal_class.type: String
focal_class.var_name: ESTIMATIONS_FORMAT
focal_class.declarator: ICON_COLOR_DEFAULT = "black"
focal_class.modifier: private final static
focal_class.original_string: private final static String ICON_COLOR_DEFAULT = "black";
focal_class.type: String
focal_class.var_name: ICON_COLOR_DEFAULT
focal_class.declarator: ICON_COLOR_ERROR = "red"
focal_class.modifier: private final static
focal_class.original_string: private final static String ICON_COLOR_ERROR = "red";
focal_class.type: String
focal_class.var_name: ICON_COLOR_ERROR
focal_class.declarator: clientServices
focal_class.original_string: DataSetClientServices clientServices;
focal_class.type: DataSetClientServices
focal_class.var_name: clientServices
focal_class.declarator: errorEvent
focal_class.original_string: Event<ErrorEvent> errorEvent;
focal_class.type: Event<ErrorEvent>
focal_class.var_name: errorEvent
focal_class.declarator: view
focal_class.original_string: View view;
focal_class.type: View
focal_class.var_name: view
focal_class.file: dashbuilder-client/dashbuilder-widgets/src/main/java/org/dashbuilder/client/widgets/dataset/explorer/DataSetSummary.java
focal_class.identifier: DataSetSummary
focal_class.interfaces: implements IsWidget
focal_class.class_method_signature: DataSetSummary.DataSetSummary(final DataSetClientServices clientServices, 
                            final Event<ErrorEvent> errorEvent, 
                            final View view)
focal_class.full_signature: @Inject public  DataSetSummary(final DataSetClientServices clientServices, 
                            final Event<ErrorEvent> errorEvent, 
                            final View view)
focal_class.identifier: DataSetSummary
focal_class.modifiers: @Inject public
focal_class.parameters: (final DataSetClientServices clientServices, 
                            final Event<ErrorEvent> errorEvent, 
                            final View view)
focal_class.signature:  DataSetSummary(final DataSetClientServices clientServices, 
                            final Event<ErrorEvent> errorEvent, 
                            final View view)
focal_class.class_method_signature: DataSetSummary.init()
focal_class.full_signature: @PostConstruct public void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: DataSetSummary.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: DataSetSummary.show(final DataSetDef def)
focal_class.full_signature: public void show(final DataSetDef def)
focal_class.identifier: show
focal_class.modifiers: public
focal_class.parameters: (final DataSetDef def)
focal_class.return: void
focal_class.signature: void show(final DataSetDef def)
focal_class.class_method_signature: DataSetSummary.humanReadableByteCount(long bytes)
focal_class.full_signature:  String humanReadableByteCount(long bytes)
focal_class.identifier: humanReadableByteCount
focal_class.parameters: (long bytes)
focal_class.return: String
focal_class.signature: String humanReadableByteCount(long bytes)
focal_class.class_method_signature: DataSetSummary.humanReadableRowCount(long rows)
focal_class.full_signature:  String humanReadableRowCount(long rows)
focal_class.identifier: humanReadableRowCount
focal_class.parameters: (long rows)
focal_class.return: String
focal_class.signature: String humanReadableRowCount(long rows)
focal_class.class_method_signature: DataSetSummary.getMetadata(final DataSetDef def, final DataSetMetadataCallback callback)
focal_class.full_signature: private void getMetadata(final DataSetDef def, final DataSetMetadataCallback callback)
focal_class.identifier: getMetadata
focal_class.modifiers: private
focal_class.parameters: (final DataSetDef def, final DataSetMetadataCallback callback)
focal_class.return: void
focal_class.signature: void getMetadata(final DataSetDef def, final DataSetMetadataCallback callback)
focal_class.class_method_signature: DataSetSummary.showLoadingIcon()
focal_class.full_signature:  void showLoadingIcon()
focal_class.identifier: showLoadingIcon
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void showLoadingIcon()
focal_class.class_method_signature: DataSetSummary.showErrorIcon()
focal_class.full_signature:  void showErrorIcon()
focal_class.identifier: showErrorIcon
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void showErrorIcon()
focal_class.class_method_signature: DataSetSummary.showError(final String uuid, final ClientRuntimeError error)
focal_class.full_signature:  void showError(final String uuid, final ClientRuntimeError error)
focal_class.identifier: showError
focal_class.parameters: (final String uuid, final ClientRuntimeError error)
focal_class.return: void
focal_class.signature: void showError(final String uuid, final ClientRuntimeError error)
focal_class.class_method_signature: DataSetSummary.showError(final String uuid, final Throwable throwable)
focal_class.full_signature:  void showError(final String uuid, final Throwable throwable)
focal_class.identifier: showError
focal_class.parameters: (final String uuid, final Throwable throwable)
focal_class.return: void
focal_class.signature: void showError(final String uuid, final Throwable throwable)
focal_class.class_method_signature: DataSetSummary.showError(final String uuid, final String message)
focal_class.full_signature:  void showError(final String uuid, final String message)
focal_class.identifier: showError
focal_class.parameters: (final String uuid, final String message)
focal_class.return: void
focal_class.signature: void showError(final String uuid, final String message)
focal_method.body: public void show(final DataSetDef def) {
          if (def != null) {
              // Cache status panel.
              final boolean isShowBackendCache = def.getProvider() != null
                      && ( !DataSetProviderType.BEAN.equals(def.getProvider())
                      && !DataSetProviderType.CSV.equals(def.getProvider() ));
              final Boolean isCacheEnabled = isShowBackendCache ? def.isCacheEnabled() : null;
              final boolean isPushEnabled = def.isPushEnabled();
              final boolean isRefreshEnabled = def.getRefreshTime() != null;
              view.showStatusPanel(isCacheEnabled, isPushEnabled, isRefreshEnabled);
              
              
              // Show loading icon on size panel while performing the backend request.
              showLoadingIcon();
  
              getMetadata(def, new DataSetMetadataCallback() {
                  @Override
                  public void callback(final DataSetMetadata metadata) {
                      final int estimatedSize = metadata.getEstimatedSize();
                      final int rowCount = metadata.getNumberOfRows();
                      view.showSizePanel(humanReadableRowCount(rowCount) + " " + DataSetExplorerConstants.INSTANCE.rows(), 
                              humanReadableByteCount(estimatedSize));
                  }
  
                  @Override
                  public void notFound() {
                      showErrorIcon();
                      showError(def.getUUID(), DataSetExplorerConstants.INSTANCE.notFound());
                      
                  }
  
                  @Override
                  public boolean onError(final ClientRuntimeError error) {
                      showErrorIcon();
                      showError(def.getUUID(), error);
                      return false;
                  }
              });
          }
      }
focal_method.class_method_signature: DataSetSummary.show(final DataSetDef def)
focal_method.full_signature: public void show(final DataSetDef def)
focal_method.identifier: show
focal_method.invocations: getProvider equals getProvider equals getProvider isCacheEnabled isPushEnabled getRefreshTime showStatusPanel showLoadingIcon getMetadata getEstimatedSize getNumberOfRows showSizePanel humanReadableRowCount rows humanReadableByteCount showErrorIcon showError getUUID notFound showErrorIcon showError getUUID
focal_method.modifiers: public
focal_method.parameters: (final DataSetDef def)
focal_method.return: void
focal_method.signature: void show(final DataSetDef def)