code: private void updateState(CmsDbContext dbc, CmsResource resource, boolean resourceState)
      throws CmsDataAccessException {
  
          CmsUUID projectId = ((dbc.getProjectId() == null) || dbc.getProjectId().isNullUUID())
          ? dbc.currentProject().getUuid()
          : dbc.getProjectId();
          resource.setUserLastModified(dbc.currentUser().getId());
          if (resourceState) {
              // update the whole resource state
              getVfsDriver(dbc).writeResource(dbc, projectId, resource, UPDATE_RESOURCE_STATE);
          } else {
              // update the structure state
              getVfsDriver(dbc).writeResource(dbc, projectId, resource, UPDATE_STRUCTURE_STATE);
          }
      }
docs: Updates the state of a resource, depending on the <code>resourceState</code> parameter.<p>
  
  @param dbc the db context
  @param resource the resource
  @param resourceState if <code>true</code> the resource state will be updated, if not just the structure state.
  
  @throws CmsDataAccessException if something goes wrong