com.sun.javatest.interview
Class EnvironmentInterview

java.lang.Object
  extended by com.sun.interview.Interview
      extended by 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
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
 
Constructor Summary
EnvironmentInterview(InterviewParameters parent)
          Create an interview.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface Parameters.LegacyEnvParameters
Returns:
the list of files specified in the interview
See Also:
setEnvFiles(java.io.File[])

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 interface Parameters.LegacyEnvParameters
Returns:
the set of files which contact the exclude list
See Also:
Parameters.LegacyEnvParameters.getEnvFiles(), Parameters.LegacyEnvParameters.setEnvFiles(java.io.File[])

setEnvFiles

public void setEnvFiles(java.io.File[] files)
Set the environment files for the interview.

Specified by:
setEnvFiles in interface Parameters.LegacyEnvParameters
Parameters:
files - the environment files for the interview
See Also:
getEnvFiles()

getEnvName

public java.lang.String getEnvName()
Get the environment name specified in the interview.

Specified by:
getEnvName in interface Parameters.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 interface Parameters.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 interface Parameters.EnvParameters
Returns:
the environment determined by the interview, or null if it cannot be determined.
See Also:
getEnvFiles(), getEnvName()


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