/** * Get the ETag of the stream associated with the entity specified. * * @param object $entity The entity instance * (media resource) associated * with the stream for which * the etag is to be obtained. * @param ResourceStreamInfo $resourceStreamInfo This will be null if * media resource is MLE, * if media resource is named * stream then will be the * ResourceStreamInfo * instance holding the * details of named stream. * * @throws InvalidOperationException * @return String Etag */ public function getStreamETag($entity, $resourceStreamInfo) { $eTag = null; $this->_saveContentTypeAndETag(); if (is_null($resourceStreamInfo)) { $this->_loadAndValidateStreamProvider(); $eTag = $this->_streamProvider->getStreamETag($entity, $this->_service->getOperationContext()); } else { $this->_loadAndValidateStreamProvider2(); $eTag = $this->_streamProvider->getStreamETag2($entity, $resourceStreamInfo, $this->_service->getOperationContext()); } $this->_verifyContentTypeOrETagModified('IDSSP::getStreamETag'); if (!self::isETagValueValid($eTag, true)) { throw new InvalidOperationException(Messages::streamProviderWrapperGetStreamETagReturnedInvalidETagFormat()); } return $eTag; }