Search Results for

    Show / Hide Table of Contents
    View Source

    Class PackagesRepository

    Manages the storage of installed/created package definitions

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Packaging
    Assembly: Umbraco.Core.dll
    Syntax
    [Obsolete("Packages have now been moved to the database instead of local files, please use CreatedPackageSchemaRepository instead")]
    public class PackagesRepository : ICreatedPackagesRepository, IPackageDefinitionRepository

    Constructors

    View Source

    PackagesRepository(IContentService, IContentTypeService, IDataTypeService, IFileService, ILocalizationService, IHostingEnvironment, IEntityXmlSerializer, IOptions<GlobalSettings>, IMediaService, IMediaTypeService, MediaFileManager, FileSystems, string, string?, string?, string?)

    Constructor

    Declaration
    public PackagesRepository(IContentService contentService, IContentTypeService contentTypeService, IDataTypeService dataTypeService, IFileService fileService, ILocalizationService languageService, IHostingEnvironment hostingEnvironment, IEntityXmlSerializer serializer, IOptions<GlobalSettings> globalSettings, IMediaService mediaService, IMediaTypeService mediaTypeService, MediaFileManager mediaFileManager, FileSystems fileSystems, string packageRepositoryFileName, string? tempFolderPath = null, string? packagesFolderPath = null, string? mediaFolderPath = null)
    Parameters
    Type Name Description
    IContentService contentService
    IContentTypeService contentTypeService
    IDataTypeService dataTypeService
    IFileService fileService
    ILocalizationService languageService
    IHostingEnvironment hostingEnvironment
    IEntityXmlSerializer serializer
    IOptions<GlobalSettings> globalSettings
    IMediaService mediaService
    IMediaTypeService mediaTypeService
    MediaFileManager mediaFileManager
    FileSystems fileSystems
    string packageRepositoryFileName

    The file name for storing the package definitions (i.e. "createdPackages.config")

    string tempFolderPath
    string packagesFolderPath
    string mediaFolderPath

    Methods

    View Source

    Delete(int)

    Declaration
    public void Delete(int id)
    Parameters
    Type Name Description
    int id
    View Source

    DeleteLocalRepositoryFiles()

    Declaration
    public void DeleteLocalRepositoryFiles()
    View Source

    ExportPackage(PackageDefinition)

    Creates the package file and returns it's physical path

    Declaration
    public string ExportPackage(PackageDefinition definition)
    Parameters
    Type Name Description
    PackageDefinition definition
    Returns
    Type Description
    string
    View Source

    GetAll()

    Declaration
    public IEnumerable<PackageDefinition?> GetAll()
    Returns
    Type Description
    IEnumerable<PackageDefinition>
    View Source

    GetById(int)

    Declaration
    public PackageDefinition? GetById(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    PackageDefinition
    View Source

    GetByKey(Guid)

    Declaration
    public PackageDefinition? GetByKey(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    PackageDefinition
    View Source

    SavePackage(PackageDefinition)

    Persists a package definition to storage

    Declaration
    public bool SavePackage(PackageDefinition definition)
    Parameters
    Type Name Description
    PackageDefinition definition
    Returns
    Type Description
    bool

    true if creating/updating the package was successful, otherwise false

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX