Package com.sun.javatest.interview
Class EnvironmentInterview
- java.lang.Object
-
- com.sun.interview.Interview
-
- com.sun.javatest.interview.EnvironmentInterview
-
- All Implemented Interfaces:
Parameters.EnvParameters
,Parameters.LegacyEnvParameters
public class EnvironmentInterview extends Interview implements Parameters.LegacyEnvParameters
This interview collects the environment parameter, by means of environment (jte) files and an environment name. It is normally used as one of a series of sub-interviews that collect the parameter information for a test run. It is suitable for use with legacy test suites that still rely on environments being provided with .jte files; more sophisticated interviews should create a custom interview that collects the environment data directly.
-
-
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
EXPORT_IGNORE_ALL_EXCEPTIONS, EXPORT_IGNORE_NO_EXCEPTIONS, EXPORT_IGNORE_RUNTIME_EXCEPTIONS, EXTERNAL_PREF, helpSetFactory, INTERVIEW, LOCALE, MARKERS, MARKERS_PREF, QUESTION, SEMANTIC_MAX_VERSION, SEMANTIC_PRE_32, SEMANTIC_VERSION_32, SEMANTIC_VERSION_43, SEMANTIC_VERSION_50, TEMPLATE_PREF
-
-
Constructor Summary
Constructors Constructor Description EnvironmentInterview(InterviewParameters parent)
Create an interview.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File[]
getAbsoluteEnvFiles()
Get the set of files which define the environment used to run the tests.TestEnvironment
getEnv()
Get the environment specified by the environment files and environment name, or null, if it cannot be determined.java.io.File[]
getEnvFiles()
Get the environment files specified in the interview.java.lang.String
getEnvName()
Get the environment name specified in the interview.void
setEnvFiles(java.io.File... files)
Set the environment files for the interview.void
setEnvName(java.lang.String name)
Set the environment name for the interview.-
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
-
-
-
-
Constructor Detail
-
EnvironmentInterview
public EnvironmentInterview(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
-
getEnvFiles
public java.io.File[] getEnvFiles()
Get the environment files specified in the interview.- Specified by:
getEnvFiles
in interfaceParameters.LegacyEnvParameters
- Returns:
- the list of files specified in the interview
- See Also:
setEnvFiles(java.io.File...)
-
setEnvFiles
public void setEnvFiles(java.io.File... files)
Set the environment files for the interview.- Specified by:
setEnvFiles
in interfaceParameters.LegacyEnvParameters
- Parameters:
files
- the environment files for the interview- See Also:
getEnvFiles()
-
getAbsoluteEnvFiles
public java.io.File[] getAbsoluteEnvFiles()
Description copied from interface:Parameters.LegacyEnvParameters
Get the set of files which define the environment used to run the tests. The files are all returned as absolute files.- Specified by:
getAbsoluteEnvFiles
in interfaceParameters.LegacyEnvParameters
- Returns:
- the set of files which contact the exclude list
- See Also:
Parameters.LegacyEnvParameters.getEnvFiles()
,Parameters.LegacyEnvParameters.setEnvFiles(java.io.File...)
-
getEnvName
public java.lang.String getEnvName()
Get the environment name specified in the interview.- Specified by:
getEnvName
in interfaceParameters.LegacyEnvParameters
- Returns:
- the environment name specified in the interview
- See Also:
setEnvName(java.lang.String)
-
setEnvName
public void setEnvName(java.lang.String name)
Set the environment name for the interview.- Specified by:
setEnvName
in interfaceParameters.LegacyEnvParameters
- Parameters:
name
- the environment name for the interview- See Also:
getEnvName()
-
getEnv
public TestEnvironment getEnv()
Get the environment specified by the environment files and environment name, or null, if it cannot be determined.- Specified by:
getEnv
in interfaceParameters.EnvParameters
- Returns:
- the environment determined by the interview, or null if it cannot be determined.
- See Also:
getEnvFiles()
,getEnvName()
-
-