View Source
Interface IPackagingService
Assembly: Umbraco.Core.dll
Syntax
public interface IPackagingService : IService
Methods
View Source
DeleteCreatedPackage(Int32, Int32)
Declaration
void DeleteCreatedPackage(int id, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
userId |
|
View Source
DeleteInstalledPackage(Int32, Int32)
Declaration
void DeleteInstalledPackage(int packageId, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
packageId |
|
System.Int32 |
userId |
|
View Source
ExportCreatedPackage(PackageDefinition)
Creates the package file and returns it's physical path
Declaration
string ExportCreatedPackage(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
FetchPackageFileAsync(Guid, Version, Int32)
This will fetch an Umbraco package file from the package repository and return the file name of the downloaded package
Declaration
Task<FileInfo> FetchPackageFileAsync(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.Threading.Tasks.Task<System.IO.FileInfo> |
The file name of the downloaded package which will exist in ~/App_Data/packages
|
View Source
GetAllCreatedPackages()
Declaration
IEnumerable<PackageDefinition> GetAllCreatedPackages()
Returns
View Source
GetAllInstalledPackages()
Declaration
IEnumerable<PackageDefinition> GetAllInstalledPackages()
Returns
View Source
GetCompiledPackageInfo(FileInfo)
Declaration
CompiledPackage GetCompiledPackageInfo(FileInfo packageFile)
Parameters
Type |
Name |
Description |
System.IO.FileInfo |
packageFile |
|
Returns
View Source
GetCreatedPackageById(Int32)
Declaration
PackageDefinition GetCreatedPackageById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetInstalledPackageById(Int32)
Declaration
PackageDefinition GetInstalledPackageById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetInstalledPackageByName(String)
Declaration
IEnumerable<PackageDefinition> GetInstalledPackageByName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<PackageDefinition> |
A list of all package definitions installed for this package (i.e. original install and any upgrades)
|
View Source
GetPackageInstallType(String, SemVersion, out PackageDefinition)
Declaration
PackageInstallType GetPackageInstallType(string packageName, SemVersion packageVersion, out PackageDefinition alreadyInstalled)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
SemVersion |
packageVersion |
|
PackageDefinition |
alreadyInstalled |
If the package is an upgrade, the original/current PackageDefinition is returned
|
Returns
View Source
InstallCompiledPackageData(PackageDefinition, FileInfo, Int32)
Installs the data, entities, objects contained in an umbraco package file (zip)
Declaration
InstallationSummary InstallCompiledPackageData(PackageDefinition packageDefinition, FileInfo packageFile, int userId = -1)
Parameters
Type |
Name |
Description |
PackageDefinition |
packageDefinition |
|
System.IO.FileInfo |
packageFile |
|
System.Int32 |
userId |
|
Returns
View Source
InstallCompiledPackageFiles(PackageDefinition, FileInfo, Int32)
Installs the package files contained in an umbraco package file (zip)
Declaration
IEnumerable<string> InstallCompiledPackageFiles(PackageDefinition packageDefinition, FileInfo packageFile, int userId = -1)
Parameters
Type |
Name |
Description |
PackageDefinition |
packageDefinition |
|
System.IO.FileInfo |
packageFile |
|
System.Int32 |
userId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
View Source
SaveCreatedPackage(PackageDefinition)
Persists a package definition to storage
Declaration
bool SaveCreatedPackage(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
SaveInstalledPackage(PackageDefinition)
Persists a package definition to storage
Declaration
bool SaveInstalledPackage(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
UninstallPackage(String, Int32)
Uninstalls all versions of the package by name
Declaration
UninstallationSummary UninstallPackage(string packageName, int userId = -1)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
System.Int32 |
userId |
|
Returns