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

Interface IPortalController

Do not implement. This interface is meant for reference and unit test purposes only. There is no guarantee that this interface will not change.

Namespace: DotNetNuke.Entities.Portals
Assembly: DotNetNuke.dll
Syntax
public interface IPortalController

Methods

| Improve this Doc View Source

AddPortalAlias(Int32, String)

Creates a new portal alias.

Declaration
void AddPortalAlias(int portalId, string portalAlias)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

System.String portalAlias

Portal Alias to be created.

| Improve this Doc View Source

CopyPageTemplate(String, String)

Copies the page template.

Declaration
void CopyPageTemplate(string templateFile, string mappedHomeDirectory)
Parameters
Type Name Description
System.String templateFile

The template file.

System.String mappedHomeDirectory

The mapped home directory.

| Improve this Doc View Source

CreatePortal(String, UserInfo, String, String, IPortalTemplateInfo, String, String, String, String, Boolean)

Creates the portal.

Declaration
int CreatePortal(string portalName, UserInfo adminUser, string description, string keyWords, IPortalTemplateInfo template, string homeDirectory, string portalAlias, string serverPath, string childPath, bool isChildPortal)
Parameters
Type Name Description
System.String portalName

Name of the portal.

UserInfo adminUser

The obj admin user.

System.String description

The description.

System.String keyWords

The key words.

IPortalTemplateInfo template

Template to use for creating the new portal.

System.String homeDirectory

The home directory.

System.String portalAlias

The portal alias.

System.String serverPath

The server path.

System.String childPath

The child path.

System.Boolean isChildPortal

if set to true means the portal is child portal.

Returns
Type Description
System.Int32

Portal id.

| Improve this Doc View Source

CreatePortal(String, UserInfo, String, String, PortalController.PortalTemplateInfo, String, String, String, String, Boolean)

Creates the portal.

Declaration
int CreatePortal(string portalName, UserInfo adminUser, string description, string keyWords, PortalController.PortalTemplateInfo template, string homeDirectory, string portalAlias, string serverPath, string childPath, bool isChildPortal)
Parameters
Type Name Description
System.String portalName

Name of the portal.

UserInfo adminUser

The obj admin user.

System.String description

The description.

System.String keyWords

The key words.

PortalController.PortalTemplateInfo template

Template to use for creating the new portal.

System.String homeDirectory

The home directory.

System.String portalAlias

The portal alias.

System.String serverPath

The server path.

System.String childPath

The child path.

System.Boolean isChildPortal

if set to true means the portal is child portal.

Returns
Type Description
System.Int32

Portal id.

| Improve this Doc View Source

CreatePortal(String, Int32, String, String, IPortalTemplateInfo, String, String, String, String, Boolean)

Creates the portal.

Declaration
int CreatePortal(string portalName, int adminUserId, string description, string keyWords, IPortalTemplateInfo template, string homeDirectory, string portalAlias, string serverPath, string childPath, bool isChildPortal)
Parameters
Type Name Description
System.String portalName

Name of the portal.

System.Int32 adminUserId

The obj admin user.

System.String description

The description.

System.String keyWords

The key words.

IPortalTemplateInfo template

Template to use for creating the new portal.

System.String homeDirectory

The home directory.

System.String portalAlias

The portal alias.

System.String serverPath

The server path.

System.String childPath

The child path.

System.Boolean isChildPortal

if set to true means the portal is child portal.

Returns
Type Description
System.Int32

Portal id.

| Improve this Doc View Source

CreatePortal(String, Int32, String, String, PortalController.PortalTemplateInfo, String, String, String, String, Boolean)

Creates the portal.

Declaration
int CreatePortal(string portalName, int adminUserId, string description, string keyWords, PortalController.PortalTemplateInfo template, string homeDirectory, string portalAlias, string serverPath, string childPath, bool isChildPortal)
Parameters
Type Name Description
System.String portalName

Name of the portal.

System.Int32 adminUserId

The obj admin user.

System.String description

The description.

System.String keyWords

The key words.

PortalController.PortalTemplateInfo template

Template to use for creating the new portal.

System.String homeDirectory

The home directory.

System.String portalAlias

The portal alias.

System.String serverPath

The server path.

System.String childPath

The child path.

System.Boolean isChildPortal

if set to true means the portal is child portal.

Returns
Type Description
System.Int32

Portal id.

| Improve this Doc View Source

GetAvailablePortalTemplates()

Get all the available portal templates grouped by culture.

Declaration
IList<PortalController.PortalTemplateInfo> GetAvailablePortalTemplates()
Returns
Type Description
IList<PortalController.PortalTemplateInfo>

List of PortalTemplateInfo objects.

| Improve this Doc View Source

GetCurrentPortalSettings()

Gets the current portal settings.

Declaration
PortalSettings GetCurrentPortalSettings()
Returns
Type Description
PortalSettings

portal settings.

| Improve this Doc View Source

GetCurrentSettings()

Gets the current portal settings.

Declaration
IPortalSettings GetCurrentSettings()
Returns
Type Description
IPortalSettings

portal settings.

| Improve this Doc View Source

GetPortal(Guid)

Gets the portal.

Declaration
PortalInfo GetPortal(Guid uniqueId)
Parameters
Type Name Description
Guid uniqueId

The unique id.

Returns
Type Description
PortalInfo

Portal info.

| Improve this Doc View Source

GetPortal(Int32, String)

Gets information of a portal.

Declaration
PortalInfo GetPortal(int portalId, string cultureCode)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

System.String cultureCode

The culture code.

Returns
Type Description
PortalInfo

PortalInfo object with portal definition.

| Improve this Doc View Source

GetPortal(Int32)

Gets information of a portal.

Declaration
PortalInfo GetPortal(int portalId)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

Returns
Type Description
PortalInfo

PortalInfo object with portal definition.

| Improve this Doc View Source

GetPortalList(String)

Get portals in specific culture.

Declaration
List<PortalInfo> GetPortalList(string cultureCode)
Parameters
Type Name Description
System.String cultureCode

The culture code.

Returns
Type Description
List<PortalInfo>

A of PortalInfo instances.

| Improve this Doc View Source

GetPortals()

Gets information from all portals.

Declaration
ArrayList GetPortals()
Returns
Type Description
ArrayList

ArrayList of PortalInfo objects.

| Improve this Doc View Source

GetPortalSettings(Int32, String)

Gets the portal settings dictionary.

Declaration
Dictionary<string, string> GetPortalSettings(int portalId, string cultureCode)
Parameters
Type Name Description
System.Int32 portalId

The portal ID.

System.String cultureCode

The culture code.

Returns
Type Description
Dictionary<System.String, System.String>

portal settings.

| Improve this Doc View Source

GetPortalSettings(Int32)

Gets the portal settings dictionary.

Declaration
Dictionary<string, string> GetPortalSettings(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The portal ID.

Returns
Type Description
Dictionary<System.String, System.String>

portal settings.

| Improve this Doc View Source

GetPortalSpaceUsedBytes(Int32)

Gets the portal space used bytes.

Declaration
long GetPortalSpaceUsedBytes(int portalId = null)
Parameters
Type Name Description
System.Int32 portalId

The portal id.

Returns
Type Description
System.Int64

Space used in bytes.

| Improve this Doc View Source

GetPortalTemplate(String, String)

Load info for a portal template.

Declaration
PortalController.PortalTemplateInfo GetPortalTemplate(string templateFileName, string cultureCode)
Parameters
Type Name Description
System.String templateFileName

The file name of the portal template.

System.String cultureCode

the culture code if any for the localization of the portal template.

Returns
Type Description
PortalController.PortalTemplateInfo

A portal template.

| Improve this Doc View Source

HasSpaceAvailable(Int32, Int64)

Verifies if there's enough space to upload a new file on the given portal.

Declaration
bool HasSpaceAvailable(int portalId, long fileSizeBytes)
Parameters
Type Name Description
System.Int32 portalId

Id of the portal.

System.Int64 fileSizeBytes

Size of the file being uploaded.

Returns
Type Description
System.Boolean

True if there's enough space available to upload the file.

| Improve this Doc View Source

MapLocalizedSpecialPages(Int32, String)

Remaps the Special Pages such as Home, Profile, Search to their localized versions.

Declaration
void MapLocalizedSpecialPages(int portalId, string cultureCode)
Parameters
Type Name Description
System.Int32 portalId
System.String cultureCode
| Improve this Doc View Source

ParseTemplate(Int32, PortalController.PortalTemplateInfo, Int32, PortalTemplateModuleAction, Boolean)

Processess a template file for the new portal.

Declaration
void ParseTemplate(int portalId, PortalController.PortalTemplateInfo template, int administratorId, PortalTemplateModuleAction mergeTabs, bool isNewPortal)
Parameters
Type Name Description
System.Int32 portalId

PortalId of the new portal.

PortalController.PortalTemplateInfo template

The template.

System.Int32 administratorId

UserId for the portal administrator. This is used to assign roles to this user.

PortalTemplateModuleAction mergeTabs

Flag to determine whether Module content is merged.

System.Boolean isNewPortal

Flag to determine is the template is applied to an existing portal or a new one.

Remarks

The roles and settings nodes will only be processed on the portal template file.

| Improve this Doc View Source

ProcessResourceFileExplicit(String, String)

Processes the resource file for the template file selected.

Declaration
void ProcessResourceFileExplicit(string portalPath, string resoureceFile)
Parameters
Type Name Description
System.String portalPath

New portal's folder.

System.String resoureceFile

full path to the resource file.

Remarks

The resource file is a zip file with the same name as the selected template file and with an extension of .resources (to disable this file being downloaded). For example: for template file "portal.template" a resource file "portal.template.resources" can be defined.

| Improve this Doc View Source

RemovePortalLocalization(Int32, String, Boolean)

Removes the related PortalLocalization record from the database, adds optional clear cache.

Declaration
void RemovePortalLocalization(int portalId, string cultureCode, bool clearCache = true)
Parameters
Type Name Description
System.Int32 portalId
System.String cultureCode
System.Boolean clearCache
| Improve this Doc View Source

UpdatePortalExpiry(Int32, String)

Updates the portal expiry.

Declaration
void UpdatePortalExpiry(int portalId, string cultureCode)
Parameters
Type Name Description
System.Int32 portalId

The portal id.

System.String cultureCode

The culture code.

| Improve this Doc View Source

UpdatePortalInfo(PortalInfo)

Updates basic portal information.

Declaration
void UpdatePortalInfo(PortalInfo portal)
Parameters
Type Name Description
PortalInfo portal
| Improve this Doc View Source

UpdatePortalSetting(Int32, String, String, Boolean, String, Boolean)

Adds or Updates or Deletes a portal setting value.

Declaration
void UpdatePortalSetting(int portalID, string settingName, string settingValue, bool clearCache, string cultureCode, bool isSecure)
Parameters
Type Name Description
System.Int32 portalID
System.String settingName
System.String settingValue
System.Boolean clearCache
System.String cultureCode
System.Boolean isSecure
| Improve this Doc View Source

UpdatePortalSetting(Int32, String, String, Boolean, String)

Do not implement. This interface is meant for reference and unit test purposes only. There is no guarantee that this interface will not change.

Declaration
void UpdatePortalSetting(int portalID, string settingName, string settingValue, bool clearCache, string cultureCode)
Parameters
Type Name Description
System.Int32 portalID
System.String settingName
System.String settingValue
System.Boolean clearCache
System.String cultureCode

Extension Methods

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