Class DataSourceResults

java.lang.Object
ucar.unidata.data.DataSourceResults

public class DataSourceResults extends Object
Holds the results from the createDataSource call.
Version:
$Revision: 1.17 $
Author:
IDV Development Team
  • Constructor Details

    • DataSourceResults

      public DataSourceResults()
      Default bean constructor; does nothing
    • DataSourceResults

      public DataSourceResults(DataSource dataSource, Object definingObject)
      Create a DataSourceResults for the given parameters
      Parameters:
      dataSource - the DataSource
      definingObject - the defining object for that source
    • DataSourceResults

      public DataSourceResults(Object failedDefiningObject, Throwable exc)
      Create a DataSourceResults from the failed parameters.
      Parameters:
      failedDefiningObject - defining object for failure
      exc - failed exception
  • Method Details

    • merge

      public void merge(DataSourceResults results)
      Merge the results of another DataSourceResults to this one
      Parameters:
      results - other results.
    • getDataSources

      public List getDataSources()
      Get the list of successfully created DataSources
      Returns:
      list of DataSources
    • getSuccessData

      public List getSuccessData()
      Get the list of successful defining objects.
      Returns:
      list of successes
    • getExceptions

      public List getExceptions()
      Get the list of failure exceptions.
      Returns:
      list of failed exceptions
    • getFailedData

      public List getFailedData()
      Get the list of failed data.
      Returns:
      List of failed defining objects
    • anyFailed

      public boolean anyFailed()
      See if there were any failures.
      Returns:
      true if there were any failures
    • anyOk

      public boolean anyOk()
      See if there were any successes.
      Returns:
      true if there were any successes
    • allFailed

      public boolean allFailed()
      See if all the results were failures.
      Returns:
      true if no successes.
    • allOk

      public boolean allOk()
      See if all the results were okay.
      Returns:
      true if no failures
    • addSuccess

      public void addSuccess(DataSource dataSource, Object definingObject)
      Add a successful result to the lists
      Parameters:
      dataSource - successfully created DataSource
      definingObject - the defining object for dataSource.
    • addFailed

      public void addFailed(Object definingObject, Throwable exception)
      Add a failed defining object and the failure exception to the lists.
      Parameters:
      definingObject - defining object for the DataSource
      exception - failure exception
    • toString

      public String toString()
      Get a String representation of this DataSourceResults.
      Overrides:
      toString in class Object
      Returns:
      a string represenation of this