View Source
Class PackageController
A controller used for managing packages in the back office
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[Authorize(Policy = "SectionAccessPackages")]
public class PackageController : UmbracoAuthorizedJsonController
Constructors
View Source
PackageController(IPackagingService, IBackOfficeSecurityAccessor, PackageMigrationRunner, ILogger<PackageController>)
Declaration
public PackageController(IPackagingService packagingService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, PackageMigrationRunner packageMigrationRunner, ILogger<PackageController> logger)
Parameters
Type |
Name |
Description |
IPackagingService |
packagingService |
|
IBackOfficeSecurityAccessor |
backofficeSecurityAccessor |
|
PackageMigrationRunner |
packageMigrationRunner |
|
Microsoft.Extensions.Logging.ILogger<PackageController> |
logger |
|
Methods
View Source
DeleteCreatedPackage(Int32)
Deletes a created package
Declaration
[HttpPost]
[HttpDelete]
public IActionResult DeleteCreatedPackage(int packageId)
Parameters
Type |
Name |
Description |
System.Int32 |
packageId |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
DownloadCreatedPackage(Int32)
Declaration
[HttpGet]
public IActionResult DownloadCreatedPackage(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
GetCreatedPackageById(Int32)
Declaration
public ActionResult<PackageDefinition> GetCreatedPackageById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<PackageDefinition> |
|
View Source
GetCreatedPackages()
Declaration
public IEnumerable<PackageDefinition> GetCreatedPackages()
Returns
Type |
Description |
IEnumerable<PackageDefinition> |
|
View Source
GetEmpty()
Declaration
public PackageDefinition GetEmpty()
Returns
Type |
Description |
PackageDefinition |
|
View Source
GetInstalled()
Returns all installed packages - only shows their latest versions
Declaration
public IEnumerable<InstalledPackage> GetInstalled()
Returns
Type |
Description |
IEnumerable<InstalledPackage> |
|
View Source
GetInstalledPackageByName(String)
Declaration
public ActionResult<InstalledPackage> GetInstalledPackageByName([FromQuery] string packageName)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<InstalledPackage> |
|
View Source
PostSavePackage(PackageDefinition)
Creates or updates a package
Declaration
public ActionResult<PackageDefinition> PostSavePackage(PackageDefinition model)
Parameters
Type |
Name |
Description |
PackageDefinition |
model |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<PackageDefinition> |
|
View Source
RunMigrations(String)
Declaration
[HttpPost]
public ActionResult<IEnumerable<InstalledPackage>> RunMigrations([FromQuery] string packageName)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<IEnumerable<InstalledPackage>> |
|