code: private List setPropertyInFolder(
          String resourceRootPath,
          String propertyDefinition,
          String newValue,
          boolean recursive) throws CmsException, CmsVfsException {
  
          CmsObject cms = getCms();
  
          // collect the resources to look up
          List resources = new ArrayList();
          if (recursive) {
              resources = cms.readResources(resourceRootPath, CmsResourceFilter.IGNORE_EXPIRATION);
          } else {
              resources.add(resourceRootPath);
          }
  
          List changedResources = new ArrayList(resources.size());
          CmsProperty newProperty = new CmsProperty(propertyDefinition, null, null);
          // create permission set and filter to check each resource
          for (int i = 0; i < resources.size(); i++) {
              // loop through found resources and check property values
              CmsResource res = (CmsResource)resources.get(i);
              CmsProperty property = cms.readPropertyObject(res, propertyDefinition, false);
              if (property.isNullProperty()) {
                  // change structure value
                  newProperty.setStructureValue(newValue);
                  newProperty.setName(propertyDefinition);
                  cms.writePropertyObject(cms.getRequestContext().removeSiteRoot(res.getRootPath()), newProperty);
                  changedResources.add(res);
              } else {
                  // nop
              }
          }
          return changedResources;
      }
docs: Sets the given property with the given value to the given resource
  (potentially recursiv) if it has not been set before.<p>
  
  Returns a list with all sub resources that have been modified this way.<p>
  
  @param resourceRootPath the resource on which property definition values are changed
  @param propertyDefinition the name of the propertydefinition to change the value
  @param newValue the new value of the propertydefinition
  @param recursive if true, change recursively all property values on sub-resources (only for folders)
  
  @return a list with the <code>{@link CmsResource}</code>'s where the property value has been changed
  
  @throws CmsVfsException for now only when the search for the oldvalue failed.
  @throws CmsException if operation was not successful