View Source
  Interface IDocumentVersionRepository
  
  
  
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    public interface IDocumentVersionRepository : IRepository
   
  Methods
  
  
    View Source
  
  DeleteVersions(IEnumerable<Int32>)
  Deletes multiple content versions by ID.
 
  
  Declaration
  
    void DeleteVersions(IEnumerable<int> versionIds)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IEnumerable<System.Int32> | 
        versionIds | 
         | 
      
    
  
  
    View Source
  
  Get(Int32)
  Gets the content version metadata for a specific version.
 
  
  Declaration
  
    ContentVersionMeta Get(int versionId)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        versionId | 
         | 
      
    
  
  Returns
  
  
    View Source
  
  GetCleanupPolicies()
  Gets cleanup policy override settings per content type.
 
  
  Declaration
  
    IReadOnlyCollection<ContentVersionCleanupPolicySettings>? GetCleanupPolicies()
   
  Returns
  
  
    View Source
  
  GetDocumentVersionsEligibleForCleanup()
  Gets a list of all historic content versions.
 
  
  Declaration
  
    IReadOnlyCollection<ContentVersionMeta>? GetDocumentVersionsEligibleForCleanup()
   
  Returns
  
  
    View Source
  
  GetPagedItemsByContentId(Int32, Int64, Int32, out Int64, Nullable<Int32>)
  Gets paginated content versions for given content id paginated.
 
  
  Declaration
  
    IEnumerable<ContentVersionMeta>? GetPagedItemsByContentId(int contentId, long pageIndex, int pageSize, out long totalRecords, int? languageId = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentId | 
         | 
      
      
        | System.Int64 | 
        pageIndex | 
         | 
      
      
        | System.Int32 | 
        pageSize | 
         | 
      
      
        | System.Int64 | 
        totalRecords | 
         | 
      
      
        | System.Nullable<System.Int32> | 
        languageId | 
         | 
      
    
  
  Returns
  
  
    View Source
  
  SetPreventCleanup(Int32, Boolean)
  Updates the prevent cleanup flag on a content version.
 
  
  Declaration
  
    void SetPreventCleanup(int versionId, bool preventCleanup)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        versionId | 
         | 
      
      
        | System.Boolean | 
        preventCleanup | 
         |