com.sun.javatest.interview
Class PriorStatusInterview

java.lang.Object
  extended by com.sun.interview.Interview
      extended by com.sun.javatest.interview.PriorStatusInterview
All Implemented Interfaces:
Parameters.MutablePriorStatusParameters, Parameters.PriorStatusParameters

public class PriorStatusInterview
extends Interview
implements Parameters.MutablePriorStatusParameters

This interview collects the "prior status" test filter parameters. It is normally used as one of a series of sub-interviews that collect the parameter information for a test run.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.interview.Interview
Interview.BadHelpFault, Interview.Fault, Interview.HelpNotFoundFault, Interview.NotOnPathFault, Interview.Observer
 
Field Summary
 
Fields inherited from class com.sun.interview.Interview
CHECKSUM, EXPORT_IGNORE_ALL_EXCEPTIONS, EXPORT_IGNORE_NO_EXCEPTIONS, EXPORT_IGNORE_RUNTIME_EXCEPTIONS, EXTERNAL_PREF, INTERVIEW, LOCALE, MARKERS, MARKERS_PREF, QUESTION, SEMANTIC_MAX_VERSION, SEMANTIC_PRE_32, SEMANTIC_VERSION_32, SEMANTIC_VERSION_43, TEMPLATE_PREF
 
Fields inherited from interface com.sun.javatest.Parameters.MutablePriorStatusParameters
MATCH_PRIOR_STATUS, NO_PRIOR_STATUS
 
Constructor Summary
PriorStatusInterview(InterviewParameters parent)
          Create an interview.
 
Method Summary
 boolean[] getMatchPriorStatusValues()
          Get an array of booleans which identify which tests to be run, according to their prior execution status.
 int getPriorStatusMode()
          Get the current mode determining whether tests are selected or not according to their prior execution status.
 boolean[] getPriorStatusValues()
          Get an array of boolean values from the interview, which indicate which "prior status" values will cause a test to be selected for execution.
 TestFilter getStatusFilter()
          Get a test filter generated from the status test values in the interview.
 void setMatchPriorStatusValues(boolean[] b)
          Set an array of boolean values in the interview, which indicate which "prior status" values will cause a test to be selected for execution.
 void setPriorStatusMode(int mode)
          Set the current mode determining whether tests are selected or not according to their prior execution status.
 void setPriorStatusValues(boolean[] b)
          Set which prior status values should be used, if any, to select tests for execution.
 
Methods inherited from class com.sun.interview.Interview
addObserver, callInterview, clear, clearMarkedResponses, containsObserver, createChecklist, createChecklistItem, createChecklistItem, createChecklistItem, export, getAllQuestions, getCurrentQuestion, getDefaultImage, getExportIgnoreExceptionPolicy, getExternalProperties, getFirstQuestion, getHelpSet, getInterview, getInterviewSemantics, getParent, getPath, getPathToCurrent, getPropertyKeys, getQuestions, getRawPath, getResourceBundle, getResourceString, getResourceString, getRoot, getTag, getTitle, hasNext, hasValidNext, isChecklistEmpty, isChecksumValid, isEdited, isFinishable, isFirst, isInterviewFinishable, isLast, isRoot, isStarted, iteratePath, iteratePathToCurrent, last, load, load, next, pathContains, pathContains, prev, propagateTemplateForAll, readLocale, removeAllMarkers, removeMarkers, removeObserver, reset, retrieveProperty, retrieveTemplateKeys, retrieveTemplateProperty, save, setBaseTag, setCurrentQuestion, setDefaultImage, setEdited, setExportIgnoreExceptionPolicy, setFirstQuestion, setHelpSet, setHelpSet, setHelpSet, setInterviewSemantics, setResourceBundle, setResourceBundle, setTitle, storeProperty, storeTemplateProperties, storeTemplateProperty, updatePath, updatePath, verifyPathContains, writeLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorStatusInterview

public PriorStatusInterview(InterviewParameters parent)
                     throws Interview.Fault
Create an interview.

Parameters:
parent - The parent interview of which this is a child.
Throws:
Interview.Fault - if there is a problem while creating the interview.
Method Detail

getPriorStatusValues

public boolean[] getPriorStatusValues()
Get an array of boolean values from the interview, which indicate which "prior status" values will cause a test to be selected for execution. The array of values can be indexed with Status.PASSED, Status.FAILED, etc.

Specified by:
getPriorStatusValues in interface Parameters.PriorStatusParameters
Returns:
an array of boolean values which indicate which "prior status" values will cause a test to be selected for execution.
See Also:
setPriorStatusValues(boolean[])

setPriorStatusValues

public void setPriorStatusValues(boolean[] b)
Description copied from interface: Parameters.MutablePriorStatusParameters
Set which prior status values should be used, if any, to select tests for execution.

Specified by:
setPriorStatusValues in interface Parameters.MutablePriorStatusParameters
Parameters:
b - if null, the prior status mode will be set to NO_PRIOR_STATUS; if not null, the prior status mode will be set to MATCH_PRIOR_STATUS, and the matching values will be set to this array.
See Also:
Parameters.PriorStatusParameters.getPriorStatusValues()

getPriorStatusMode

public int getPriorStatusMode()
Description copied from interface: Parameters.MutablePriorStatusParameters
Get the current mode determining whether tests are selected or not according to their prior execution status.

Specified by:
getPriorStatusMode in interface Parameters.MutablePriorStatusParameters
Returns:
a value of NO_PRIOR_STATUS indicates the prior execution status will not be taken into account; otherwise, a value of MATCH_PRIOR_STATUS means that tests will be selected if and only of their execution status matches one of the matching prior status values.
See Also:
Parameters.MutablePriorStatusParameters.setPriorStatusMode(int), Parameters.MutablePriorStatusParameters.NO_PRIOR_STATUS, Parameters.MutablePriorStatusParameters.MATCH_PRIOR_STATUS

setPriorStatusMode

public void setPriorStatusMode(int mode)
Description copied from interface: Parameters.MutablePriorStatusParameters
Set the current mode determining whether tests are selected or not according to their prior execution status.

Specified by:
setPriorStatusMode in interface Parameters.MutablePriorStatusParameters
Parameters:
mode - if set to NO_PRIOR_STATUS, the prior execution status will not be taken into account; otherwise, if set to MATCH_PRIOR_STATUS tests will be selected if and only of their execution status matches one of the matching prior status values.
See Also:
Parameters.MutablePriorStatusParameters.getPriorStatusMode(), Parameters.MutablePriorStatusParameters.NO_PRIOR_STATUS, Parameters.MutablePriorStatusParameters.MATCH_PRIOR_STATUS

getMatchPriorStatusValues

public boolean[] getMatchPriorStatusValues()
Description copied from interface: Parameters.MutablePriorStatusParameters
Get an array of booleans which identify which tests to be run, according to their prior execution status. The array can be indexed by the constants Status.PASSED, Status.FAILED, Status.ERROR, and Status.NOT_RUN. A test will be selected for execution if the entry in the array corresponding to the tests execution status is set to true.

Specified by:
getMatchPriorStatusValues in interface Parameters.MutablePriorStatusParameters
Returns:
an array of booleans which identifying the prior execution status of tests to be selected to be executed.
See Also:
Parameters.MutablePriorStatusParameters.setMatchPriorStatusValues(boolean[])

setMatchPriorStatusValues

public void setMatchPriorStatusValues(boolean[] b)
Set an array of boolean values in the interview, which indicate which "prior status" values will cause a test to be selected for execution. The array of values can be indexed with Status.PASSED, Status.FAILED, etc.

Specified by:
setMatchPriorStatusValues in interface Parameters.MutablePriorStatusParameters
Parameters:
b - an array of Status.NUM_STATES boolean values which indicate which "prior status" values will cause a test to be selected for execution.
See Also:
getMatchPriorStatusValues()

getStatusFilter

public TestFilter getStatusFilter()
Get a test filter generated from the status test values in the interview.

Returns:
a test filter generated from the status test values in the interview
See Also:
getPriorStatusValues()


Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.