docs: protected void writeProperty(String propName, String propValue, String oldValue) throws CmsException {
  
          // get the current property object
          CmsProperty currentProperty = getActiveProperties().get(propName);
          if (currentProperty == null) {
              // new property, create new property object
              currentProperty = new CmsProperty();
              currentProperty.setName(propName);
          } else {
              // clone the property, because the original property is frozen
              currentProperty = currentProperty.cloneAsProperty();
          }
  
          // check if there is a parameter value for the current property
          boolean emptyParam = true;
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(propValue)) {
              emptyParam = false;
          }
  
          if (emptyParam) {
              // parameter is empty, check if the property has to be deleted
              if (getActiveProperties().containsKey(propName)) {
                  // lock resource if autolock is enabled
                  checkLock(getParamResource());
                  // determine the value to delete
                  if (currentProperty.getStructureValue() != null) {
                      currentProperty.setStructureValue(CmsProperty.DELETE_VALUE);
                      currentProperty.setResourceValue(null);
                  } else {
                      currentProperty.setResourceValue(CmsProperty.DELETE_VALUE);
                      currentProperty.setStructureValue(null);
                  }
                  // write the updated property object
                  getCms().writePropertyObject(getParamResource(), currentProperty);
              }
          } else {
              // parameter is not empty, check if the value has changed
              if (!propValue.equals(oldValue)) {
                  // lock resource if autolock is enabled
                  checkLock(getParamResource());
                  if ((currentProperty.getStructureValue() == null) && (currentProperty.getResourceValue() == null)) {
                      // new property, determine setting from OpenCms workplace configuration
                      if (OpenCms.getWorkplaceManager().isDefaultPropertiesOnStructure()) {
                          currentProperty.setStructureValue(propValue);
                          currentProperty.setResourceValue(null);
                      } else {
                          currentProperty.setResourceValue(propValue);
                          currentProperty.setStructureValue(null);
                      }
                  } else if (currentProperty.getStructureValue() != null) {
                      // structure value has to be updated
                      currentProperty.setStructureValue(propValue);
                      currentProperty.setResourceValue(null);
                  } else {
                      // resource value has to be updated
                      currentProperty.setResourceValue(propValue);
                      currentProperty.setStructureValue(null);
                  }
                  // set auto-creation of the property to true
                  currentProperty.setAutoCreatePropertyDefinition(true);
                  // write the updated property object
                  getCms().writePropertyObject(getParamResource(), currentProperty);
              }
          }
      }