Interface IMediaService
Summary description for IMediaService.
Namespace: ImageVault.Common.Services
Assembly: ImageVault.Common.dll
Syntax
public interface IMediaService : IService
Methods
DeleteMediaItem(Int32)
Deletes a media item with all its metadata, content, conversions and copies
Declaration
void DeleteMediaItem(int mediaItemId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | mediaItemId | The id of the media item to delete |
DeleteMediaItems(List<Int32>)
Deletes a list with media item with all its metadata, content, conversions and copies
Declaration
void DeleteMediaItems(List<int> mediaItemIds)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Int32> | mediaItemIds | The id of the media item to delete |
EnsurePublishingSource(String)
Ensures that the supplied publishing source identifier is registered. If not, it is registered
Declaration
void EnsurePublishingSource(string publishingSourceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | publishingSourceIdentifier | The name of the publishing source identifier |
Exceptions
Type | Condition |
---|---|
LicenseException | If the license don't permit more publishing sources than already registered. |
Find(MediaItemQuery)
Finds one or more media items based on the supplied query
Declaration
List<MediaItem> Find(MediaItemQuery query)
Parameters
Type | Name | Description |
---|---|---|
MediaItemQuery | query | The MediaItemQuery containing filter and population data |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<MediaItem> | The System.Collections.Generic.List<> that matches the query |
GetDeletedMedia(Int32, Int32)
Get a list of all deleted media items
Declaration
IList<MediaItem> GetDeletedMedia(int skip, int take)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | skip | The number of items to skip |
System.Int32 | take | The number of items to take |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<MediaItem> |
PreparePopulateQuery(MediaItemPopulationQuery)
Prepares the populate query and creates an id based query
Declaration
MediaItemPopulationQuery PreparePopulateQuery(MediaItemPopulationQuery q)
Parameters
Type | Name | Description |
---|---|---|
MediaItemPopulationQuery | q | The MediaItemPopulationQuery to populate |
Returns
Type | Description |
---|---|
MediaItemPopulationQuery | The MediaItemPopulationQuery that is populated with id:n |
QueueForCleanup(Int32)
Queues the item for cleanup
Declaration
void QueueForCleanup(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |
Save(IList<MediaItem>, MediaServiceSaveOptions)
Saves the changes to the mediaitem data
Declaration
void Save(IList<MediaItem> mediaItems, MediaServiceSaveOptions saveOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<MediaItem> | mediaItems | The System.Collections.Generic.IList<> to save |
MediaServiceSaveOptions | saveOptions | The MediaServiceSaveOptions telling what data to save |
UndeleteMedia(Int32)
Removes the deleted flag from the mediaitem with the supplied id
Declaration
void UndeleteMedia(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |