Search Results for

    Show / Hide Table of Contents
    View Source

    Class PackageDataInstallation

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.Packaging
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class PackageDataInstallation

    Constructors

    View Source

    PackageDataInstallation(IDataValueEditorFactory, ILogger<PackageDataInstallation>, IFileService, IMacroService, ILocalizationService, IDataTypeService, IEntityService, IContentTypeService, IContentService, PropertyEditorCollection, IScopeProvider, IShortStringHelper, IOptions<GlobalSettings>, IConfigurationEditorJsonSerializer, IMediaService, IMediaTypeService, IHostingEnvironment)

    Declaration
    public PackageDataInstallation(IDataValueEditorFactory dataValueEditorFactory, ILogger<PackageDataInstallation> logger, IFileService fileService, IMacroService macroService, ILocalizationService localizationService, IDataTypeService dataTypeService, IEntityService entityService, IContentTypeService contentTypeService, IContentService contentService, PropertyEditorCollection propertyEditors, IScopeProvider scopeProvider, IShortStringHelper shortStringHelper, IOptions<GlobalSettings> globalSettings, IConfigurationEditorJsonSerializer serializer, IMediaService mediaService, IMediaTypeService mediaTypeService, IHostingEnvironment hostingEnvironment)
    Parameters
    Type Name Description
    IDataValueEditorFactory dataValueEditorFactory
    ILogger<PackageDataInstallation> logger
    IFileService fileService
    IMacroService macroService
    ILocalizationService localizationService
    IDataTypeService dataTypeService
    IEntityService entityService
    IContentTypeService contentTypeService
    IContentService contentService
    PropertyEditorCollection propertyEditors
    IScopeProvider scopeProvider
    IShortStringHelper shortStringHelper
    IOptions<GlobalSettings> globalSettings
    IConfigurationEditorJsonSerializer serializer
    IMediaService mediaService
    IMediaTypeService mediaTypeService
    IHostingEnvironment hostingEnvironment
    View Source

    PackageDataInstallation(IDataValueEditorFactory, ILogger<PackageDataInstallation>, IFileService, IMacroService, ILocalizationService, IDataTypeService, IEntityService, IContentTypeService, IContentService, PropertyEditorCollection, IScopeProvider, IShortStringHelper, IConfigurationEditorJsonSerializer, IMediaService, IMediaTypeService)

    Declaration
    public PackageDataInstallation(IDataValueEditorFactory dataValueEditorFactory, ILogger<PackageDataInstallation> logger, IFileService fileService, IMacroService macroService, ILocalizationService localizationService, IDataTypeService dataTypeService, IEntityService entityService, IContentTypeService contentTypeService, IContentService contentService, PropertyEditorCollection propertyEditors, IScopeProvider scopeProvider, IShortStringHelper shortStringHelper, IConfigurationEditorJsonSerializer serializer, IMediaService mediaService, IMediaTypeService mediaTypeService)
    Parameters
    Type Name Description
    IDataValueEditorFactory dataValueEditorFactory
    ILogger<PackageDataInstallation> logger
    IFileService fileService
    IMacroService macroService
    ILocalizationService localizationService
    IDataTypeService dataTypeService
    IEntityService entityService
    IContentTypeService contentTypeService
    IContentService contentService
    PropertyEditorCollection propertyEditors
    IScopeProvider scopeProvider
    IShortStringHelper shortStringHelper
    IConfigurationEditorJsonSerializer serializer
    IMediaService mediaService
    IMediaTypeService mediaTypeService

    Methods

    View Source

    ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<XElement>, Int32, IDictionary<String, TContentTypeComposition>, Int32, IContentTypeBaseService<TContentTypeComposition>, IContentServiceBase<TContentBase>)

    Imports and saves package xml as IContent

    Declaration
    public IEnumerable<TContentBase> ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<XElement> roots, int parentId, IDictionary<string, TContentTypeComposition> importedDocumentTypes, int userId, IContentTypeBaseService<TContentTypeComposition> typeService, IContentServiceBase<TContentBase> service)
        where TContentBase : class, IContentBase where TContentTypeComposition : IContentTypeComposition
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> roots

    The root contents to import from

    System.Int32 parentId

    Optional parent Id for the content being imported

    IDictionary<System.String, TContentTypeComposition> importedDocumentTypes

    A dictionary of already imported document types (basically used as a cache)

    System.Int32 userId

    Optional Id of the user performing the import

    IContentTypeBaseService<TContentTypeComposition> typeService

    The content type base service

    IContentServiceBase<TContentBase> service

    The content service base

    Returns
    Type Description
    IEnumerable<TContentBase>

    An enumerable list of generated content

    Type Parameters
    Name Description
    TContentBase
    TContentTypeComposition
    View Source

    ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<CompiledPackageContentBase>, IDictionary<String, TContentTypeComposition>, Int32, IContentTypeBaseService<TContentTypeComposition>, IContentServiceBase<TContentBase>)

    Declaration
    public IReadOnlyList<TContentBase> ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<CompiledPackageContentBase> docs, IDictionary<string, TContentTypeComposition> importedDocumentTypes, int userId, IContentTypeBaseService<TContentTypeComposition> typeService, IContentServiceBase<TContentBase> service)
        where TContentBase : class, IContentBase where TContentTypeComposition : IContentTypeComposition
    Parameters
    Type Name Description
    IEnumerable<CompiledPackageContentBase> docs
    IDictionary<System.String, TContentTypeComposition> importedDocumentTypes
    System.Int32 userId
    IContentTypeBaseService<TContentTypeComposition> typeService
    IContentServiceBase<TContentBase> service
    Returns
    Type Description
    IReadOnlyList<TContentBase>
    Type Parameters
    Name Description
    TContentBase
    TContentTypeComposition
    View Source

    ImportDataTypes(IReadOnlyCollection<XElement>, Int32)

    Imports and saves package xml as IDataType

    Declaration
    public IReadOnlyList<IDataType> ImportDataTypes(IReadOnlyCollection<XElement> dataTypeElements, int userId)
    Parameters
    Type Name Description
    IReadOnlyCollection<System.Xml.Linq.XElement> dataTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the user

    Returns
    Type Description
    IReadOnlyList<IDataType>

    An enumerable list of generated DataTypeDefinitions

    View Source

    ImportDataTypes(IReadOnlyCollection<XElement>, Int32, out IEnumerable<EntityContainer>)

    Imports and saves package xml as IDataType

    Declaration
    public IReadOnlyList<IDataType> ImportDataTypes(IReadOnlyCollection<XElement> dataTypeElements, int userId, out IEnumerable<EntityContainer> entityContainersInstalled)
    Parameters
    Type Name Description
    IReadOnlyCollection<System.Xml.Linq.XElement> dataTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the user

    IEnumerable<EntityContainer> entityContainersInstalled

    Collection of entity containers installed by the package to be populated with those created in installing data types.

    Returns
    Type Description
    IReadOnlyList<IDataType>

    An enumerable list of generated DataTypeDefinitions

    View Source

    ImportDictionaryItem(XElement, Int32, Nullable<Guid>)

    Declaration
    public IEnumerable<IDictionaryItem> ImportDictionaryItem(XElement dictionaryItemElement, int userId, Guid? parentId)
    Parameters
    Type Name Description
    System.Xml.Linq.XElement dictionaryItemElement
    System.Int32 userId
    System.Nullable<Guid> parentId
    Returns
    Type Description
    IEnumerable<IDictionaryItem>
    View Source

    ImportDictionaryItems(IEnumerable<XElement>, Int32)

    Imports and saves the 'DictionaryItems' part of the package xml as a list of IDictionaryItem

    Declaration
    public IReadOnlyList<IDictionaryItem> ImportDictionaryItems(IEnumerable<XElement> dictionaryItemElementList, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> dictionaryItemElementList

    Xml to import

    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IDictionaryItem>

    An enumerable list of dictionary items

    View Source

    ImportDocumentType(XElement, Int32)

    Declaration
    public IReadOnlyList<IContentType> ImportDocumentType(XElement docTypeElement, int userId)
    Parameters
    Type Name Description
    System.Xml.Linq.XElement docTypeElement
    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IContentType>
    View Source

    ImportDocumentTypes(IEnumerable<XElement>, Int32)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<IContentType> ImportDocumentTypes(IEnumerable<XElement> docTypeElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> docTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    Returns
    Type Description
    IReadOnlyList<IContentType>

    An enumerable list of generated ContentTypes

    View Source

    ImportDocumentTypes(IEnumerable<XElement>, Int32, out IEnumerable<EntityContainer>)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<IContentType> ImportDocumentTypes(IEnumerable<XElement> docTypeElements, int userId, out IEnumerable<EntityContainer> entityContainersInstalled)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> docTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    IEnumerable<EntityContainer> entityContainersInstalled

    Collection of entity containers installed by the package to be populated with those created in installing data types.

    Returns
    Type Description
    IReadOnlyList<IContentType>

    An enumerable list of generated ContentTypes

    View Source

    ImportDocumentTypes<T>(IReadOnlyCollection<XElement>, Boolean, Int32, IContentTypeBaseService<T>)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<T> ImportDocumentTypes<T>(IReadOnlyCollection<XElement> unsortedDocumentTypes, bool importStructure, int userId, IContentTypeBaseService<T> service)
        where T : class, IContentTypeComposition
    Parameters
    Type Name Description
    IReadOnlyCollection<System.Xml.Linq.XElement> unsortedDocumentTypes

    Xml to import

    System.Boolean importStructure

    Boolean indicating whether or not to import the

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    IContentTypeBaseService<T> service

    The content type service.

    Returns
    Type Description
    IReadOnlyList<T>

    An enumerable list of generated ContentTypes

    Type Parameters
    Name Description
    T
    View Source

    ImportDocumentTypes<T>(IReadOnlyCollection<XElement>, Boolean, Int32, IContentTypeBaseService<T>, out IEnumerable<EntityContainer>)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<T> ImportDocumentTypes<T>(IReadOnlyCollection<XElement> unsortedDocumentTypes, bool importStructure, int userId, IContentTypeBaseService<T> service, out IEnumerable<EntityContainer> entityContainersInstalled)
        where T : class, IContentTypeComposition
    Parameters
    Type Name Description
    IReadOnlyCollection<System.Xml.Linq.XElement> unsortedDocumentTypes

    Xml to import

    System.Boolean importStructure

    Boolean indicating whether or not to import the

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    IContentTypeBaseService<T> service

    The content type service

    IEnumerable<EntityContainer> entityContainersInstalled

    Collection of entity containers installed by the package to be populated with those created in installing data types.

    Returns
    Type Description
    IReadOnlyList<T>

    An enumerable list of generated ContentTypes

    Type Parameters
    Name Description
    T
    View Source

    ImportLanguages(IEnumerable<XElement>, Int32)

    Imports and saves the 'Languages' part of a package xml as a list of ILanguage

    Declaration
    public IReadOnlyList<ILanguage> ImportLanguages(IEnumerable<XElement> languageElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> languageElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation

    Returns
    Type Description
    IReadOnlyList<ILanguage>

    An enumerable list of generated languages

    View Source

    ImportMacroPartialViews(IEnumerable<XElement>, Int32)

    Declaration
    public IReadOnlyList<IPartialView> ImportMacroPartialViews(IEnumerable<XElement> macroPartialViewsElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> macroPartialViewsElements
    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IPartialView>
    View Source

    ImportMacros(IEnumerable<XElement>, Int32)

    Imports and saves the 'Macros' part of a package xml as a list of IMacro

    Declaration
    public IReadOnlyList<IMacro> ImportMacros(IEnumerable<XElement> macroElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> macroElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation

    Returns
    Type Description
    IReadOnlyList<IMacro>
    View Source

    ImportMediaTypes(IEnumerable<XElement>, Int32)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<IMediaType> ImportMediaTypes(IEnumerable<XElement> docTypeElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> docTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    Returns
    Type Description
    IReadOnlyList<IMediaType>

    An enumerable list of generated ContentTypes

    View Source

    ImportMediaTypes(IEnumerable<XElement>, Int32, out IEnumerable<EntityContainer>)

    Imports and saves package xml as IContentType

    Declaration
    public IReadOnlyList<IMediaType> ImportMediaTypes(IEnumerable<XElement> docTypeElements, int userId, out IEnumerable<EntityContainer> entityContainersInstalled)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> docTypeElements

    Xml to import

    System.Int32 userId

    Optional id of the User performing the operation. Default is zero (admin).

    IEnumerable<EntityContainer> entityContainersInstalled

    Collection of entity containers installed by the package to be populated with those created in installing data types.

    Returns
    Type Description
    IReadOnlyList<IMediaType>

    An enumerable list of generated ContentTypes

    View Source

    ImportPartialViews(IEnumerable<XElement>, Int32)

    Declaration
    public IReadOnlyList<IPartialView> ImportPartialViews(IEnumerable<XElement> partialViewElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> partialViewElements
    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IPartialView>
    View Source

    ImportScripts(IEnumerable<XElement>, Int32)

    Declaration
    public IReadOnlyList<IScript> ImportScripts(IEnumerable<XElement> scriptElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> scriptElements
    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IScript>
    View Source

    ImportStylesheets(IEnumerable<XElement>, Int32)

    Declaration
    public IReadOnlyList<IFile> ImportStylesheets(IEnumerable<XElement> stylesheetElements, int userId)
    Parameters
    Type Name Description
    IEnumerable<System.Xml.Linq.XElement> stylesheetElements
    System.Int32 userId
    Returns
    Type Description
    IReadOnlyList<IFile>
    View Source

    ImportTemplate(XElement, Int32)

    Declaration
    public IEnumerable<ITemplate> ImportTemplate(XElement templateElement, int userId)
    Parameters
    Type Name Description
    System.Xml.Linq.XElement templateElement
    System.Int32 userId
    Returns
    Type Description
    IEnumerable<ITemplate>
    View Source

    ImportTemplates(IReadOnlyCollection<XElement>, Int32)

    Imports and saves package xml as ITemplate

    Declaration
    public IReadOnlyList<ITemplate> ImportTemplates(IReadOnlyCollection<XElement> templateElements, int userId)
    Parameters
    Type Name Description
    IReadOnlyCollection<System.Xml.Linq.XElement> templateElements

    Xml to import

    System.Int32 userId

    Optional user id

    Returns
    Type Description
    IReadOnlyList<ITemplate>

    An enumerable list of generated Templates

    View Source

    InstallPackageData(CompiledPackage, Int32)

    Declaration
    public InstallationSummary InstallPackageData(CompiledPackage compiledPackage, int userId)
    Parameters
    Type Name Description
    CompiledPackage compiledPackage
    System.Int32 userId
    Returns
    Type Description
    InstallationSummary
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PackageDataInstallation(IDataValueEditorFactory, ILogger<PackageDataInstallation>, IFileService, IMacroService, ILocalizationService, IDataTypeService, IEntityService, IContentTypeService, IContentService, PropertyEditorCollection, IScopeProvider, IShortStringHelper, IOptions<GlobalSettings>, IConfigurationEditorJsonSerializer, IMediaService, IMediaTypeService, IHostingEnvironment)
      • PackageDataInstallation(IDataValueEditorFactory, ILogger<PackageDataInstallation>, IFileService, IMacroService, ILocalizationService, IDataTypeService, IEntityService, IContentTypeService, IContentService, PropertyEditorCollection, IScopeProvider, IShortStringHelper, IConfigurationEditorJsonSerializer, IMediaService, IMediaTypeService)
    • Methods
      • ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<XElement>, Int32, IDictionary<String, TContentTypeComposition>, Int32, IContentTypeBaseService<TContentTypeComposition>, IContentServiceBase<TContentBase>)
      • ImportContentBase<TContentBase, TContentTypeComposition>(IEnumerable<CompiledPackageContentBase>, IDictionary<String, TContentTypeComposition>, Int32, IContentTypeBaseService<TContentTypeComposition>, IContentServiceBase<TContentBase>)
      • ImportDataTypes(IReadOnlyCollection<XElement>, Int32)
      • ImportDataTypes(IReadOnlyCollection<XElement>, Int32, out IEnumerable<EntityContainer>)
      • ImportDictionaryItem(XElement, Int32, Nullable<Guid>)
      • ImportDictionaryItems(IEnumerable<XElement>, Int32)
      • ImportDocumentType(XElement, Int32)
      • ImportDocumentTypes(IEnumerable<XElement>, Int32)
      • ImportDocumentTypes(IEnumerable<XElement>, Int32, out IEnumerable<EntityContainer>)
      • ImportDocumentTypes<T>(IReadOnlyCollection<XElement>, Boolean, Int32, IContentTypeBaseService<T>)
      • ImportDocumentTypes<T>(IReadOnlyCollection<XElement>, Boolean, Int32, IContentTypeBaseService<T>, out IEnumerable<EntityContainer>)
      • ImportLanguages(IEnumerable<XElement>, Int32)
      • ImportMacroPartialViews(IEnumerable<XElement>, Int32)
      • ImportMacros(IEnumerable<XElement>, Int32)
      • ImportMediaTypes(IEnumerable<XElement>, Int32)
      • ImportMediaTypes(IEnumerable<XElement>, Int32, out IEnumerable<EntityContainer>)
      • ImportPartialViews(IEnumerable<XElement>, Int32)
      • ImportScripts(IEnumerable<XElement>, Int32)
      • ImportStylesheets(IEnumerable<XElement>, Int32)
      • ImportTemplate(XElement, Int32)
      • ImportTemplates(IReadOnlyCollection<XElement>, Int32)
      • InstallPackageData(CompiledPackage, Int32)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX