Interface IMediaContentService
Summary description for IMediaContentService.
Namespace: ImageVault.Core.Common.Services
Assembly: ImageVault.Core.dll
Syntax
public interface IMediaContentService
Methods
AnalyzeAndUpdateUploadedMedia(DbMediaContentReference, IUpload, UploadContentId, BinaryHttpMediaContent)
Analyzes and updates an uploaded media
Declaration
void AnalyzeAndUpdateUploadedMedia(DbMediaContentReference mcRef, IUpload upload, UploadContentId uploadContentId, BinaryHttpMediaContent cont)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | mcRef | |
ImageVault.Abstractions.IUpload | upload | |
ImageVault.Abstractions.UploadContentId | uploadContentId | |
BinaryHttpMediaContent | cont |
CleanUpDeletedContent()
Remove all content that has been flaged as deleted
Declaration
void CleanUpDeletedContent()
Create(DbMediaContentReference)
Creates the supplied media content reference
Declaration
void Create(DbMediaContentReference mcRef)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | mcRef |
FindMediaContentReferences(FindMediaContentReferenceQuery)
Declaration
List<DbMediaContentReference> FindMediaContentReferences(FindMediaContentReferenceQuery query)
Parameters
Type | Name | Description |
---|---|---|
FindMediaContentReferenceQuery | query |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<DbMediaContentReference> |
GetDbMediaContentReference(String)
Get media content by id
Declaration
DbMediaContentReference GetDbMediaContentReference(string mediaContentReferenceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | mediaContentReferenceId |
Returns
Type | Description |
---|---|
DbMediaContentReference |
GetDbPublishedMediaContentReference(String)
Declaration
DbPublishedMediaContentReference GetDbPublishedMediaContentReference(string publishedMediaContentReferenceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | publishedMediaContentReferenceId |
Returns
Type | Description |
---|---|
DbPublishedMediaContentReference |
GetMediaContent(DbMediaContentReference, MediaContentRequestParameters)
Gets the MediaContent from the specified reference
Declaration
MediaContent GetMediaContent(DbMediaContentReference reference, MediaContentRequestParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | reference | The DbMediaContentReference of the content to get |
MediaContentRequestParameters | parameters |
Returns
Type | Description |
---|---|
MediaContent | The found MediaContent or null if no MediaContent was found |
GetMediaContentById(String, Int64, Int64)
Gets the MediaContent from the specified reference
Declaration
MediaContent GetMediaContentById(string mediaContentReferenceId, long offset, long length)
Parameters
Type | Name | Description |
---|---|---|
System.String | mediaContentReferenceId | The mediaContentReferenceId |
System.Int64 | offset | offset in bytes |
System.Int64 | length | The number of bytes to read, 0 to read all. |
Returns
Type | Description |
---|---|
MediaContent | The found MediaContent or null if no MediaContent was found |
GetOrCreateMediaContentReference(Int32, Int32)
Gets or creates a DbMediaContentReference
Declaration
[Obsolete("Use GetOrCreateMediaContentReference(int mediaItemId,int mediaFormatId,string publishIdentifier) instead.")]
DbMediaContentReference GetOrCreateMediaContentReference(int mediaItemId, int mediaFormatId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mediaItemId | The id of the media item whos content to get |
System.Int32 | mediaFormatId | The id of the media conversion to get |
Returns
Type | Description |
---|---|
DbMediaContentReference | The found or created DbMediaContentReference |
GetOrCreateMediaContentReference(Int32, Int32, String)
Gets or creates a DbMediaContentReference
Declaration
[Obsolete("Use GetOrCreateMediaVersionContentReference instead")]
DbMediaContentReference GetOrCreateMediaContentReference(int mediaItemId, int mediaFormatId, string publishIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mediaItemId | The id of the media item whos content to get |
System.Int32 | mediaFormatId | The id of the media conversion to get |
System.String | publishIdentifier | The publishIdentifier used in the query. |
Returns
Type | Description |
---|---|
DbMediaContentReference | The found or created DbMediaContentReference |
GetOrCreateMediaVersionContentReference(Int32, Int32, PublishInfo)
Gets or creates a DbMediaContentReference
Declaration
[Obsolete("Use GetOrCreateMediaVersionContentReference(int, int, CorePublishInfo) instead")]
DbMediaContentReference GetOrCreateMediaVersionContentReference(int versionId, int mediaFormatId, PublishInfo publishInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | versionId | The id of the media version whos content to get |
System.Int32 | mediaFormatId | The id of the media conversion to get |
PublishInfo | publishInfo | The PublishInfo that contains information on where the media should be published |
Returns
Type | Description |
---|---|
DbMediaContentReference | The found or created DbMediaContentReference |
GetOrCreateMediaVersionContentReference(Int32, Int32, CorePublishInfo)
Gets or creates a DbMediaContentReference
Declaration
DbMediaContentReference GetOrCreateMediaVersionContentReference(int versionId, int mediaFormatId, CorePublishInfo publishInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | versionId | The id of the media version whos content to get |
System.Int32 | mediaFormatId | The id of the media conversion to get |
CorePublishInfo | publishInfo | The PublishInfo that contains information on where the media should be published |
Returns
Type | Description |
---|---|
DbMediaContentReference | The found or created DbMediaContentReference |
GetOrCreateMediaVersionContentReference(Int32, Int32, String)
Gets or creates a DbMediaContentReference
Declaration
[Obsolete("Use DbMediaContentReference GetOrCreateMediaVersionContentReference(int versionId, int mediaFormatId, PublishInfo publishInfo) instead")]
DbMediaContentReference GetOrCreateMediaVersionContentReference(int versionId, int mediaFormatId, string publishIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | versionId | The id of the media version whos content to get |
System.Int32 | mediaFormatId | The id of the media conversion to get |
System.String | publishIdentifier | The publishIdentifier used in the query. |
Returns
Type | Description |
---|---|
DbMediaContentReference | The found or created DbMediaContentReference |
GetOriginalMediaContentReference(Int32)
Declaration
DbMediaContentReference GetOriginalMediaContentReference(int versionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | versionId |
Returns
Type | Description |
---|---|
DbMediaContentReference |
GetOriginalMediaContentReferencesAssignedToStoreButNotMarkedAsStored()
Get all original mediaContentReferences that are assigned to a store but not marked as stored
Declaration
[Obsolete("This method will be removed in next major version, Use IMediaVersionRepository.FindByState instead.")]
IList<DbMediaContentReference> GetOriginalMediaContentReferencesAssignedToStoreButNotMarkedAsStored()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<DbMediaContentReference> |
GetOriginalMediaContentReferencesNotAssignedToStore()
Get references to all original media items that has not been assigned to a storage
Declaration
[Obsolete("This method will be removed in next major version, Use IMediaVersionRepository.FindByState instead.")]
List<DbMediaContentReference> GetOriginalMediaContentReferencesNotAssignedToStore()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<DbMediaContentReference> | The System.Collections.Generic.List<T> of references that is missing a storage |
GetPublishedMediaContent(String, MediaContentRequestParameters)
Gets the GetPublishedMediaContent from the specified reference
Declaration
MediaContent GetPublishedMediaContent(string publishedmediaContentReferenceId, MediaContentRequestParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | publishedmediaContentReferenceId | The publishedmediaContentReferenceId |
MediaContentRequestParameters | parameters |
Returns
Type | Description |
---|---|
MediaContent | The found MediaContent or null if no MediaContent was found |
GetZipArchiveContent(String, Range, String)
Gets the ZipArchive content for the supplied key
Declaration
BinaryHttpMediaContent GetZipArchiveContent(string key, Range range, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The zip key |
Range | range | The range of the request to get |
System.String | name | The name to use for the archive |
Returns
Type | Description |
---|---|
BinaryHttpMediaContent |
LookupContentType(String)
Looks up a contentType based on the supplied extension
Declaration
string LookupContentType(string extension)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | Looks upp the supplied extension and returns the mapped contentType. Extension can be supplied with or without the leading dot '.'. |
Returns
Type | Description |
---|---|
System.String | The mapped content type or null if no mapping was found |
LookupExtensions(String)
Looks up a content type and return its mapped extension(s)
Declaration
IList<string> LookupExtensions(string contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentType | The name of the content type |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | a System.Collections.Generic.IList<T> of mapped extension for the supplied contentType. The extensions include the dot separator (ie .txt). If no extension is registered for the supplied contentType, an empty list is returned |
StoreAuxiliaryContent(DbMediaContentReference, AuxiliaryContent)
Stores auxiliary content for the supplied reference
Declaration
void StoreAuxiliaryContent(DbMediaContentReference reference, AuxiliaryContent content)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | reference | |
AuxiliaryContent | content |
StoreContent(DbMediaContentReference, MediaContent)
Store a media item in a storage
Declaration
void StoreContent(DbMediaContentReference reference, MediaContent content)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | reference | reference to the item |
MediaContent | content | the content that should be uploaded |
UpdateReference(DbMediaContentReference)
Updates the supplied content reference
Declaration
void UpdateReference(DbMediaContentReference reference)
Parameters
Type | Name | Description |
---|---|---|
DbMediaContentReference | reference |
UpdateStoredContent(MediaContent)
Updates content that is already stored
Declaration
void UpdateStoredContent(MediaContent content)
Parameters
Type | Name | Description |
---|---|---|
MediaContent | content |