Openfire 3.4.3 Javadoc

org.jivesoftware.openfire.forms
Interface DataForm


public interface DataForm

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:

In case the form represents a search, the report will be structured in columns and rows. Use addReportedField(FormField) to set the columns of the report whilst the report's rows can be configured using addItemFields(ArrayList).

Author:
gdombiak

Field Summary
static String TYPE_CANCEL
           
static String TYPE_FORM
           
static String TYPE_RESULT
           
static String TYPE_SUBMIT
           
 
Method Summary
 void addField(FormField field)
          Adds a new field as part of the form.
 void addInstruction(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.
 void addItemFields(ArrayList itemFields)
          Adds a new row of items of reported data.
 void addReportedField(FormField field)
          Adds a field to the list of fields that will be returned from a search.
 FormField getField(String variable)
          Returns the field of the form whose variable matches the specified variable.
 Iterator getFields()
          Returns an Iterator for the fields that are part of the form.
 int getFieldsSize()
          Returns the number of fields included in the form.
 Iterator getInstructions()
          Returns an Iterator for the list of instructions that explain how to fill out the form and what the form is about.
 String getTitle()
          Returns the description of the data.
 String getType()
          Returns the meaning of the data within the context.
 void setInstructions(List instructions)
          Sets the list of instructions that explain how to fill out the form and what the form is about.
 void setTitle(String title)
          Sets the description of the data.
 

Field Detail

TYPE_FORM

static final String TYPE_FORM
See Also:
Constant Field Values

TYPE_SUBMIT

static final String TYPE_SUBMIT
See Also:
Constant Field Values

TYPE_CANCEL

static final String TYPE_CANCEL
See Also:
Constant Field Values

TYPE_RESULT

static final String TYPE_RESULT
See Also:
Constant Field Values
Method Detail

setTitle

void setTitle(String title)
Sets the description of the data. 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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>title</CODE> - description of the data.</DL> </DD> </DL> <HR> <A NAME="setInstructions(java.util.List)"><!-- --></A><H3> setInstructions</H3> <PRE> void <B>setInstructions</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A> instructions)</PRE> <DL> <DD>Sets 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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>instructions</CODE> - list of instructions that explain how to fill out the form.</DL> </DD> </DL> <HR> <A NAME="getType()"><!-- --></A><H3> getType</H3> <PRE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getType</B>()</PRE> <DL> <DD>Returns the meaning of the data within the context. The data could be part of a form to fill out, a form submission or data results.<p> <p/> Possible form types are: <ul> <li>form -> This packet contains a form to fill out. Display it to the user (if your program can).</li> <li>submit -> The form is filled out, and this is the data that is being returned from the form.</li> <li>cancel -> The form was cancelled. Tell the asker that piece of information.</li> <li>result -> Data results being returned from a search, or some other query.</li> </ul> <P> <DD><DL> <DT><B>Returns:</B><DD>the form's type.</DL> </DD> </DL> <HR> <A NAME="getTitle()"><!-- --></A><H3> getTitle</H3> <PRE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getTitle</B>()</PRE> <DL> <DD>Returns 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. <P> <DD><DL> <DT><B>Returns:</B><DD>description of the data.</DL> </DD> </DL> <HR> <A NAME="getInstructions()"><!-- --></A><H3> getInstructions</H3> <PRE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getInstructions</B>()</PRE> <DL> <DD>Returns an Iterator for 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. Join the instructions together in order to show them to the user. <P> <DD><DL> <DT><B>Returns:</B><DD>an Iterator for the list of instructions that explain how to fill out the form.</DL> </DD> </DL> <HR> <A NAME="getField(java.lang.String)"><!-- --></A><H3> getField</H3> <PRE> <A HREF="../../../../org/jivesoftware/openfire/forms/FormField.html" title="interface in org.jivesoftware.openfire.forms">FormField</A> <B>getField</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> variable)</PRE> <DL> <DD>Returns the field of the form whose variable matches the specified variable. The fields of type FIXED will never be returned since they do not specify a variable. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>variable</CODE> - the variable to look for in the form fields. <DT><B>Returns:</B><DD>the field of the form whose variable matches the specified variable.</DL> </DD> </DL> <HR> <A NAME="getFields()"><!-- --></A><H3> getFields</H3> <PRE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getFields</B>()</PRE> <DL> <DD>Returns an Iterator for the fields that are part of the form. <P> <DD><DL> <DT><B>Returns:</B><DD>an Iterator for the fields that are part of the form.</DL> </DD> </DL> <HR> <A NAME="getFieldsSize()"><!-- --></A><H3> getFieldsSize</H3> <PRE> int <B>getFieldsSize</B>()</PRE> <DL> <DD>Returns the number of fields included in the form. <P> <DD><DL> <DT><B>Returns:</B><DD>the number of fields included in the form.</DL> </DD> </DL> <HR> <A NAME="addInstruction(java.lang.String)"><!-- --></A><H3> addInstruction</H3> <PRE> void <B>addInstruction</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> instruction)</PRE> <DL> <DD>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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>instruction</CODE> - the new instruction that explain how to fill out the form.</DL> </DD> </DL> <HR> <A NAME="addField(org.jivesoftware.openfire.forms.FormField)"><!-- --></A><H3> addField</H3> <PRE> void <B>addField</B>(<A HREF="../../../../org/jivesoftware/openfire/forms/FormField.html" title="interface in org.jivesoftware.openfire.forms">FormField</A> field)</PRE> <DL> <DD>Adds a new field as part of the form. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>field</CODE> - the field to add to the form.</DL> </DD> </DL> <HR> <A NAME="addReportedField(org.jivesoftware.openfire.forms.FormField)"><!-- --></A><H3> addReportedField</H3> <PRE> void <B>addReportedField</B>(<A HREF="../../../../org/jivesoftware/openfire/forms/FormField.html" title="interface in org.jivesoftware.openfire.forms">FormField</A> field)</PRE> <DL> <DD>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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>field</CODE> - the field to add to the list of fields that will be returned from a search.</DL> </DD> </DL> <HR> <A NAME="addItemFields(java.util.ArrayList)"><!-- --></A><H3> addItemFields</H3> <PRE> void <B>addItemFields</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A> itemFields)</PRE> <DL> <DD>Adds a new row of items of reported data. The list of items to add will be formed by FormFields. Each FormField variable <b>must</b> be valid (i.e. the variable must be defined by the FormFields added as ReportedField. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>itemFields</CODE> - list of FormFields to add as a row in the report.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">  <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Openfire 3.4.3 Javadoc</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  PREV CLASS   <A HREF="../../../../org/jivesoftware/openfire/forms/FormField.html" title="interface in org.jivesoftware.openfire.forms"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/openfire/forms/DataForm.html" target="_top"><B>FRAMES</B></A>    <A HREF="DataForm.html" target="_top"><B>NO FRAMES</B></A>    <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright © 2003-2007 Jive Software.</i> </BODY> </HTML>