private void handleDataFormElement(@Nonnull final Affiliation actorAffiliation, @Nullable final JID actorJid, @Nonnull final Element formElement)
        throws ForbiddenException, ConflictException, NotAcceptableException, NotAllowedException
    {
        DataForm completedForm = new DataForm(formElement);

        switch(completedForm.getType()) {
        case cancel:
            // If the room was just created (i.e. is locked) and the owner cancels the configuration
            // form then destroy the room
            if (room.isLocked()) {
                room.destroyRoom(null, null);
            }
            break;
            
        case submit:
            // The owner is requesting an instant room
            if (completedForm.getFields().isEmpty()) {
                // Do nothing
            }
            // The owner is requesting a reserved room or is changing the current configuration
            else {
                processConfigurationForm(completedForm, actorAffiliation, actorJid);
            }
            // If the room was locked, unlock it and send to the owner the "room is now unlocked"
            // message
            if (room.isLocked() && !room.isManuallyLocked()) {
                room.unlock(actorAffiliation);
            }
            break;
            
        default:
            Log.warn("cannot handle data form element: " + formElement.asXML());
            break;
        }
    }
Handles packets that includes a data form. The data form was sent using an element with name
"x" and namespace "jabber:x:data".

@param actorAffiliation the room affiliation of the user that sent the data form.
@param actorJid the (real) user address of the user that sent the data form.
@param formElement the element that contains the data form specification.
@throws ForbiddenException    if the user does not have enough privileges.
@throws ConflictException If the room was going to lose all of its owners.
@throws NotAcceptableException if the room requires a password that was not supplied
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQOwnerHandler.java