code: @SuppressWarnings("rawtypes")
    public <T extends R> T read(DocumentDescriptor desc,
                                DocumentMetadataReadHandle metadataHandle, T contentHandle,
                                ServerTransform transform, Transaction transaction,
                                String temporalCollection, RequestParameters extraParams)
      throws ResourceNotFoundException, ForbiddenUserException,
      FailedRequestException {
      if (desc == null)
        throw new IllegalArgumentException(
          "Attempt to call read with null DocumentDescriptor");
  
      if (logger.isInfoEnabled())
        logger.info("Reading metadata and content for {}", desc.getUri());
  
      if (metadataHandle != null) {
        HandleImplementation metadataBase = HandleAccessor.checkHandle(
          metadataHandle, "metadata");
        Format metadataFormat = metadataBase.getFormat();
        if (metadataFormat == null
          || (metadataFormat != Format.JSON && metadataFormat != Format.XML)) {
          if (logger.isWarnEnabled())
            logger.warn("Unsupported metadata format {}, using XML",
              metadataFormat.name());
          metadataBase.setFormat(Format.XML);
        }
      }
  
      checkContentFormat(contentHandle);
  
      extraParams = addTemporalParams(extraParams, temporalCollection, null, null);
  
      boolean wasModified = services.getDocument(
        requestLogger,
        desc,
        transaction,
        (metadataHandle != null) ? processedMetadata : null,
        mergeTransformParameters((transform != null) ? transform
          : getReadTransform(), extraParams), metadataHandle, contentHandle);
  
      // TODO: after response, reset metadata and set flag
  
      return wasModified ? contentHandle : null;
    }
docs: /*
  @Override public <T extends R> T read(DocumentDescriptor desc,
  DocumentMetadataReadHandle metadataHandle, T contentHandle, ServerTransform
  transform, Transaction transaction, String temporalCollection) throws
  ResourceNotFoundException, ForbiddenUserException, FailedRequestException {
  return read(desc, metadataHandle, contentHandle, transform, transaction,
  temporalCollection, getReadParams()); }