1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-16 07:51:08 +01:00

Make DataForm type an enum

This commit is contained in:
Florian Schmaus 2015-01-10 20:10:46 +01:00
parent 98c69f6895
commit f1a1215f35
14 changed files with 63 additions and 97 deletions

View file

@ -65,9 +65,9 @@ public class ConfigureForm extends Form
* using the resulting form to create a answer form. See {@link #ConfigureForm(Form)}.
* @param formType
*/
public ConfigureForm(FormType formType)
public ConfigureForm(DataForm.Type formType)
{
super(formType.toString());
super(formType);
}
/**

View file

@ -1,29 +0,0 @@
/**
*
* Copyright the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.pubsub;
import org.jivesoftware.smackx.xdata.Form;
/**
* Defines the allowable types for a {@link Form}
*
* @author Robin Collier
*/
public enum FormType
{
form, submit, cancel, result;
}

View file

@ -50,9 +50,9 @@ public class SubscribeForm extends Form
super(subscribeOptionsForm.getDataFormToSend());
}
public SubscribeForm(FormType formType)
public SubscribeForm(DataForm.Type formType)
{
super(formType.toString());
super(formType);
}
/**