code: public void writePropertyObject(CmsDbContext dbc, CmsResource resource, CmsProperty property) throws CmsException {
  
          try {
              if (property == CmsProperty.getNullProperty()) {
                  // skip empty or null properties
                  return;
              }
  
              // test if and what state should be updated
              // 0: none, 1: structure, 2: resource
              int updateState = getUpdateState(dbc, resource, Collections.singletonList(property));
  
              // write the property
              getVfsDriver(dbc).writePropertyObject(dbc, dbc.currentProject(), resource, property);
  
              if (updateState > 0) {
                  updateState(dbc, resource, updateState == 2);
              }
              // log it
              log(
                  dbc,
                  new CmsLogEntry(
                      dbc,
                      resource.getStructureId(),
                      CmsLogEntryType.RESOURCE_PROPERTIES,
                      new String[] {resource.getRootPath()}),
                  false);
  
          } finally {
              // update the driver manager cache
              m_monitor.clearResourceCache();
              m_monitor.flushCache(CmsMemoryMonitor.CacheType.PROPERTY, CmsMemoryMonitor.CacheType.PROPERTY_LIST);
  
              // fire an event that a property of a resource has been modified
              Map<String, Object> data = new HashMap<String, Object>();
              data.put(I_CmsEventListener.KEY_RESOURCE, resource);
              data.put("property", property);
              OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_PROPERTY_MODIFIED, data));
          }
      }
docs: Writes a property for a specified resource.<p>
  
  @param dbc the current database context
  @param resource the resource to write the property for
  @param property the property to write
  
  @throws CmsException if something goes wrong
  
  @see CmsObject#writePropertyObject(String, CmsProperty)
  @see I_CmsResourceType#writePropertyObject(CmsObject, CmsSecurityManager, CmsResource, CmsProperty)