Package com.sun.javatest.tool
Class CustomPropagationController
- java.lang.Object
-
- com.sun.javatest.tool.CustomPropagationController
-
public class CustomPropagationController extends java.lang.Object
This class provides a way to extend default behavior of template propagation process
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomPropagationController.EventType
EventType.Start - propagation starting event EventType.TemplateLoaded - external template data loaded and accessible EventType.Finish - propagation finishing event
-
Constructor Summary
Constructors Constructor Description CustomPropagationController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getQuestionText(java.lang.String key, java.lang.String defaultText)
Returns the question's text.void
notify(CustomPropagationController.EventType evt, InterviewParameters interview, java.util.Map<java.lang.String,java.lang.String> templateData)
Invoked when a template propagation event occurs.boolean
preprocessData(java.util.Map<java.lang.String,java.lang.String> templateData, InterviewParameters interview)
Invoked before propagation process.void
refreshTests()
Request that the harness reload the test suite structure from the test suite.void
setInterview(InterviewParameters ip)
void
setRefresher(InterviewPropagator.TestRefresher refresher)
-
-
-
Method Detail
-
notify
public void notify(CustomPropagationController.EventType evt, InterviewParameters interview, java.util.Map<java.lang.String,java.lang.String> templateData)
Invoked when a template propagation event occurs.- Parameters:
evt
- - kind of event. For example EventType.Start or EventType.Finishinterview
- - current InterviewParameters.templateData
- - loaded actual template's values. Can be null
-
getQuestionText
public java.lang.String getQuestionText(java.lang.String key, java.lang.String defaultText)
Returns the question's text. This text is used in the template propagation dialog only- Parameters:
key
- - the question keydefaultText
-- Returns:
- question text
-
preprocessData
public boolean preprocessData(java.util.Map<java.lang.String,java.lang.String> templateData, InterviewParameters interview)
Invoked before propagation process. Provides possibility for custom preprocessing of interview data based on template data If the interview data or state was changed the method must return true- Parameters:
templateData
- - template data in key-value forminterview
-- Returns:
- true if the interview was changed
-
refreshTests
public void refreshTests()
Request that the harness reload the test suite structure from the test suite. If called on the GUI event thread, it will start a new thread before executing the operation, to avoid blocking the GUI. It is recommended that the caller use a different thread and probably show the user a "Please wait" message until this method returns. This method can be invoked between EventType.Start and EventType.Finish notifications
-
setRefresher
public void setRefresher(InterviewPropagator.TestRefresher refresher)
-
setInterview
public void setInterview(InterviewParameters ip)
-
-