public interface Controller
extends com.itko.lisa.model.IWriteXML, com.itko.lisa.gui.ContextHelpSupport
Modifier and Type | Method and Description |
---|---|
boolean |
confirmDelete()
You can question/challenge/prevent deletes
|
void |
destroy()
When we're shutting down the whole thing, we'll want to clean up model and viewer
This is your chance to make sure you aren't doing anything to leak memory
|
void |
exportAssets() |
void |
gatherStepConnections(java.util.Collection<com.itko.lisa.test.StepConnection> stepConnections)
This method is used for gathering information used in graphing and realizing who's
talking to whom.
|
com.itko.lisa.editor.ControllerFactory |
getControllerFactory()
This is the factory for controllers of this type.
|
java.lang.String |
getDisplayName()
Fashion for us a short name for use in trees and lists
|
java.lang.String |
getEditorName()
Tell us the title of the window to use when creating dialogs and etc.
|
java.lang.String |
getElementName()
If renaming is allowed, then the framework might call this method to fetch the name.
|
com.itko.lisa.editor.Intersections |
getIntersections()
LISA has a dynamic way to hook test case elements with their Controller and Editors.
|
java.lang.String |
getLastErrorMessage()
Used by the GUI to display a better message.
|
java.util.Collection |
getPropertiesReferenced()
Will tell us all the properties that are referenced during the processing of this element
|
java.util.Collection |
getPropertiesSet()
Will tell us all the properties that are set/updated during the processing of this element
|
TestNodeInfo |
getTestNode()
So that your subclasses and editors know the node you are related to
|
boolean |
hasChanged()
The framework is asking if you or your editor have changed the data inside (typically called
when the user is moving focus away from your editor)
|
boolean |
isEditorCompact()
The framework uses this method to determine whether the editor for this controller is
designed to fit in the narrow inspector (
true ) or if it requires more real
estate (false ). |
java.lang.String |
isEditorValid()
We expect you to inspect the editor and your internal data if appropriate, and return a human
readable string of an error that should be addressed, or null if there is no problem.
|
boolean |
isInInvalidState()
This is basically just a boolean version of isEditorValid
|
boolean |
isRenamingAllowed()
Can be renamed?
|
CustomEditor |
makeEditor()
You are responsible for telling us what UI editor to use, so please give it
here.
|
void |
migrate(java.lang.Object testCaseObj)
If the test case object that you are going to maintain already existed in an existing test,
then we need you to migrate the state of that exsiting element into your state here.
|
void |
objectDeleted()
This method is called when the user has deleted this controller (and the object it
represents) from the containing model.
|
void |
renameElement(java.lang.String newName)
Here is how you can rename the element from the framework level
|
void |
save()
We are asking you to persist from your editor into your state, this is usually called after
the user is done if your editor, and we have called hasChanged() and isEditorValid() w/o issues.
|
void |
setEditorTarget(TestCaseInfo tc,
TestNodeInfo node)
Called on this object by the framework to let you know what test case
you are scoped into and the test node.
|
void |
setType(java.lang.String type)
When initially constructed for a new test element (no migration), the framework will
call this to tell you what type of object you own.
|
CustomEditor |
showEditor()
When the framework needs to actually put the editor on screen, you'll get called here.
|
void |
writeXML(java.io.PrintWriter pw)
When it's time for you to stream your XML representation to the output stream.
|
com.itko.lisa.editor.Intersections getIntersections()
com.itko.lisa.editor.ControllerFactory getControllerFactory()
void setEditorTarget(TestCaseInfo tc, TestNodeInfo node)
TestNodeInfo getTestNode()
void migrate(java.lang.Object testCaseObj)
testCaseObj
- the object to migrate (like the TestNode, FilterInterface, etc.)void setType(java.lang.String type)
type
- the class name of the element we are making for you to edit, like
"com.itko.lisa.test.URLTrans"void writeXML(java.io.PrintWriter pw)
writeXML
in interface com.itko.lisa.model.IWriteXML
pw
- the output writer to push your data intojava.lang.String getEditorName()
java.lang.String getDisplayName()
boolean isRenamingAllowed()
java.lang.String getElementName()
void renameElement(java.lang.String newName)
CustomEditor makeEditor()
CustomEditor showEditor()
boolean isEditorCompact()
true
) or if it requires more real
estate (false
).true
if the controller's editor will fit in the model editor object
inspector or false
if not.boolean hasChanged()
java.lang.String isEditorValid()
void save()
boolean isInInvalidState()
boolean confirmDelete()
void objectDeleted()
void destroy()
void gatherStepConnections(java.util.Collection<com.itko.lisa.test.StepConnection> stepConnections)
stepConnections
- the collection to add all the step connections this editor knows
about as StepConnection
objects to.StepConnection
java.util.Collection getPropertiesReferenced()
java.util.Collection getPropertiesSet()
java.lang.String getLastErrorMessage()
void exportAssets()
Copyright © 1998-2014 CA, Inc. All Rights Reserved.