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 .