edu.sdsc.inca.consumer
Class SeriesHistoryBean

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by edu.sdsc.inca.consumer.SeriesHistoryBean
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class SeriesHistoryBean
extends java.util.Hashtable

Retrieve the history of one or more series and return the values as an xml document.

See Also:
Serialized Form

Field Summary
static java.lang.String NAMESPACE_DECLS
           
 
Constructor Summary
SeriesHistoryBean()
           
 
Method Summary
 java.lang.String[] getNickname()
          Return the list of series nicknames that will be queried
 java.lang.String[] getResource()
          Return a list of series resource names that will be queried
static java.lang.String getResult(boolean exitStatus, java.lang.String err, java.lang.String cr)
          Determine pass/fail/unknown status for a series report based on error message and comparison result.
 java.lang.String getXml()
          Query the depot for series histories and return the results in as a string containing an XML document.
 java.lang.String[][] queryAndParse(java.lang.String hql, java.lang.String... fields)
          Submit a query to the depot
 void setEndDate(java.lang.String endDate)
          Set the end date for the series histories.
 void setNickname(java.lang.String[] nickname)
          Set the list of series nicknames that will be queried
 void setResource(java.lang.String[] resource)
          Set the list of series resources that will be queried
 void setSeries(java.lang.String[] series)
          Set the list of series that will be queried for their history
 void setStartDate(java.lang.String startDate)
          Set the start date for the series histories.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMESPACE_DECLS

public static final java.lang.String NAMESPACE_DECLS
See Also:
Constant Field Values
Constructor Detail

SeriesHistoryBean

public SeriesHistoryBean()
Method Detail

getNickname

public java.lang.String[] getNickname()
Return the list of series nicknames that will be queried

Returns:
a list of series nicknames

getResource

public java.lang.String[] getResource()
Return a list of series resource names that will be queried

Returns:
a list of series resource names

getResult

public static java.lang.String getResult(boolean exitStatus,
                                         java.lang.String err,
                                         java.lang.String cr)
Determine pass/fail/unknown status for a series report based on error message and comparison result.

Parameters:
exitStatus - true or false indicating whether the reporter completed
err - the exit message if exitStatus is false
cr - the comparison result if it exists
Returns:
1 if completed is true or the comparison result is Success. -1 if comparison is Failure or completed is false. Neutral (0) if err message indicates downtime or Inca error

getXml

public java.lang.String getXml()
Query the depot for series histories and return the results in as a string containing an XML document. Does the query in 4 parts: 1) gets all the series config and series ids 2) gets all reports 3) gets all comparison results 4) gets all instances The results are concatenated together and is more efficient that doing joins.

Returns:
A string containing an XML document complying to the query results schema.

queryAndParse

public java.lang.String[][] queryAndParse(java.lang.String hql,
                                          java.lang.String... fields)
Submit a query to the depot

Parameters:
hql - A valid HQL query string
fields - The fields that should be returned in the query
Returns:
An array of field value arrays.

setEndDate

public void setEndDate(java.lang.String endDate)
Set the end date for the series histories.

Parameters:
endDate - A valid date

setNickname

public void setNickname(java.lang.String[] nickname)
Set the list of series nicknames that will be queried

Parameters:
nickname - a list of series nicknames

setResource

public void setResource(java.lang.String[] resource)
Set the list of series resources that will be queried

Parameters:
resource - a list of series resources

setSeries

public void setSeries(java.lang.String[] series)
Set the list of series that will be queried for their history

Parameters:
series - An array of series nickname,resource pairs

setStartDate

public void setStartDate(java.lang.String startDate)
Set the start date for the series histories.

Parameters:
startDate - A valid date