drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/Precondition.java
public void addCondition(Condition condition) throws WebDAVException {
        // a Resource URI can only be specified once in a Precondition
        Enumeration conditions = getConditions();
        if (condition.getResourceURI() != null) {
            while (conditions.hasMoreElements()) {
                Condition existingCondition = (Condition) conditions.nextElement();
                if (existingCondition.getResourceURI() != null && existingCondition.getResourceURI().equals(condition.getResourceURI()))
                    throw new WebDAVException(IResponse.SC_BAD_REQUEST, Policy.bind("error.parseMultipleSpecification", condition.getResourceURI())); //$NON-NLS-1$
            }
        }
        this.conditions.addElement(condition);
    }
public void addCondition(Condition condition) throws WebDAVException {
        // a Resource URI can only be specified once in a Precondition
        Enumeration conditions = getConditions();
        if (condition.getResourceURI() != null) {
            while (conditions.hasMoreElements()) {
                Condition existingCondition = (Condition) conditions.nextElement();
                if (existingCondition.getResourceURI() != null && existingCondition.getResourceURI().equals(condition.getResourceURI()))
                    throw new WebDAVException(IResponse.SC_BAD_REQUEST, Policy.bind("error.parseMultipleSpecification", condition.getResourceURI())); //$NON-NLS-1$
            }
        }
        this.conditions.addElement(condition);
    }
public void addCondition ( Condition condition ) throws WebDAVException { // a Resource URI can only be specified once in a Precondition Enumeration conditions = getConditions ( ) ; if ( condition . getResourceURI ( ) != null ) { while ( conditions . hasMoreElements ( ) ) { Condition existingCondition = ( Condition ) conditions . nextElement ( ) ; if ( existingCondition . getResourceURI ( ) != null && existingCondition . getResourceURI ( ) . equals ( condition . getResourceURI ( ) ) ) throw new WebDAVException ( IResponse . SC_BAD_REQUEST , Policy . bind ( "error.parseMultipleSpecification" , condition . getResourceURI ( ) ) ) ; //$NON-NLS-1$ } } this . conditions . addElement ( condition ) ; }
Add a Condition to this Precondition. Conditions are OR'd together to
check for a matching resource.

@param condition the Condition to add
@exception WebDAVException thrown if the precondition already contains this condition
Add a Condition to this Precondition . Conditions are OR d together to check for a matching resource .