Package ucar.unidata.data
Class DataSourceResults
java.lang.Object
ucar.unidata.data.DataSourceResults
Holds the results from the createDataSource call.
- Version:
- $Revision: 1.17 $
- Author:
- IDV Development Team
-
Constructor Summary
ConstructorsConstructorDescriptionDefault bean constructor; does nothingDataSourceResults
(Object failedDefiningObject, Throwable exc) Create a DataSourceResults from the failed parameters.DataSourceResults
(DataSource dataSource, Object definingObject) Create a DataSourceResults for the given parameters -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a failed defining object and the failure exception to the lists.void
addSuccess
(DataSource dataSource, Object definingObject) Add a successful result to the listsboolean
See if all the results were failures.boolean
allOk()
See if all the results were okay.boolean
See if there were any failures.boolean
anyOk()
See if there were any successes.Get the list of successfully created DataSourcesGet the list of failure exceptions.Get the list of failed data.Get the list of successful defining objects.void
merge
(DataSourceResults results) Merge the results of another DataSourceResults to this onetoString()
Get a String representation of this DataSourceResults.
-
Constructor Details
-
DataSourceResults
public DataSourceResults()Default bean constructor; does nothing -
DataSourceResults
Create a DataSourceResults for the given parameters- Parameters:
dataSource
- the DataSourcedefiningObject
- the defining object for that source
-
DataSourceResults
Create a DataSourceResults from the failed parameters.- Parameters:
failedDefiningObject
- defining object for failureexc
- failed exception
-
-
Method Details
-
merge
Merge the results of another DataSourceResults to this one- Parameters:
results
- other results.
-
getDataSources
Get the list of successfully created DataSources- Returns:
- list of DataSources
-
getSuccessData
Get the list of successful defining objects.- Returns:
- list of successes
-
getExceptions
Get the list of failure exceptions.- Returns:
- list of failed exceptions
-
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
Add a successful result to the lists- Parameters:
dataSource
- successfully created DataSourcedefiningObject
- the defining object fordataSource
.
-
addFailed
Add a failed defining object and the failure exception to the lists.- Parameters:
definingObject
- defining object for the DataSourceexception
- failure exception
-
toString
Get a String representation of this DataSourceResults.
-