Interface IPackagingService
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface IPackagingService : IService
Methods
Export(IEnumerable<IDataTypeDefinition>, Boolean)
Exports a list of Data Types
Declaration
XElement Export(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IDataTypeDefinition> | dataTypeDefinitions | List of data types to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IDataTypeDefinition objects |
Export(IEnumerable<IDictionaryItem>, Boolean, Boolean)
Exports a list of IDictionaryItem items to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IEnumerable<IDictionaryItem> dictionaryItem, bool includeChildren = true, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IDictionaryItem> | dictionaryItem | List of dictionary items to export |
System.Boolean | includeChildren | Optional boolean indicating whether or not to include children |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IDictionaryItem objects |
Export(IEnumerable<ILanguage>, Boolean)
Exports a list of ILanguage items to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IEnumerable<ILanguage> languages, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ILanguage> | languages | List of Languages to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the Language object |
Export(IEnumerable<IMacro>, Boolean)
Exports a list of IMacro items to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IEnumerable<IMacro> macros, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IMacro> | macros | Macros to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IMacro objects |
Export(IEnumerable<ITemplate>, Boolean)
Exports a list of ITemplate items to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IEnumerable<ITemplate> templates, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ITemplate> | templates | List of Templates to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the ITemplate objects |
Export(IContent, Boolean, Boolean)
Exports an IContent item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IContent content, bool deep = false, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | Content to export |
System.Boolean | deep | Optional parameter indicating whether to include descendents |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the Content object |
Export(IContentType, Boolean)
Exports an IContentType to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IContentType contentType, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IContentType | contentType | ContentType to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the ContentType item |
Export(IDataTypeDefinition, Boolean)
Exports a single Data Type
Declaration
XElement Export(IDataTypeDefinition dataTypeDefinition, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IDataTypeDefinition | dataTypeDefinition | Data type to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IDataTypeDefinition object |
Export(IDictionaryItem, Boolean, Boolean)
Exports a single IDictionaryItem item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IDictionaryItem dictionaryItem, bool includeChildren, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IDictionaryItem | dictionaryItem | Dictionary Item to export |
System.Boolean | includeChildren | Optional boolean indicating whether or not to include children |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IDictionaryItem object |
Export(ILanguage, Boolean)
Exports a single ILanguage item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(ILanguage language, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
ILanguage | language | Language to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the Language object |
Export(IMacro, Boolean)
Exports a single IMacro item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IMacro macro, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IMacro | macro | Macro to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the IMacro object |
Export(IMedia, Boolean, Boolean)
Exports an IMedia item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(IMedia media, bool deep = false, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IMedia | media | Media to export |
System.Boolean | deep | Optional parameter indicating whether to include descendents |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the Media object |
Export(ITemplate, Boolean)
Exports a single ITemplate item to xml as an System.Xml.Linq.XElement
Declaration
XElement Export(ITemplate template, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
ITemplate | template | Template to export |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | System.Xml.Linq.XElement containing the xml representation of the ITemplate object |
FetchPackageFile(Guid, Version, Int32)
This will fetch an Umbraco package file from the package repository and return the relative file path to the downloaded package file
Declaration
string FetchPackageFile(Guid packageId, Version umbracoVersion, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | packageId | |
System.Version | umbracoVersion | |
System.Int32 | userId | The current user id performing the operation |
Returns
Type | Description |
---|---|
System.String |
ImportContent(XElement, Int32, Int32, Boolean)
Imports and saves package xml as IContent
Declaration
IEnumerable<IContent> ImportContent(XElement element, int parentId = -1, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | Xml to import |
System.Int32 | parentId | Optional parent Id for the content being imported |
System.Int32 | userId | Optional Id of the user performing the import |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContent> | An enumrable list of generated content |
ImportContentTypes(XElement, Boolean, Int32, Boolean)
Imports and saves package xml as IContentType
Declaration
IEnumerable<IContentType> ImportContentTypes(XElement element, bool importStructure, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | 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) |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContentType> | An enumrable list of generated ContentTypes |
ImportContentTypes(XElement, Int32, Boolean)
Imports and saves package xml as IContentType
Declaration
IEnumerable<IContentType> ImportContentTypes(XElement element, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | Xml to import |
System.Int32 | userId | Optional id of the User performing the operation. Default is zero (admin) |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContentType> | An enumrable list of generated ContentTypes |
ImportDataTypeDefinitions(XElement, Int32, Boolean)
Imports and saves package xml as IDataTypeDefinition
Declaration
IEnumerable<IDataTypeDefinition> ImportDataTypeDefinitions(XElement element, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | Xml to import |
System.Int32 | userId | Optional id of the User performing the operation. Default is zero (admin). |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDataTypeDefinition> | An enumrable list of generated DataTypeDefinitions |
ImportDictionaryItems(XElement, Boolean)
Imports and saves the 'DictionaryItems' part of the package xml as a list of IDictionaryItem
Declaration
IEnumerable<IDictionaryItem> ImportDictionaryItems(XElement dictionaryItemElementList, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | dictionaryItemElementList | Xml to import |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDictionaryItem> | An enumerable list of dictionary items |
ImportLanguages(XElement, Int32, Boolean)
Imports and saves the 'Languages' part of a package xml as a list of ILanguage
Declaration
IEnumerable<ILanguage> ImportLanguages(XElement languageElementList, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | languageElementList | Xml to import |
System.Int32 | userId | Optional id of the User performing the operation. Default is zero (admin) |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ILanguage> | An enumerable list of generated languages |
ImportMacros(XElement, Int32, Boolean)
Imports and saves the 'Macros' part of a package xml as a list of IMacro
Declaration
IEnumerable<IMacro> ImportMacros(XElement element, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | Xml to import |
System.Int32 | userId | Optional id of the User performing the operation |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMacro> |
ImportTemplates(XElement, Int32, Boolean)
Imports and saves package xml as ITemplate
Declaration
IEnumerable<ITemplate> ImportTemplates(XElement element, int userId = 0, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | element | Xml to import |
System.Int32 | userId | Optional id of the User performing the operation. Default is zero (admin) |
System.Boolean | raiseEvents | Optional parameter indicating whether or not to raise events |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ITemplate> | An enumrable list of generated Templates |