Java Doc for Result.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » designtime » 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 » IDE Netbeans » visualweb.api.designer » com.sun.rave.designtime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.rave.designtime.Result

All known Subclasses:   com.sun.rave.designtime.CustomizerResult,
Result
public class Result (Code)

A Result object represents the logical result of an operation. The SUCCESS and FAILURE Result objects are useful when returning an otherwise empty result with no user messages. null Results should never be returned, but if one is, it will be treated as Result.SUCCESS with no messages.

Some Result objects may contain user messages, returned by the 'getMessages()' method. These messages will be displayed to the user in one of three ways:

Status Bar The Status Bar displays very low-importance messages. Any ResultMessage objects of type ResultMessage.TYPE_INFORMATION will be displayed here, as long as there are no result options returned from the 'getResultOptions()' method.
Message Window The Message Window displays more important messages than the status bar, as they are persisted until the user clears the message window. Any ResultMessage objects of type ResultMessage.TYPE_WARNING will be displayed here, as long as there are no result options returned from the 'getResultOptions()' method.
Message Dialog A pop-up modal Message Dialog displays the most important messages, as the user must stop work to 'handle' the dialog. Any ResultMessage objects of type ResultMessage.TYPE_CRITICAL will be displayed in an modal dialog. If there are any result options returned from the 'getResultOptions()' method, they will be displayed as buttons in the dialog, otherwise a default 'OK' button will be displayed. If a Result contains messages that are less than TYPE_CRITICAL, but result options are included - the messages will be 'upgraded' and displayed in the model dialog, as if they were TYPE_CRITICAL.

The three most important methods of this class are: 'isSuccess()', 'getMessages()', and 'getMessageOptions()'. These are called by the IDE to investigate the details of a Result object.


author:
   Joe Nuxoll
version:
   1.0


Field Summary
final public static  ResultFAILURE
    
final public static  ResultSUCCESS
    
protected  StringdialogTitle
    
protected  StringhelpKey
    
protected  ArrayListmessages
    
protected  ArrayListoptions
    
protected  booleansuccess
    

Constructor Summary
public  Result(boolean success)
    
public  Result(boolean success, ResultMessage message)
    
public  Result(boolean success, ResultMessage[] messages)
    
public  Result(boolean success, ResultMessage[] messages, DisplayAction[] options)
    

Method Summary
public  voidaddMessage(ResultMessage message)
    
public  voidaddMessages(ResultMessage[] messages)
    
public  voidaddResultOption(DisplayAction option)
    
public  voidaddResultOptions(DisplayAction[] options)
    
public  StringgetDialogHelpKey()
     Returns the 'dialogHelpKey' property.
public  StringgetDialogTitle()
     Returns the 'dialogTitle' property.
public  intgetMessageCount()
    
public  ResultMessage[]getMessages()
     Returns an (optional) set of ResultMessage objects from the completed operation.
public  intgetResultOptionCount()
    
public  DisplayAction[]getResultOptions()
     Returns an (optional) set of DisplayAction objects representing options in a dialog box for the user.
public  booleanisSuccess()
    
public  voidremoveMessage(ResultMessage message)
    
public  voidremoveMessages(ResultMessage[] messages)
    
public  voidremoveResultOption(DisplayAction option)
    
public  voidremoveResultOptions(DisplayAction[] options)
    
public  voidsetDialogHelpKey(String helpKey)
     Sets the 'dialogHelpKey' property.
public  voidsetDialogTitle(String dialogTitle)
     Sets the 'dialogTitle' property.
public  voidsetSuccess(boolean success)
    

Field Detail
FAILURE
final public static Result FAILURE(Code)
Common instance of a failed result object



SUCCESS
final public static Result SUCCESS(Code)
Common instance of a successful result object



dialogTitle
protected String dialogTitle(Code)
Protected storage for the 'resultDialogTitle' property



helpKey
protected String helpKey(Code)
Protected storage for the 'dialogHelpKey' property



messages
protected ArrayList messages(Code)
Protected storage for the message list (ResultMessage[])



options
protected ArrayList options(Code)
Protected storage for the result option list (DisplayAction[])



success
protected boolean success(Code)
Protected storage for the 'success' property




Constructor Detail
Result
public Result(boolean success)(Code)
Constructs a Result object with the specified success status
Parameters:
  success - true if successful, false if not



Result
public Result(boolean success, ResultMessage message)(Code)
Constructs a Result object with the specified success status and message
Parameters:
  success - true if successful, false if not
Parameters:
  message - A ResultMessage to display to the user



Result
public Result(boolean success, ResultMessage[] messages)(Code)
Constructs a Result object with the specified success status and messages
Parameters:
  success - true if successful, false if not
Parameters:
  messages - A set of ResultMessage(s) to display to the user



Result
public Result(boolean success, ResultMessage[] messages, DisplayAction[] options)(Code)
Constructs a Result object with the specified success status, messages, and options
Parameters:
  success - true if successful, false if not
Parameters:
  messages - A set of ResultMessage(s) to display to the user
Parameters:
  options - A set of DisplayAction(s) to present to the user as option buttons




Method Detail
addMessage
public void addMessage(ResultMessage message)(Code)
Adds a ResultMessage to this Result to be displayed to the user
Parameters:
  message - The ResultMessage to add



addMessages
public void addMessages(ResultMessage[] messages)(Code)
Adds an array of ResultMessage to this Result to be displayed to the user
Parameters:
  messages - The array of ResultMessage(s) to add



addResultOption
public void addResultOption(DisplayAction option)(Code)
Adds a DisplayAction to this Result to be displayed to the user as an option button in a dialog
Parameters:
  option - The DisplayAction to add as an option button



addResultOptions
public void addResultOptions(DisplayAction[] options)(Code)
Adds a set of DisplayAction(s) to this Result to be displayed to the user as option buttons in a dialog
Parameters:
  options - The DisplayAction(s) to add as option buttons



getDialogHelpKey
public String getDialogHelpKey()(Code)
Returns the 'dialogHelpKey' property. The Result can only trigger a dialog if there is a ResultMessage of TYPE_CRITICAL or there are result options to display. The help key for the result dialog



getDialogTitle
public String getDialogTitle()(Code)
Returns the 'dialogTitle' property. The Result can only trigger a dialog if there is a ResultMessage of TYPE_CRITICAL or there are result options to display. The title for the result dialog



getMessageCount
public int getMessageCount()(Code)
Returns the count of ResultMessage(s) in this Result the count of ResultMessage(s) in this Result



getMessages
public ResultMessage[] getMessages()(Code)
Returns an (optional) set of ResultMessage objects from the completed operation. Any ResultMessage objects will be displayed to the user either via the status-line, message window, or in a dialog - depending on several conditions outlined above. An array of ResultMessage objects, or null if there the operation produced nomessages



getResultOptionCount
public int getResultOptionCount()(Code)
Returns the count of DisplayAction(s) in this Result which will be displayed to the user as option buttons in a dialog The count of option buttons to show in the dialog



getResultOptions
public DisplayAction[] getResultOptions()(Code)
Returns an (optional) set of DisplayAction objects representing options in a dialog box for the user. If the returned array is non-null and has more than zero elements, a dialog box will automatically be shown to the user with a button for each returned DisplayAction. When the user 'clicks' a particular button, the DisplayAction will be 'invoked()'. An array of DisplayAction objects representing buttons in a dialog to show the user,or null



isSuccess
public boolean isSuccess()(Code)
Returns true if the operation represented by this Result object was successful true if the operation was successful, false if not



removeMessage
public void removeMessage(ResultMessage message)(Code)
Removes a ResultMessage from the set to display to the user
Parameters:
  message - the ResultMessage to remove from the set



removeMessages
public void removeMessages(ResultMessage[] messages)(Code)
Removes an array of ResultMessage(s) from the set to display to the user
Parameters:
  messages - the ResultMessage(s) to remove from the set



removeResultOption
public void removeResultOption(DisplayAction option)(Code)
Removes a DisplayAction (option button in a dialog) from this Result
Parameters:
  option - The DisplayAction (option button) to remove



removeResultOptions
public void removeResultOptions(DisplayAction[] options)(Code)
Removes an array of DisplayAction(s) (option buttons in a dialog) from this Result
Parameters:
  options - The DisplayAction(s) (option buttons) to remove



setDialogHelpKey
public void setDialogHelpKey(String helpKey)(Code)
Sets the 'dialogHelpKey' property. The Result can only trigger a dialog if there is a ResultMessage of TYPE_CRITICAL or there are result options to display.
Parameters:
  dialogHelpKey - The desired help key for the result dialog



setDialogTitle
public void setDialogTitle(String dialogTitle)(Code)
Sets the 'dialogTitle' property. The Result can only trigger a dialog if there is a ResultMessage of TYPE_CRITICAL or there are result options to display.
Parameters:
  dialogTitle - The desired title for the result dialog



setSuccess
public void setSuccess(boolean success)(Code)
Sets the success state of this Result
Parameters:
  success - the success state of this Result



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.