Interface ITabVersionBuilder
Namespace: DotNetNuke.Entities.Tabs.TabVersions
Assembly: DotNetNuke.dll
Syntax
public interface ITabVersionBuilder
Methods
| Improve this Doc View SourceCreateNewVersion(Int32, Int32, Int32)
Creates a new Tab Version.
Declaration
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. |
CreateNewVersion(Int32, Int32)
Creates a new Tab Version checking current portal settings.
Declaration
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.
DeleteVersion(Int32, Int32, Int32)
Deletes an existing Tab Version.
Declaration
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. |
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
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. |
GetCurrentModules(Int32)
Get all Modules Info associated with the last published version of the page.
Declaration
IEnumerable<ModuleInfo> GetCurrentModules(int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | Tab Id w. |
Returns
Type | Description |
---|---|
IEnumerable<ModuleInfo> | List of ModuleInfo objects. |
GetCurrentVersion(Int32, Boolean)
Get the current pusblished version of the page.
Declaration
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.
GetModuleContentLatestVersion(ModuleInfo)
Get the latest version or 1 if module is not versionable.
Declaration
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. |
GetUnPublishedVersion(Int32)
Get the unpublished version or Null if Tab has not any unpublished version.
Declaration
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.
GetUnPublishedVersionModules(Int32)
Get all ModuleInfo objects associated with the unpublished version of a page.
Declaration
IEnumerable<ModuleInfo> GetUnPublishedVersionModules(int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId |
Returns
Type | Description |
---|---|
IEnumerable<ModuleInfo> | List of ModuleInfo objects. |
GetVersionModules(Int32, Int32)
Get all Modules Info associated with an specific version.
Declaration
IEnumerable<ModuleInfo> GetVersionModules(int tabId, int versionNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | Tab Id to be checked. |
System.Int32 | versionNumber | Version Number whose modules will be get. |
Returns
Type | Description |
---|---|
IEnumerable<ModuleInfo> | List of ModuleInfo objects. |
Publish(Int32, Int32, Int32)
Publish a Tab Version.
Declaration
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. |
RollBackVesion(Int32, Int32, Int32)
Rolls back an existing version.
Declaration
TabVersion RollBackVesion(int tabId, int createdByUserId, int versionNumber)
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 | versionNumber | Version Number of the version to be rolled back. |
Returns
Type | Description |
---|---|
TabVersion | The newly published version. |
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
void SetupFirstVersionForExistingTab(int portalId, int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | portalId. |
System.Int32 | tabId | tabId. |