Tabnine Logo
Form.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jivesoftware.smackx.xdata.Form
constructor

Best Java code snippets using org.jivesoftware.smackx.xdata.Form.<init> (Showing top 9 results out of 315)

origin: igniterealtime/Smack

  @Override
  protected FormNode createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends ExtensionElement> content) {
    return new FormNode(FormNodeType.valueOfFromElementName(currentElement, currentNamespace), attributeMap.get("node"), new Form((DataForm) content.iterator().next()));
  }
}
origin: igniterealtime/Smack

/**
 * Create an instant room. The default configuration will be accepted and the room will become unlocked, i.e.
 * other users are able to join.
 *
 * @throws NoResponseException
 * @throws XMPPErrorException
 * @throws NotConnectedException
 * @throws InterruptedException
 * @see <a href="http://www.xmpp.org/extensions/xep-0045.html#createroom-instant">XEP-45 ยง 10.1.2 Creating an
 *      Instant Room</a>
 */
public void makeInstant() throws NoResponseException, XMPPErrorException, NotConnectedException,
        InterruptedException {
  sendConfigurationForm(new Form(DataForm.Type.submit));
}
origin: igniterealtime/Smack

/**
 * Returns the form of the current stage. Usually it is the form that must
 * be answered to execute the next action. If that is the case it should be
 * used by the requester to fill all the information that the executor needs
 * to continue to the next stage. It can also be the result of the
 * execution.
 *
 * @return the form of the current stage to fill out or the result of the
 *         execution.
 */
public Form getForm() {
  if (data.getForm() == null) {
    return null;
  }
  else {
    return new Form(data.getForm());
  }
}
origin: igniterealtime/Smack

/**
 * Returns a new ReportedData if the stanza is used for gathering data and includes an
 * extension that matches the elementName and namespace "x","jabber:x:data".
 *
 * @param packet the stanza used for gathering data.
 * @return the data form parsed from the stanza or <tt>null</tt> if there was not
 *      a form in the packet.
 */
public static Form getFormFrom(Stanza packet) {
  // Check if the packet includes the DataForm extension
  DataForm dataForm = DataForm.from(packet);
  if (dataForm != null) {
    if (dataForm.getReportedData() == null)
      return new Form(dataForm);
  }
  // Otherwise return null
  return null;
}
origin: igniterealtime/Smack

Form form = new Form(DataForm.Type.submit);
Iterator<String> iter = metadata.keySet().iterator();
while (iter.hasNext()) {
origin: igniterealtime/Smack

Form form = new Form(DataForm.Type.submit);
for (FormField field : getFields()) {
origin: igniterealtime/Smack

command.next(new Form(requestData.getForm()));
if (command.isLastStage()) {
command.complete(new Form(requestData.getForm()));
response.setStatus(Status.completed);
origin: igniterealtime/Smack

@SmackIntegrationTest
public void testFilloutForm() throws NotConnectedException, InterruptedException {
  Form formToSend = new Form(DataForm.Type.form);
  formToSend.setInstructions(
    "Fill out this form to report your case.\nThe case will be created automatically.");
origin: igniterealtime/Spark

/**
 * Creates a new public Conference Room.
 *
 * @param roomName    the name of the room.
 * @param serviceName the service name to use (ex.conference.jivesoftware.com)
 * @return the new ChatRoom created. If an error occured, null will be returned.
 */
public ChatRoom createConferenceRoom(Localpart roomName, DomainBareJid serviceName) {
  EntityBareJid roomAddress = JidCreate.entityBareFrom(roomName, serviceName);
  final MultiUserChat chatRoom = MultiUserChatManager.getInstanceFor( SparkManager.getConnection()).getMultiUserChat( roomAddress);
  final GroupChatRoom room = UIComponentRegistry.createGroupChatRoom(chatRoom);
  try {
    LocalPreferences pref = SettingsManager.getLocalPreferences();
    Resourcepart nickname = pref.getNickname();
    chatRoom.create(nickname);
    // Send an empty room configuration form which indicates that we want
    // an instant room
    chatRoom.sendConfigurationForm(new Form( DataForm.Type.submit ));
  }
  catch (XMPPException | SmackException | InterruptedException e1) {
    Log.error("Unable to send conference room chat configuration form.", e1);
    return null;
  }
  getChatContainer().addChatRoom(room);
  return room;
}
org.jivesoftware.smackx.xdataForm<init>

Javadoc

Creates a new Form of a given type from scratch.

Popular methods of Form

  • createAnswerForm
    Returns a new Form to submit the completed values. The new Form will include all the fields of the o
  • setAnswer
    Sets a new Object value to a given form's field. In fact, the object representation (i.e. #toString)
  • addField
    Adds a new field to complete as part of the form.
  • getDataFormToSend
    Returns a DataForm that serves to send this Form to the server. If the form is of type submit, it ma
  • getField
    Returns the field of the form whose variable matches the specified variable. The fields of type FIXE
  • getFields
    Returns a List of the fields that are part of the form.
  • getFormFrom
    Returns a new ReportedData if the stanza is used for gathering data and includes an extension that m
  • setDefaultAnswer
    Sets the default value as the value of a given form's field. The field whose variable matches the re
  • getInstructions
    Returns the instructions that explain how to fill out the form and what the form is about.
  • getType
    Returns the meaning of the data within the context. The data could be part of a form to fill out, a
  • hasField
    Check if a field with the given variable exists.
  • isFormType
    Returns true if the form is a form to fill out.
  • hasField,
  • isFormType,
  • isSubmitType,
  • setInstructions,
  • setTitle,
  • validateThatFieldIsText

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Notification (javax.management)
  • JTextField (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now