• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class PackageController

The PackageController class provides the business class for the packages.

Inheritance
System.Object
ServiceLocator<IPackageController, PackageController>
PackageController
Implements
IPackageController
Inherited Members
ServiceLocator<IPackageController, PackageController>.Instance
ServiceLocator<IPackageController, PackageController>.Factory
ServiceLocator<IPackageController, PackageController>.SetTestableInstance(IPackageController)
ServiceLocator<IPackageController, PackageController>.ClearInstance()
ServiceLocator<IPackageController, PackageController>.GetFactory()
Namespace: DotNetNuke.Services.Installer.Packages
Assembly: DotNetNuke.dll
Syntax
public class PackageController : ServiceLocator<IPackageController, PackageController>, IPackageController

Methods

| Improve this Doc View Source

AddPackage(PackageInfo, Boolean)

The PackageController class provides the business class for the packages.

Declaration
public static int AddPackage(PackageInfo package, bool includeDetail)
Parameters
Type Name Description
PackageInfo package
System.Boolean includeDetail
Returns
Type Description
System.Int32
| Improve this Doc View Source

CanDeletePackage(PackageInfo, PortalSettings)

The PackageController class provides the business class for the packages.

Declaration
public static bool CanDeletePackage(PackageInfo package, PortalSettings portalSettings)
Parameters
Type Name Description
PackageInfo package
PortalSettings portalSettings
Returns
Type Description
System.Boolean
| Improve this Doc View Source

DeleteExtensionPackage(PackageInfo)

DeleteExtensionPackage is used to remove an Extension Package for the System.

Declaration
public void DeleteExtensionPackage(PackageInfo package)
Parameters
Type Name Description
PackageInfo package

The Package you wish to delete.

| Improve this Doc View Source

DeletePackage(PackageInfo)

The PackageController class provides the business class for the packages.

Declaration
public static void DeletePackage(PackageInfo package)
Parameters
Type Name Description
PackageInfo package
| Improve this Doc View Source

DeletePackage(Int32)

The PackageController class provides the business class for the packages.

Declaration
public static void DeletePackage(int packageID)
Parameters
Type Name Description
System.Int32 packageID
| Improve this Doc View Source

GetExtensionPackage(Int32, Func<PackageInfo, Boolean>, Boolean)

GetExtensionPackage is used to retrieve a specific package from the data store.

Declaration
public PackageInfo GetExtensionPackage(int portalId, Func<PackageInfo, bool> predicate, bool useCopy)
Parameters
Type Name Description
System.Int32 portalId

The Id of the portal. Most extension packages do not belong to a specific portal so in most situations developers will need to pass -1 to indicate this. The main situation where the portal Id will have a specific value is for skins which have been installed for a spcific portal/site.

Func<PackageInfo, System.Boolean> predicate

The "search criteria" to use to identify the extension package to retrieve. In most cases this will be a simple lambda method e.g. p => p.Name == "Name".

System.Boolean useCopy

Whether use a copy of the package info object.

Returns
Type Description
PackageInfo

The extension package.

| Improve this Doc View Source

GetExtensionPackage(Int32, Func<PackageInfo, Boolean>)

GetExtensionPackage is used to retrieve a specific package from the data store.

Declaration
public PackageInfo GetExtensionPackage(int portalId, Func<PackageInfo, bool> predicate)
Parameters
Type Name Description
System.Int32 portalId

The Id of the portal. Most extension packages do not belong to a specific portal so in most situations developers will need to pass -1 to indicate this. The main situation where the portal Id will have a specific value is for skins which have been installed for a spcific portal/site.

Func<PackageInfo, System.Boolean> predicate

The "search criteria" to use to identify the extension package to retrieve. In most cases this will be a simple lambda method e.g. p => p.Name == "Name".

Returns
Type Description
PackageInfo

The extension package.

| Improve this Doc View Source

GetExtensionPackages(Int32, Func<PackageInfo, Boolean>)

GetExtensionPackages is used to retrieve packages from the data store.

Declaration
public IList<PackageInfo> GetExtensionPackages(int portalId, Func<PackageInfo, bool> predicate)
Parameters
Type Name Description
System.Int32 portalId

The Id of the portal. Most extension packages do not belong to a specific portal so in most situations developers will need to pass -1 to indicate this. The main situation where the portal Id will have a specific value is for skins which have been installed for a spcific portal/site.

Func<PackageInfo, System.Boolean> predicate

The "search criteria" to use to identify the extension packages to retrieve. In most cases this will be a simple lambda method e.g. p => p.PackageType == "Module".

Returns
Type Description
IList<PackageInfo>

A list of extension packages.

| Improve this Doc View Source

GetExtensionPackages(Int32)

GetExtensionPackages is used to retrieve packages from the data store.

Declaration
public IList<PackageInfo> GetExtensionPackages(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The Id of the portal. Most extension packages do not belong to a specific portal so in most situations developers will need to pass -1 to indicate this. The main situation where the portal Id will have a specific value is for skins which have been installed for a spcific portal/site.

Returns
Type Description
IList<PackageInfo>

A list of extension packages.

| Improve this Doc View Source

GetExtensionPackageType(Func<PackageType, Boolean>)

GetExtensionPackage is used to retrieve a specific package type from the data store.

Declaration
public PackageType GetExtensionPackageType(Func<PackageType, bool> predicate)
Parameters
Type Name Description
Func<PackageType, System.Boolean> predicate

The "search criteria" to use to identify the package type to retrieve. In most cases this will be a simple lambda method e.g. t => t.PackageType == "Modules".

Returns
Type Description
PackageType

A package type.

| Improve this Doc View Source

GetExtensionPackageTypes()

GetExtensionPackageTypes is used to retrieve package types from the data store.

Declaration
public IList<PackageType> GetExtensionPackageTypes()
Returns
Type Description
IList<PackageType>

A list of package types.

| Improve this Doc View Source

GetFactory()

Gets the service locator factory.

Declaration
protected override Func<IPackageController> GetFactory()
Returns
Type Description
Func<IPackageController>

A factory function.

Overrides
DotNetNuke.Framework.ServiceLocator<DotNetNuke.Services.Installer.Packages.IPackageController, DotNetNuke.Services.Installer.Packages.PackageController>.GetFactory()
| Improve this Doc View Source

GetModulePackagesInUse(Int32, Boolean)

The PackageController class provides the business class for the packages.

Declaration
public static IDictionary<int, PackageInfo> GetModulePackagesInUse(int portalID, bool forHost)
Parameters
Type Name Description
System.Int32 portalID
System.Boolean forHost
Returns
Type Description
IDictionary<System.Int32, PackageInfo>
| Improve this Doc View Source

GetPackage(Int32, Boolean)

The PackageController class provides the business class for the packages.

Declaration
public static PackageInfo GetPackage(int packageID, bool ignoreCache)
Parameters
Type Name Description
System.Int32 packageID
System.Boolean ignoreCache
Returns
Type Description
PackageInfo
| Improve this Doc View Source

GetPackage(Int32)

The PackageController class provides the business class for the packages.

Declaration
public static PackageInfo GetPackage(int packageID)
Parameters
Type Name Description
System.Int32 packageID
Returns
Type Description
PackageInfo
| Improve this Doc View Source

GetPackageByName(Int32, String)

The PackageController class provides the business class for the packages.

Declaration
public static PackageInfo GetPackageByName(int portalId, string name)
Parameters
Type Name Description
System.Int32 portalId
System.String name
Returns
Type Description
PackageInfo
| Improve this Doc View Source

GetPackageByName(String)

The PackageController class provides the business class for the packages.

Declaration
public static PackageInfo GetPackageByName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
PackageInfo
| Improve this Doc View Source

GetPackageDependencies(Func<PackageDependencyInfo, Boolean>)

Get the dependencies for a package.

Declaration
public IList<PackageDependencyInfo> GetPackageDependencies(Func<PackageDependencyInfo, bool> predicate)
Parameters
Type Name Description
Func<PackageDependencyInfo, System.Boolean> predicate
Returns
Type Description
IList<PackageDependencyInfo>

A List of PackageDependencyInfo objects.

| Improve this Doc View Source

GetPackages()

The PackageController class provides the business class for the packages.

Declaration
public static List<PackageInfo> GetPackages()
Returns
Type Description
List<PackageInfo>
| Improve this Doc View Source

GetPackages(Int32)

The PackageController class provides the business class for the packages.

Declaration
public static List<PackageInfo> GetPackages(int portalId)
Parameters
Type Name Description
System.Int32 portalId
Returns
Type Description
List<PackageInfo>
| Improve this Doc View Source

GetPackagesByType(Int32, String)

The PackageController class provides the business class for the packages.

Declaration
public static List<PackageInfo> GetPackagesByType(int portalId, string type)
Parameters
Type Name Description
System.Int32 portalId
System.String type
Returns
Type Description
List<PackageInfo>
| Improve this Doc View Source

GetPackagesByType(String)

The PackageController class provides the business class for the packages.

Declaration
public static List<PackageInfo> GetPackagesByType(string type)
Parameters
Type Name Description
System.String type
Returns
Type Description
List<PackageInfo>
| Improve this Doc View Source

GetPackageType(String)

The PackageController class provides the business class for the packages.

Declaration
public static PackageType GetPackageType(string type)
Parameters
Type Name Description
System.String type
Returns
Type Description
PackageType
| Improve this Doc View Source

GetPackageTypes()

The PackageController class provides the business class for the packages.

Declaration
public static List<PackageType> GetPackageTypes()
Returns
Type Description
List<PackageType>
| Improve this Doc View Source

ParsePackage(String, String, Dictionary<String, PackageInfo>, List<String>)

The PackageController class provides the business class for the packages.

Declaration
public static void ParsePackage(string file, string installPath, Dictionary<string, PackageInfo> packages, List<string> invalidPackages)
Parameters
Type Name Description
System.String file
System.String installPath
Dictionary<System.String, PackageInfo> packages
List<System.String> invalidPackages
| Improve this Doc View Source

SaveExtensionPackage(PackageInfo)

Save or update the package.

Declaration
public void SaveExtensionPackage(PackageInfo package)
Parameters
Type Name Description
PackageInfo package
| Improve this Doc View Source

SavePackage(PackageInfo)

The PackageController class provides the business class for the packages.

Declaration
public static void SavePackage(PackageInfo package)
Parameters
Type Name Description
PackageInfo package
| Improve this Doc View Source

UpdatePackage(PackageInfo)

The PackageController class provides the business class for the packages.

Declaration
public static void UpdatePackage(PackageInfo package)
Parameters
Type Name Description
PackageInfo package

Implements

IPackageController

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS