com.sun.faban.harness.webclient
Class RunResult

java.lang.Object
  extended by com.sun.faban.harness.webclient.RunResult

public class RunResult
extends Object

Result class scans through the output directory and compiles a list of run results. Enhance this to enable the user to sort it using different options.


Nested Class Summary
static class RunResult.FeedRecord
          The feed record for the run results.
static class RunResult.ResultField<T extends Comparable>
          A result field representing the real value of the field used for sorting, and the text representation of the value.
static class RunResult.Target
           
 
Field Summary
 Date dateTime
          The timestamp of the run.
 String description
          The run description.
 String logLink
          The link to the run logs.
 RunResult.ResultField<Double> metric
          The metric.
 String result
          The result.
 String resultLink
          The link for the result to link to.
 RunId runId
          The run id.
 String scale
          The scale value.
 String status
          The status of the run.
 String submitter
          The run submitter.
 String[] tags
          Tags applicable to this run.
 
Method Summary
static List<RunResult.FeedRecord> getFeeds(Subject user)
          Obtains the list of feeds.
static List<RunResult.FeedRecord> getFeeds(Subject user, String[] tags)
          Obtains the list of feeds based on tags.
static RunResult getInstance(RunId runId)
          Obtains the result of a certain run id.
static SortableTableModel getResultTable(Subject user, int column, String sortDirection)
          Returns the SortableTableModel.
static SortableTableModel getResultTable(Subject user, String tags, int column, String sortDirection)
          Returns the SortableTableModel with tag search.
static String getStatus(RunId runId)
          Obtains the status of a given run.
static ArrayList<RunResult.Target> getTargetList()
          Obtains a list of targets currently in the system.
static ArrayList<RunResult.Target> getTargetListForTarget(String target)
          Returns the target list with target search.
static ArrayList<RunResult.Target> getTargetListForUser(String user)
           
static ArrayList<RunResult.Target> getTargetListForUserWithTg(String target, String user)
           
static String[] readStatus(String runId)
          Obtains the current status of a run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runId

public RunId runId
The run id.


description

public String description
The run description.


result

public String result
The result.


resultLink

public String resultLink
The link for the result to link to.


scale

public String scale
The scale value.


metric

public RunResult.ResultField<Double> metric
The metric.


status

public String status
The status of the run.


logLink

public String logLink
The link to the run logs.


dateTime

public Date dateTime
The timestamp of the run.


submitter

public String submitter
The run submitter.


tags

public String[] tags
Tags applicable to this run.

Method Detail

getInstance

public static RunResult getInstance(RunId runId)
Obtains the result of a certain run id.

Parameters:
runId - The run id to query
Returns:
An instance of the result, or null if such runId is not found

readStatus

public static String[] readStatus(String runId)
Obtains the current status of a run.

Parameters:
runId - The id of the run in question
Returns:
The current status string or "UNKNOWN" in error cases

getStatus

public static String getStatus(RunId runId)
Obtains the status of a given run. If it is queued, returns "QUEUED"

Parameters:
runId - The run id to obtain status
Returns:
The status string, or null if run cannot be found.

getResultTable

public static SortableTableModel getResultTable(Subject user,
                                                String tags,
                                                int column,
                                                String sortDirection)
                                         throws IOException
Returns the SortableTableModel with tag search.

Parameters:
user -
tags -
column -
sortDirection -
Returns:
SortableTableModel
Throws:
IOException

getResultTable

public static SortableTableModel getResultTable(Subject user,
                                                int column,
                                                String sortDirection)
Returns the SortableTableModel.

Parameters:
user - The authenticated subject, if any
column - The sort column id
sortDirection - The sort direction
Returns:
The SortableTableModel representing this table

getTargetListForTarget

public static ArrayList<RunResult.Target> getTargetListForTarget(String target)
                                                          throws IOException
Returns the target list with target search.

Parameters:
target -
Returns:
ArrayList
Throws:
IOException

getTargetListForUserWithTg

public static ArrayList<RunResult.Target> getTargetListForUserWithTg(String target,
                                                                     String user)
                                                              throws IOException
Throws:
IOException

getTargetListForUser

public static ArrayList<RunResult.Target> getTargetListForUser(String user)
                                                        throws IOException
Throws:
IOException

getTargetList

public static ArrayList<RunResult.Target> getTargetList()
                                                 throws IOException
Obtains a list of targets currently in the system.

Returns:
The list of targets or an empty list if none available
Throws:
IOException - Error accessing targets file

getFeeds

public static List<RunResult.FeedRecord> getFeeds(Subject user)
Obtains the list of feeds.

Parameters:
user -
Returns:
List.

getFeeds

public static List<RunResult.FeedRecord> getFeeds(Subject user,
                                                  String[] tags)
                                           throws IOException
Obtains the list of feeds based on tags.

Parameters:
user -
tags -
Returns:
List
Throws:
IOException