Java Doc for Step.java in  » Testing » abbot-1.0.1 » abbot » script » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » abbot 1.0.1 » abbot.script 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   abbot.script.Step

All known Subclasses:   abbot.script.Sequence,  abbot.script.Terminate,  abbot.script.Call,  abbot.script.Annotation,  abbot.script.Comment,  abbot.script.Event,  abbot.script.Expression,
Step
abstract public class Step implements XMLConstants,XMLifiable,Serializable(Code)
Provides access to one step (line) from a script. A Step is the basic unit of execution. Custom Step classes

All custom Step classes must supply a Constructor with the signature <init>(${link Resolver}, Map ). If the step has contents (e.g. Sequence ), then it should also provide a Constructor with the signature <init>( Resolver , Element , Map ).

The XML tag for a given Step will be used to auto-generate the Step class name, e.g. the tag <aphrodite/> causes the parser to create an instance of class abbot.script.Aphrodite, using one of the Constructor s described above.

All derived classes should include an entry in the schema, or validation must be turned off by setting the System property abbot.script.validate=false.

You can make the custom Aphrodite step do just about anything by overriding the Step.runStep() method.

See the source for any Step implementation in this package for examples.




Constructor Summary
public  Step(Resolver resolver, Map attributes)
    
public  Step(Resolver resolver, String description)
    

Method Summary
protected  ElementaddAttributes(Element el)
     Add an attribute to the given XML Element.
protected  ElementaddContent(Element el)
     Override if the step actually has some contents.
protected static  MapcreateAttributeMap(Element el)
     Convert the attributes in the given XML Element into a Map of name/value pairs.
public static  StepcreateStep(Resolver resolver, String str)
     Create a new step from an in-line XML string.
public static  StepcreateStep(Resolver resolver, Element el)
     Factory method, equivalent to a "fromXML" for step creation.
public  MapgetAttributes()
     Attributes to save in script.
abstract public  StringgetDefaultDescription()
     Return a reasonable default description for this script step. This value is used in the absence of an explicit description.
public  StringgetDescription()
    
public  ResolvergetResolver()
    
abstract public  StringgetUsage()
     Provide a usage String for this step.
abstract public  StringgetXMLTag()
     Define the XML tag to use for this script step.
final protected  voidparseStepAttributes(Map attributes)
     Only exposed so that Script may invoke it on load from disk.
public  ClassresolveClass(String className)
     Returns the Class corresponding to the given class name.
protected  ComponentTesterresolveTester(String className)
     Look up an appropriate ComponentTester given an arbitrary Component-derived class.
final public  voidrun()
     Main run method.
abstract protected  voidrunStep()
     Implement the step's behavior here.
public  voidsetDescription(String desc)
    
protected  voidsetScriptError(Throwable thr)
     For use by subclasses when an error is encountered during parsing.
protected  StringsimpleClassName(Class cls)
    
public  StringtoEditableString()
     Convert this Step into a String suitable for editing.
public  StringtoString()
     Return a description of this script step.
public  ElementtoXML()
     Convert the object to XML.
public static  StringtoXMLString(XMLifiable obj)
     Provide a one-line XML string representation.
protected  voidusage()
     Throw an invalid script exception describing the proper script usage.
protected  voidusage(String details)
     Store an invalid script exception describing the proper script usage.


Constructor Detail
Step
public Step(Resolver resolver, Map attributes)(Code)



Step
public Step(Resolver resolver, String description)(Code)




Method Detail
addAttributes
protected Element addAttributes(Element el)(Code)
Add an attribute to the given XML Element. Attributes are kept in alphabetical order.



addContent
protected Element addContent(Element el)(Code)
Override if the step actually has some contents. In most cases, it won't.



createAttributeMap
protected static Map createAttributeMap(Element el)(Code)
Convert the attributes in the given XML Element into a Map of name/value pairs.



createStep
public static Step createStep(Resolver resolver, String str) throws InvalidScriptException, IOException(Code)
Create a new step from an in-line XML string.



createStep
public static Step createStep(Resolver resolver, Element el) throws InvalidScriptException(Code)
Factory method, equivalent to a "fromXML" for step creation. Looks for a class with the same name as the XML tag, with the first letter capitalized. For example, <call /> is abbot.script.Call.



getAttributes
public Map getAttributes()(Code)
Attributes to save in script.



getDefaultDescription
abstract public String getDefaultDescription()(Code)
Return a reasonable default description for this script step. This value is used in the absence of an explicit description.



getDescription
public String getDescription()(Code)



getResolver
public Resolver getResolver()(Code)



getUsage
abstract public String getUsage()(Code)
Provide a usage String for this step.



getXMLTag
abstract public String getXMLTag()(Code)
Define the XML tag to use for this script step.



parseStepAttributes
final protected void parseStepAttributes(Map attributes)(Code)
Only exposed so that Script may invoke it on load from disk.



resolveClass
public Class resolveClass(String className) throws ClassNotFoundException(Code)
Returns the Class corresponding to the given class name. Provides just-in-time classname resolution to ensure loading by the proper class loader.




resolveTester
protected ComponentTester resolveTester(String className) throws ClassNotFoundException(Code)
Look up an appropriate ComponentTester given an arbitrary Component-derived class. If the class is derived from abbot.tester.ComponentTester, instantiate one; if it is derived from java.awt.Component, return a matching Tester. Otherwise return abbot.tester.ComponentTester.


throws:
  ClassNotFoundException - If the given class can't be found.
throws:
  IllegalArgumentException - If the tester cannot be instantiated.




run
final public void run() throws Throwable(Code)
Main run method. Should never be run on the event dispatch thread, although no check is explicitly done here.



runStep
abstract protected void runStep() throws Throwable(Code)
Implement the step's behavior here.



setDescription
public void setDescription(String desc)(Code)



setScriptError
protected void setScriptError(Throwable thr)(Code)
For use by subclasses when an error is encountered during parsing. Should only be used by the XML parsing ctors.



simpleClassName
protected String simpleClassName(Class cls)(Code)



toEditableString
public String toEditableString()(Code)
Convert this Step into a String suitable for editing. The default is the XML representation of the Step.



toString
public String toString()(Code)
Return a description of this script step.



toXML
public Element toXML()(Code)
Convert the object to XML.



toXMLString
public static String toXMLString(XMLifiable obj)(Code)
Provide a one-line XML string representation.



usage
protected void usage()(Code)
Throw an invalid script exception describing the proper script usage. This should be used by derived classes whenever parsing indicates invalid input.



usage
protected void usage(String details)(Code)
Store an invalid script exception describing the proper script usage. This should be used by derived classes whenever parsing indicates invalid input.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.