private boolean nodeMeetsPreconditions( Node node, DataForm preconditions )
    {
        if ( preconditions == null )
        {
            return true;
        }

        final DataForm conditions = node.getConfigurationForm(null);
        for ( final FormField precondition : preconditions.getFields() )
        {
            if ( precondition.getVariable().equals( "FORM_TYPE" ) )
            {
                continue;
            }

            final FormField condition = conditions.getField( precondition.getVariable() );
            if ( condition == null )
            {
                // Unknown condition. Reject.
                return false;
            }

            if ( condition.getValues().size() > 1 )
            {
                if ( !condition.getValues().containsAll( precondition.getValues() ) || !precondition.getValues().containsAll( condition.getValues() ) )
                {
                    // The condition value list does contain different values than the precondtion value list.
                    return false;
                }
            }
            else
            {
                final String a = condition.getFirstValue();
                final String b = precondition.getFirstValue();
                if ( !a.equals( b ) && !(a.equals( "true" ) && b.equals( "1" )) && !(a.equals( "1" ) && b.equals( "true" ))
                                    && !(a.equals( "false" ) && b.equals( "0" )) && !(a.equals( "0" ) && b.equals( "false" )) )
                {
                    return false;
                }
            }
        }
        return true;
    }
Checks of the configuration of the node meets the preconditions, as supplied in the dataform.

This method returns true only if the configuration of the node at least contains each of the fields
defined in the preconditions (with matching values).

@param node The node (cannot be null)
@param preconditions The preconditions (can be null, in which case 'true' is returned).
@return True if all preconditions are met, otherwise false.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubEngine.java