Search in sources :

Example 1 with JidMultiFormField

use of org.jivesoftware.smackx.xdata.JidMultiFormField in project Smack by igniterealtime.

the class ConfigureFormReader method getChildrenAssociationWhitelist.

/**
 * List of JID's that are on the whitelist that determines who can associate child nodes
 * with the collection node.  This is only relevant if {@link #getChildrenAssociationPolicy()} is set to
 * {@link ChildrenAssociationPolicy#whitelist}.
 *
 * @return List of the whitelist
 */
default List<Jid> getChildrenAssociationWhitelist() {
    FormField formField = getField(ConfigureNodeFields.children_association_whitelist.getFieldName());
    if (formField == null) {
        Collections.emptyList();
    }
    JidMultiFormField jidMultiFormField = formField.ifPossibleAs(JidMultiFormField.class);
    return jidMultiFormField.getValues();
}
Also used : JidMultiFormField(org.jivesoftware.smackx.xdata.JidMultiFormField) JidMultiFormField(org.jivesoftware.smackx.xdata.JidMultiFormField) FormField(org.jivesoftware.smackx.xdata.FormField)

Aggregations

FormField (org.jivesoftware.smackx.xdata.FormField)1 JidMultiFormField (org.jivesoftware.smackx.xdata.JidMultiFormField)1