Class XFormFieldImpl

  • All Implemented Interfaces:
    FormField

    @Deprecated
    public class XFormFieldImpl
    extends Object
    implements FormField
    Deprecated.
    replaced by FormField
    A concrete FormField capable of sending itself to a writer and recover its state from an XMPP stanza.
    Author:
    gdombiak
    • Constructor Detail

      • XFormFieldImpl

        public XFormFieldImpl()
        Deprecated.
      • XFormFieldImpl

        public XFormFieldImpl​(String variable)
        Deprecated.
    • Method Detail

      • getNamespace

        public String getNamespace()
        Deprecated.
      • setNamespace

        public void setNamespace​(String namespace)
        Deprecated.
      • getName

        public String getName()
        Deprecated.
      • setName

        public void setName​(String name)
        Deprecated.
      • asXMLElement

        public org.dom4j.Element asXMLElement()
        Deprecated.
      • addValue

        public void addValue​(String value)
        Deprecated.
        Description copied from interface: FormField
        Adds a default value to the question if the question is part of a form to fill out. Otherwise, adds an answered value to the question.
        Specified by:
        addValue in interface FormField
        Parameters:
        value - a default value or an answered value of the question.
      • clearValues

        public void clearValues()
        Deprecated.
        Description copied from interface: FormField
        Removes all the values of the field.
        Specified by:
        clearValues in interface FormField
      • addOption

        public void addOption​(String label,
                              String value)
        Deprecated.
        Description copied from interface: FormField
        Adds an available option to the question that the user has in order to answer the question.
        Specified by:
        addOption in interface FormField
        Parameters:
        label - a label that represents the option.
        value - the value of the option.
      • setType

        public void setType​(String type)
        Deprecated.
        Description copied from interface: FormField
        Sets an indicative of the format for the data to answer. Valid formats are:
        • text-single -> single line or word of text
        • text-private -> instead of showing the user what they typed, you show ***** to protect it
        • text-multi -> multiple lines of text entry
        • list-single -> given a list of choices, pick one
        • list-multi -> given a list of choices, pick one or more
        • boolean -> 0 or 1, true or false, yes or no. Default value is 0
        • fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
        • hidden -> is not given to the user at all, but returned with the questionnaire
        • jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
        • jid-multi -> multiple entries for JIDs
        Specified by:
        setType in interface FormField
        Parameters:
        type - an indicative of the format for the data to answer.
      • setRequired

        public void setRequired​(boolean required)
        Deprecated.
        Description copied from interface: FormField
        Sets if the question must be answered in order to complete the questionnaire.
        Specified by:
        setRequired in interface FormField
        Parameters:
        required - if the question must be answered in order to complete the questionnaire.
      • setLabel

        public void setLabel​(String label)
        Deprecated.
        Description copied from interface: FormField
        Sets the label of the question which should give enough information to the user to fill out the form.
        Specified by:
        setLabel in interface FormField
        Parameters:
        label - the label of the question.
      • setDescription

        public void setDescription​(String description)
        Deprecated.
        Description copied from interface: FormField
        Sets a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.

        If the question is of type FIXED then the description should remain empty.

        Specified by:
        setDescription in interface FormField
        Parameters:
        description - provides extra clarification about the question.
      • isRequired

        public boolean isRequired()
        Deprecated.
        Description copied from interface: FormField
        Returns true if the question must be answered in order to complete the questionnaire.
        Specified by:
        isRequired in interface FormField
        Returns:
        true if the question must be answered in order to complete the questionnaire.
      • getVariable

        public String getVariable()
        Deprecated.
        Description copied from interface: FormField
        Returns the variable name that the question is filling out.
        Specified by:
        getVariable in interface FormField
        Returns:
        the variable name of the question.
      • getValues

        public Iterator<String> getValues()
        Deprecated.
        Description copied from interface: FormField
        Returns an Iterator for the default values of the question if the question is part of a form to fill out. Otherwise, returns an Iterator for the answered values of the question.
        Specified by:
        getValues in interface FormField
        Returns:
        an Iterator for the default values or answered values of the question.
      • getType

        public String getType()
        Deprecated.
        Description copied from interface: FormField
        Returns an indicative of the format for the data to answer. Valid formats are:
        • text-single -> single line or word of text
        • text-private -> instead of showing the user what they typed, you show ***** to protect it
        • text-multi -> multiple lines of text entry
        • list-single -> given a list of choices, pick one
        • list-multi -> given a list of choices, pick one or more
        • boolean -> 0 or 1, true or false, yes or no. Default value is 0
        • fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
        • hidden -> is not given to the user at all, but returned with the questionnaire
        • jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
        • jid-multi -> multiple entries for JIDs
        Specified by:
        getType in interface FormField
        Returns:
        format for the data to answer.
      • getLabel

        public String getLabel()
        Deprecated.
        Description copied from interface: FormField
        Returns the label of the question which should give enough information to the user to fill out the form.
        Specified by:
        getLabel in interface FormField
        Returns:
        label of the question.
      • getDescription

        public String getDescription()
        Deprecated.
        Description copied from interface: FormField
        Returns a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.

        If the question is of type FIXED then the description should remain empty.

        Specified by:
        getDescription in interface FormField
        Returns:
        description that provides extra clarification about the question.
      • parse

        public void parse​(org.dom4j.Element formElement)
        Deprecated.