C# Class Roadkill.Core.Services.PageHistoryService

Provides a way of viewing, and comparing the version history of page content, and reverting to previous versions.
Mostrar archivo Open project: LocalGovDigital/pipeline Class Usage Examples

Public Methods

Method Description
CompareVersions ( System.Guid mainVersionId ) : IEnumerable

Compares a page version to the previous version.

GetHistory ( int pageId ) : IEnumerable

Retrieves all history for a page.

MaxVersion ( int pageId ) : int

Retrieves the latest version number for a page.

PageHistoryService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IUserContext context, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory ) : System
RevertTo ( System.Guid versionId, IUserContext context ) : void

Reverts to a particular version, creating a new version in the process.

RevertTo ( int pageId, int versionNumber ) : void

Reverts a page to a particular version, creating a new version in the process.

Method Details

CompareVersions() public method

Compares a page version to the previous version.
An database error occurred while comparing the two versions.
public CompareVersions ( System.Guid mainVersionId ) : IEnumerable
mainVersionId System.Guid The id of the version to compare
return IEnumerable

GetHistory() public method

Retrieves all history for a page.
An database error occurred while retrieving the list.
public GetHistory ( int pageId ) : IEnumerable
pageId int The id of the page to get the history for.
return IEnumerable

MaxVersion() public method

Retrieves the latest version number for a page.
public MaxVersion ( int pageId ) : int
pageId int The id of the page to get the version number for.
return int

PageHistoryService() public method

public PageHistoryService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IUserContext context, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory ) : System
settings Roadkill.Core.Configuration.ApplicationSettings
repository IRepository
context IUserContext
pageViewModelCache Roadkill.Core.Cache.PageViewModelCache
pluginFactory IPluginFactory
return System

RevertTo() public method

Reverts to a particular version, creating a new version in the process.
An databaseerror occurred while reverting to the version.
public RevertTo ( System.Guid versionId, IUserContext context ) : void
versionId System.Guid The version ID to revert to.
context IUserContext The current logged in user's context.
return void

RevertTo() public method

Reverts a page to a particular version, creating a new version in the process.
An databaseerror occurred while reverting to the version.
public RevertTo ( int pageId, int versionNumber ) : void
pageId int The id of the page
versionNumber int The version number to revert to.
return void