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

Class TabVersionBuilder

Inheritance
System.Object
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>
TabVersionBuilder
Implements
ITabVersionBuilder
Inherited Members
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>.Instance
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>.Factory
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>.SetTestableInstance(ITabVersionBuilder)
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>.ClearInstance()
ServiceLocator<ITabVersionBuilder, TabVersionBuilder>.GetFactory()
Namespace: DotNetNuke.Entities.Tabs.TabVersions
Assembly: DotNetNuke.dll
Syntax
public class TabVersionBuilder : ServiceLocator<ITabVersionBuilder, TabVersionBuilder>, ITabVersionBuilder

Constructors

| Improve this Doc View Source

TabVersionBuilder()

Initializes a new instance of the TabVersionBuilder class.

Declaration
public TabVersionBuilder()

Methods

| Improve this Doc View Source

CreateNewVersion(Int32, Int32, Int32)

Creates a new Tab Version.

Declaration
public TabVersion CreateNewVersion(int portalid, int tabId, int createdByUserId)
Parameters
Type Name Description
System.Int32 portalid
System.Int32 tabId

Tab Id whose version will be added.

System.Int32 createdByUserId

User Id which creates the version.

Returns
Type Description
TabVersion

TabVersion filled with the new version data.

| Improve this Doc View Source

CreateNewVersion(Int32, Int32)

Creates a new Tab Version checking current portal settings.

Declaration
public TabVersion CreateNewVersion(int tabId, int createdByUserId)
Parameters
Type Name Description
System.Int32 tabId

Tab Id whose version will be added.

System.Int32 createdByUserId

User Id which creates the version.

Returns
Type Description
TabVersion

TabVersion filled with the new version data.

Remarks

This method will need the Portal Id from the current context.

| Improve this Doc View Source

DeleteVersion(Int32, Int32, Int32)

Deletes an existing Tab Version.

Declaration
public void DeleteVersion(int tabId, int createdByUserId, int version)
Parameters
Type Name Description
System.Int32 tabId

The Tab Id to be queried.

System.Int32 createdByUserId

User Id which deletes the version.

System.Int32 version

Version Number of the version to be deleted.

| Improve this Doc View Source

Discard(Int32, Int32)

Discards a Tab Version. If the tab only has an unpublished version, the page will keep but with no content and not published.

Declaration
public void Discard(int tabId, int createdByUserId)
Parameters
Type Name Description
System.Int32 tabId

Tab Id whose version will be discarded.

System.Int32 createdByUserId

User Id which discards the version.

| Improve this Doc View Source

GetCurrentModules(Int32)

Get all Modules Info associated with the last published version of the page.

Declaration
public IEnumerable<ModuleInfo> GetCurrentModules(int tabId)
Parameters
Type Name Description
System.Int32 tabId

Tab Id w.

Returns
Type Description
IEnumerable<ModuleInfo>

List of ModuleInfo objects.

| Improve this Doc View Source

GetCurrentVersion(Int32, Boolean)

Get the current pusblished version of the page.

Declaration
public TabVersion GetCurrentVersion(int tabId, bool ignoreCache = false)
Parameters
Type Name Description
System.Int32 tabId

The Tab Id to be queried.

System.Boolean ignoreCache

If true, the method will not use the Caching Storage.

Returns
Type Description
TabVersion

TabVersion filled with the current version data.

Remarks

If Tab has not a published version yet, it will return null.

| Improve this Doc View Source

GetFactory()

Gets the service locator factory.

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

A factory function.

Overrides
DotNetNuke.Framework.ServiceLocator<DotNetNuke.Entities.Tabs.TabVersions.ITabVersionBuilder, DotNetNuke.Entities.Tabs.TabVersions.TabVersionBuilder>.GetFactory()
| Improve this Doc View Source

GetModuleContentLatestVersion(ModuleInfo)

Get the latest version or 1 if module is not versionable.

Declaration
public int GetModuleContentLatestVersion(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The ModuleInfo to be queried.

Returns
Type Description
System.Int32

The latest version of the module.

| Improve this Doc View Source

GetUnPublishedVersion(Int32)

Get the unpublished version or Null if Tab has not any unpublished version.

Declaration
public TabVersion GetUnPublishedVersion(int tabId)
Parameters
Type Name Description
System.Int32 tabId
Returns
Type Description
TabVersion

TabVersion filled with the unpublished version data.

Remarks

If Tab has not an unpublished version yet, it will return null.

| Improve this Doc View Source

GetUnPublishedVersionModules(Int32)

Get all ModuleInfo objects associated with the unpublished version of a page.

Declaration
public IEnumerable<ModuleInfo> GetUnPublishedVersionModules(int tabId)
Parameters
Type Name Description
System.Int32 tabId
Returns
Type Description
IEnumerable<ModuleInfo>

List of ModuleInfo objects.

| Improve this Doc View Source

GetVersionModules(Int32, Int32)

Get all Modules Info associated with an specific version.

Declaration
public IEnumerable<ModuleInfo> GetVersionModules(int tabId, int version)
Parameters
Type Name Description
System.Int32 tabId

Tab Id to be checked.

System.Int32 version
Returns
Type Description
IEnumerable<ModuleInfo>

List of ModuleInfo objects.

| Improve this Doc View Source

Publish(Int32, Int32, Int32)

Publish a Tab Version.

Declaration
public void Publish(int portalId, int tabId, int createdByUserId)
Parameters
Type Name Description
System.Int32 portalId

Portal Id where the version is.

System.Int32 tabId

Tab Id whose version will be published.

System.Int32 createdByUserId

User Id which publishes the version.

| Improve this Doc View Source

RollBackVesion(Int32, Int32, Int32)

Rolls back an existing version.

Declaration
public TabVersion RollBackVesion(int tabId, int createdByUserId, int version)
Parameters
Type Name Description
System.Int32 tabId

The Tab Id to be queried.

System.Int32 createdByUserId

User Id which rolls back the version.

System.Int32 version
Returns
Type Description
TabVersion

The newly published version.

| Improve this Doc View Source

SetupFirstVersionForExistingTab(Int32, Int32)

Setup a first version for existing tab with modules. This method is used to create version 1 for pages created when versioning was not enabled.

Declaration
public void SetupFirstVersionForExistingTab(int portalId, int tabId)
Parameters
Type Name Description
System.Int32 portalId

portalId.

System.Int32 tabId

tabId.

Implements

ITabVersionBuilder

Extension Methods

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