Java Doc for Parameter.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » newbean » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.newbean 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas.newbean.Parameter

Parameter
abstract public class Parameter (Code)
This class represents a parameter the user may be prompted for. It is responsible for asking the user for a value, validating his input, exporting relevant datas into Velocity's context, and deciding what should be the next parameter to ask.

A parameter is created by subclassing this class and overriding the following abstract methods:



Field Summary
protected  VelocityContextvContext
     The Velocity context into which this parameter's variables will be exported.
protected  Stringvalue
     This parameter's value, as entered by the user.

Constructor Summary
public  Parameter(VelocityContext context)
     Creates a new parameter that will export its variables into the specified Velocity context.

Method Summary
abstract public  voidexport()
     Exports the variables managed by this parameter into the associated Velocity context (ie Parameter.vContext ).
abstract public  StringgetArgKeyword()
    
abstract public  ParametergetNextParameter()
     Returns the parameter the user will be asked for after this one.
abstract public  StringgetPrompt()
     Returns the string used to prompt the user for a value.
abstract public  booleanisValid()
     Indicates whether this parameter as a valid value.
public  voidobtainValue()
     Obtains the value of this parameter.
public  voidsetValue(String input)
     Sets the Parameter.value of this parameter.
public  voidwalkThrough()
     Recusively walk through the parameters graph, obtaining parameter ( Parameter.obtainValue() ) values and exporting ( Parameter.export() ) them.

The path taken through the parameter graph may change depending on the values entered by the user.


Field Detail
vContext
protected VelocityContext vContext(Code)
The Velocity context into which this parameter's variables will be exported.



value
protected String value(Code)
This parameter's value, as entered by the user.




Constructor Detail
Parameter
public Parameter(VelocityContext context)(Code)
Creates a new parameter that will export its variables into the specified Velocity context.
Parameters:
  context - the Velocity context into which variables willbe exported




Method Detail
export
abstract public void export()(Code)
Exports the variables managed by this parameter into the associated Velocity context (ie Parameter.vContext ).



getArgKeyword
abstract public String getArgKeyword()(Code)
the command line keyword string for this parameter



getNextParameter
abstract public Parameter getNextParameter()(Code)
Returns the parameter the user will be asked for after this one. This method is not invoked before a valid value has been entered for this parameter; therefor it is possible to decide which object to return based on the value of Parameter.value .

This method returns null if their is no more parameters. the next parameter the user should be prompted for




getPrompt
abstract public String getPrompt()(Code)
Returns the string used to prompt the user for a value. the string used to prompt the user for a value.



isValid
abstract public boolean isValid()(Code)
Indicates whether this parameter as a valid value. This method can safely assume Parameter.value is not null. true if Parameter.value is valid,false otherwise



obtainValue
public void obtainValue()(Code)
Obtains the value of this parameter. This method prompts the user for a value, stores it into Parameter.value through the Parameter.isValid() . This process is repeated until the value is valid.



setValue
public void setValue(String input)(Code)
Sets the Parameter.value of this parameter. This method is called each time a value is entered is entered by the user, before its validity has been checked.

This implementation simply sets Parameter.value to input. You can override this method if you need to format this input, for example to convert it to uppercase.




walkThrough
public void walkThrough()(Code)
Recusively walk through the parameters graph, obtaining parameter ( Parameter.obtainValue() ) values and exporting ( Parameter.export() ) them.

The path taken through the parameter graph may change depending on the values entered by the user. It is determined after each valid input by a call to Parameter.getNextParameter() .




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.