public void setProperties ( Collection properties ) throws DAVException { Assert . isNotNull ( properties ) ; // Setting no properties is a no-op. if ( properties . isEmpty ( ) ) return ; // Build the request body to describe the properties to set. Document document = newDocument ( ) ; PropertyUpdate propertyUpdate = PropertyUpdate . create ( document ) ; Prop prop = propertyUpdate . addSet ( ) ; Iterator propertiesItr = properties . iterator ( ) ; while ( propertiesItr . hasNext ( ) ) { Element element = ( Element ) propertiesItr . next ( ) ; try { prop . addProperty ( element ) ; } catch ( MalformedElementException exception ) { throw new SystemException ( exception ) ; } } // end-while // Send the request to the server and examine the response for failures. IResponse response = null ; try { response = davClient . proppatch ( locator , newContext ( ) , document ) ; examineResponse ( response ) ; examineMultiStatusResponse ( response ) ; } catch ( IOException e ) { throw new SystemException ( e ) ; } finally { closeResponse ( response ) ; } }
Set the given properties on this resource .