Java Doc for DataForm.java in  » Net » openfire » org » xmpp » forms » 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 » Net » openfire » org.xmpp.forms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xmpp.packet.PacketExtension
      org.xmpp.forms.DataForm

DataForm
public class DataForm extends PacketExtension (Code)
Represents a form that could be use for gathering data as well as for reporting data returned from a search.

The form could be of the following types:

  • form -> Indicates a form to fill out.
  • submit -> The form is filled out, and this is the data that is being returned from the form.
  • cancel -> The form was cancelled. Tell the asker that piece of information.
  • result -> Data results being returned from a search, or some other query.

In case the form represents a search, the report will be structured in columns and rows. Use DataForm.addReportedField(String,String,FormField.Type) to set the columns of the report whilst the report's rows can be configured using DataForm.addItemFields(Map) .
author:
   Gaston Dombiak


Inner Class :public enum Type

Field Summary
final public static  StringELEMENT_NAME
     Element name of the packet extension.
final public static  StringNAMESPACE
     Namespace of the packet extension.

Constructor Summary
public  DataForm(Type type)
    
public  DataForm(Element element)
    

Method Summary
public  FormFieldaddField()
     Adds a new field as part of the form.
public  voidaddInstruction(String instruction)
     Adds a new instruction to the list of instructions that explain how to fill out the form and what the form is about.
public  voidaddItemFields(Map<String, Object> fields)
     Adds a new row of items of reported data.
public  voidaddReportedField(String variable, String label, FormField.Type type)
     Adds a field to the list of fields that will be returned from a search.
public  voidclearInstructions()
     Clears all the stored instructions in this packet extension.
public  DataFormcreateCopy()
    
static  Stringencode(Object object)
     Returns the String representation of an Object to be used as a field value.
Parameters:
  object - the object to encode.
public  FormFieldgetField(String variable)
     Returns the field whose variable matches the specified variable.
Parameters:
  variable - the variable name of the field to search.
public  List<FormField>getFields()
     Returns the fields that are part of the form.
public  List<String>getInstructions()
     Returns an unmodifiable list of instructions that explain how to fill out the form and what the form is about.
public  StringgetTitle()
     Returns the description of the data form.
public  DataForm.TypegetType()
     Returns the type of this data form.
public static  booleanparseBoolean(String booleanString)
    
public static  DateparseDate(String date)
     Returns the Date obtained by parsing the specified date representation.
public  booleanremoveField(String variable)
     Removes the field whose variable matches the specified variable.
Parameters:
  variable - the variable name of the field to remove.
public  voidsetTitle(String title)
     Sets the description of the data.

Field Detail
ELEMENT_NAME
final public static String ELEMENT_NAME(Code)
Element name of the packet extension.



NAMESPACE
final public static String NAMESPACE(Code)
Namespace of the packet extension.




Constructor Detail
DataForm
public DataForm(Type type)(Code)



DataForm
public DataForm(Element element)(Code)




Method Detail
addField
public FormField addField()(Code)
Adds a new field as part of the form. the newly created field.



addInstruction
public void addInstruction(String instruction)(Code)
Adds a new instruction to the list of instructions that explain how to fill out the form and what the form is about. The dataform could include multiple instructions since each instruction could not contain newlines characters.
Parameters:
  instruction - the new instruction that explain how to fill out the form.



addItemFields
public void addItemFields(Map<String, Object> fields)(Code)
Adds a new row of items of reported data. For each entry in the fields parameter a field element will be added to the element. The variable of the new field will be the key of the entry. The new field will have several values if the entry's value is a Collection . Since the value is of type Object it is possible to include any type of object as a value. The actual value to include in the data form is the result of the DataForm.encode(Object) method.
Parameters:
  fields - list of to be added as a new item.



addReportedField
public void addReportedField(String variable, String label, FormField.Type type)(Code)
Adds a field to the list of fields that will be returned from a search. Each field represents a column in the report. The order of the columns in the report will honor the sequence in which they were added.
Parameters:
  variable - variable name of the new column. This value will be used inDataForm.addItemFields when adding reported items.
Parameters:
  label - label that corresponds to the new column. Optional parameter.
Parameters:
  type - indicates the type of field of the new column. Optional parameter.



clearInstructions
public void clearInstructions()(Code)
Clears all the stored instructions in this packet extension.



createCopy
public DataForm createCopy()(Code)



encode
static String encode(Object object)(Code)
Returns the String representation of an Object to be used as a field value.
Parameters:
  object - the object to encode. the String representation of an Object to be used as a field value.



getField
public FormField getField(String variable)(Code)
Returns the field whose variable matches the specified variable.
Parameters:
  variable - the variable name of the field to search. the field whose variable matches the specified variable



getFields
public List<FormField> getFields()(Code)
Returns the fields that are part of the form. fields that are part of the form.



getInstructions
public List<String> getInstructions()(Code)
Returns an unmodifiable list of instructions that explain how to fill out the form and what the form is about. The dataform could include multiple instructions since each instruction could not contain newlines characters. an unmodifiable list of instructions that explain how to fill out the form.



getTitle
public String getTitle()(Code)
Returns the description of the data form. It is similar to the title on a web page or an X window. You can put a on either a form to fill out, or a set of data results. description of the data.</td></tr></table><BR><br> <hr width=800><a name="getType"></a><table border=0 width=800><tr><td colspan=2><font size=+1><B>getType</B></font></td></tr><tr><td colspan=2><font size=-1><font color=#7f0055><B>public</B></font> <a href="DataForm.java.htm"><B>DataForm.Type</B></a> getType()</font><A href="DataForm.java.htm#getType">(Code)</a></td></tr><tr><td width=30></td><td> Returns the type of this data form. the data form type.<BR><B>See Also:</B>   org.xmpp.forms.DataForm.Type</td></tr></table><BR><br> <hr width=800><a name="parseBooleanString"></a><table border=0 width=800><tr><td colspan=2><font size=+1><B>parseBoolean</B></font></td></tr><tr><td colspan=2><font size=-1><font color=#7f0055><B>public</B></font> static boolean parseBoolean(<a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> booleanString) throws <a href="../../../../../6.0-JDK-Core/text/java/text/ParseException.java.htm"><B>ParseException</B></a></font><A href="DataForm.java.htm#parseBooleanString">(Code)</a></td></tr><tr><td width=30></td><td></td></tr></table><BR><br> <hr width=800><a name="parseDateString"></a><table border=0 width=800><tr><td colspan=2><font size=+1><B>parseDate</B></font></td></tr><tr><td colspan=2><font size=-1><font color=#7f0055><B>public</B></font> static <a href="../../../../../6.0-JDK-Core/Collections-Jar-Zip-Logging-regex/java/util/Date.java.htm"><B>Date</B></a> parseDate(<a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> date) throws <a href="../../../../../6.0-JDK-Core/text/java/text/ParseException.java.htm"><B>ParseException</B></a></font><A href="DataForm.java.htm#parseDateString">(Code)</a></td></tr><tr><td width=30></td><td> Returns the Date obtained by parsing the specified date representation. The date representation is expected to be in the UTC GMT+0 format. <BR><B>Parameters:</B><BR>  date - date representation in the UTC GMT+0 format. the Date obtained by parsing the specified date representation.<BR><B>throws:</B><BR>  <a href="../../../../../6.0-JDK-Core/text/java/text/ParseException.java.htm"><B>ParseException</B></a> - if an error occurs while parsing the date representation.</td></tr></table><BR><br> <hr width=800><a name="removeFieldString"></a><table border=0 width=800><tr><td colspan=2><font size=+1><B>removeField</B></font></td></tr><tr><td colspan=2><font size=-1><font color=#7f0055><B>public</B></font> boolean removeField(<a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> variable)</font><A href="DataForm.java.htm#removeFieldString">(Code)</a></td></tr><tr><td width=30></td><td> Removes the field whose variable matches the specified variable. <BR><B>Parameters:</B><BR>  variable - the variable name of the field to remove. true if the field was removed.</td></tr></table><BR><br> <hr width=800><a name="setTitleString"></a><table border=0 width=800><tr><td colspan=2><font size=+1><B>setTitle</B></font></td></tr><tr><td colspan=2><font size=-1><font color=#7f0055><B>public</B></font> void setTitle(<a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> title)</font><A href="DataForm.java.htm#setTitleString">(Code)</a></td></tr><tr><td width=30></td><td> Sets the description of the data. It is similar to the title on a web page or an X window. You can put a <title/> on either a form to fill out, or a set of data results. <BR><B>Parameters:</B><BR>  title - description of the data.</td></tr></table><BR><br> <hr width=800><table border=1 width=800><tr bgColor=#ccccff><td>Fields inherited from <B>org.xmpp.packet.PacketExtension</B></td></tr><tr><td><font color=#7f0055><B>protected</B></font> static DocumentFactory docFactory<A href="../packet/PacketExtension.java.htm#docFactory">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#docFactory">(Java Doc)</a><br><font color=#7f0055><B>protected</B></font> Element element<A href="../packet/PacketExtension.java.htm#element">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#element">(Java Doc)</a><br><font color=#7f0055><B>protected</B></font> static <a href="../../../../../6.0-JDK-Core/Collections-Jar-Zip-Logging-regex/java/util/Map.java.htm"><B>Map</B></a><QName, <a href="../../../../../6.0-JDK-Core/lang/java/lang/Class.java.htm"><B>Class</B></a>> registeredExtensions<A href="../packet/PacketExtension.java.htm#registeredExtensions">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#registeredExtensions">(Java Doc)</a><br></td></tr></table><br><table border=1 width=800><tr bgColor=#ccccff><td>Methods inherited from <B>org.xmpp.packet.PacketExtension</B></td></tr><tr><td><font color=#7f0055><B>public</B></font> <a href="../packet/PacketExtension.java.htm"><B>PacketExtension</B></a> createCopy()<A href="../packet/PacketExtension.java.htm#createCopy">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#createCopy">(Java Doc)</a><br><font color=#7f0055><B>public</B></font> Element getElement()<A href="../packet/PacketExtension.java.htm#getElement">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#getElement">(Java Doc)</a><br><font color=#7f0055><B>public</B></font> static <a href="../../../../../6.0-JDK-Core/lang/java/lang/Class.java.htm"><B>Class</B></a> getExtensionClass(<a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> name, <a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> namespace)<A href="../packet/PacketExtension.java.htm#getExtensionClassStringString">(Code)</a><A href="../packet/PacketExtension.java.java-doc.htm#getExtensionClassStringString">(Java Doc)</a><br></td></tr></table><br><table border=1 width=800><tr bgColor=#ccccff><td>Methods inherited from <B>java.lang.Object</B></td></tr><tr><td>native <font color=#7f0055><B>protected</B></font> <a href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm"><B>Object</B></a> clone() throws <a href="../../../../../6.0-JDK-Core/lang/java/lang/CloneNotSupportedException.java.htm"><B>CloneNotSupportedException</B></a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#clone">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#clone">(Java Doc)</a><br><font color=#7f0055><B>public</B></font> boolean equals(<a href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm"><B>Object</B></a> obj)<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#equalsObject">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#equalsObject">(Java Doc)</a><br><font color=#7f0055><B>protected</B></font> void finalize() throws <a href="../../../../../6.0-JDK-Core/lang/java/lang/Throwable.java.htm"><B>Throwable</B></a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#finalize">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#finalize">(Java Doc)</a><br>final native <font color=#7f0055><B>public</B></font> <a href="../../../../../6.0-JDK-Core/lang/java/lang/Class.java.htm"><B>Class</B></a><?> getClass()<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#getClass">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#getClass">(Java Doc)</a><br>native <font color=#7f0055><B>public</B></font> int hashCode()<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#hashCode">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#hashCode">(Java Doc)</a><br>final native <font color=#7f0055><B>public</B></font> void notify()<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#notify">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#notify">(Java Doc)</a><br>final native <font color=#7f0055><B>public</B></font> void notifyAll()<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#notifyAll">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#notifyAll">(Java Doc)</a><br><font color=#7f0055><B>public</B></font> <a href="../../../../../6.0-JDK-Core/lang/java/lang/String.java.htm"><B>String</B></a> toString()<A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#toString">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#toString">(Java Doc)</a><br>final native <font color=#7f0055><B>public</B></font> void wait(long timeout) throws <a href="../../../../../6.0-JDK-Core/lang/java/lang/InterruptedException.java.htm"><B>InterruptedException</B></a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#waitlong">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#waitlong">(Java Doc)</a><br>final <font color=#7f0055><B>public</B></font> void wait(long timeout, int nanos) throws <a href="../../../../../6.0-JDK-Core/lang/java/lang/InterruptedException.java.htm"><B>InterruptedException</B></a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#waitlongint">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#waitlongint">(Java Doc)</a><br>final <font color=#7f0055><B>public</B></font> void wait() throws <a href="../../../../../6.0-JDK-Core/lang/java/lang/InterruptedException.java.htm"><B>InterruptedException</B></a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.htm#wait">(Code)</a><A href="../../../../../6.0-JDK-Core/lang/java/lang/Object.java.java-doc.htm#wait">(Java Doc)</a><br></td></tr></table><br></td></tr></table></td></tr></table><TABLE border=0><TR><TD height=10></TD></TR></TABLE> <script type="text/javascript"><!-- google_ad_client="pub-1725451137117542";google_ad_width=728;google_ad_height=90;google_ad_format="728x90_as";google_ad_type="text_image";google_ad_channel="";google_color_border="ffffff";google_color_bg="ffffff";google_color_link="003399";google_color_text="000000";google_color_url="75a3ed"; //--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></td></tr></table></td></tr></table><center><TABLE border=0><TR align=left><TD><A href="/index.html">www.java2java.com</A> | <A href=../../../../../../../html/contact.htm>Contact Us</A></Td></TR><TR align=left><TD class=Templatetext>Copyright 2009 - 12 Demo Source and Support. All rights reserved.</TD></TR><TR align=left><TD>All other trademarks are property of their respective owners.</TD></TR></TABLE></center></BODY></HTML>