C# 클래스 Roadkill.Core.Services.PageService

Provides a set of tasks for wiki page management.
상속: IPageService
파일 보기 프로젝트 열기: LocalGovDigital/pipeline 1 사용 예제들

공개 메소드들

메소드 설명
AddPage ( PageViewModel model ) : PageViewModel

Adds the page to the database.

AllPages ( bool loadPageContent = false ) : IEnumerable

Retrieves a list of all pages in the system.

AllPagesCreatedBy ( string userName ) : IEnumerable

Gets alls the pages created by a user.

AllTags ( ) : IEnumerable

Retrieves a list of all tags in the system.

ClearPageTables ( ) : void

Clears all pages and page content from the database.

DeletePage ( int pageId ) : void

Deletes a page from the database.

ExportToXml ( ) : string

Exports all pages in the database, including content, to an XML format.

FindByTag ( string tag ) : IEnumerable

Finds all pages with the given tag.

FindByTitle ( string title ) : PageViewModel

Finds a page by its title

FindHomePage ( ) : PageViewModel

Finds the first page with the tag 'homepage'. Any pages that are locked by an administrator take precedence.

GetActivity ( ) : IEnumerable

Finds all relationships related to the page.

GetBootStrapNavMenu ( IUserContext userContext ) : string

Retrieves the (usually left) menu containing the new page, settings etc. options

GetById ( int id, bool loadContent = false ) : PageViewModel

Retrieves the page by its id.

GetCurrentContent ( int pageId ) : PageContent

Retrieves the current text content for a page.

GetMarkupConverter ( ) : Roadkill.Core.Converters.MarkupConverter

Retrieves the MarkupConverter used by this IPageService.

GetMenu ( IUserContext userContext ) : string

Retrieves the (usually left) menu containing the new page, settings etc. options

GetRelByPage ( int pageid ) : IEnumerable

Finds all relationships related to the page.

PageService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, SearchService searchService, PageHistoryService historyService, IUserContext context, ListCache listCache, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, Roadkill.Core.Cache.SiteCache sitecache, IPluginFactory pluginFactory ) : System
RenameTag ( string oldTagName, string newTagName ) : void

Renames a tag by changing all pages that reference the tag to use the new tag name.

UpdateLinksToPage ( string oldTitle, string newTitle ) : void

Updates all links in pages to another page, when that page's title is changed.

UpdatePage ( PageViewModel model ) : void

Updates the provided page.

비공개 메소드들

메소드 설명
AppendIpForDemoSite ( string username ) : string

Adds an IP address after the username for any demo site vandalism.

GetCollapsableMenuHtml ( ) : string

Adds the Adidas bar to the nav bar so it can be collapsed on mobile devices

메소드 상세

AddPage() 공개 메소드

Adds the page to the database.
An databaseerror occurred while saving. An error occurred adding the page to the search index.
public AddPage ( PageViewModel model ) : PageViewModel
model Roadkill.Core.Mvc.ViewModels.PageViewModel The summary details for the page.
리턴 Roadkill.Core.Mvc.ViewModels.PageViewModel

AllPages() 공개 메소드

Retrieves a list of all pages in the system.
An databaseerror occurred while retrieving the list.
public AllPages ( bool loadPageContent = false ) : IEnumerable
loadPageContent bool
리턴 IEnumerable

AllPagesCreatedBy() 공개 메소드

Gets alls the pages created by a user.
An databaseerror occurred while retrieving the list.
public AllPagesCreatedBy ( string userName ) : IEnumerable
userName string Name of the user.
리턴 IEnumerable

AllTags() 공개 메소드

Retrieves a list of all tags in the system.
An databaseerror occurred while getting the tags.
public AllTags ( ) : IEnumerable
리턴 IEnumerable

ClearPageTables() 공개 메소드

Clears all pages and page content from the database.
An datastore error occurred while clearing the page data.
public ClearPageTables ( ) : void
리턴 void

DeletePage() 공개 메소드

Deletes a page from the database.
An databaseerror occurred while deleting the page.
public DeletePage ( int pageId ) : void
pageId int The id of the page to remove.
리턴 void

ExportToXml() 공개 메소드

Exports all pages in the database, including content, to an XML format.
An databaseerror occurred while getting the list. An XML serialiation occurred exporting the page content.
public ExportToXml ( ) : string
리턴 string

FindByTag() 공개 메소드

Finds all pages with the given tag.
An database error occurred while getting the list.
public FindByTag ( string tag ) : IEnumerable
tag string The tag to search for.
리턴 IEnumerable

FindByTitle() 공개 메소드

Finds a page by its title
An databaseerror occurred while getting the page.
public FindByTitle ( string title ) : PageViewModel
title string The page title
리턴 Roadkill.Core.Mvc.ViewModels.PageViewModel

FindHomePage() 공개 메소드

Finds the first page with the tag 'homepage'. Any pages that are locked by an administrator take precedence.
public FindHomePage ( ) : PageViewModel
리턴 Roadkill.Core.Mvc.ViewModels.PageViewModel

GetActivity() 공개 메소드

Finds all relationships related to the page.
An database error occurred while getting the list.
public GetActivity ( ) : IEnumerable
리턴 IEnumerable

GetBootStrapNavMenu() 공개 메소드

Retrieves the (usually left) menu containing the new page, settings etc. options
public GetBootStrapNavMenu ( IUserContext userContext ) : string
userContext IUserContext
리턴 string

GetById() 공개 메소드

Retrieves the page by its id.
An databaseerror occurred while getting the page.
public GetById ( int id, bool loadContent = false ) : PageViewModel
id int The id of the page
loadContent bool
리턴 Roadkill.Core.Mvc.ViewModels.PageViewModel

GetCurrentContent() 공개 메소드

Retrieves the current text content for a page.
public GetCurrentContent ( int pageId ) : PageContent
pageId int The id of the page.
리턴 Roadkill.Core.Database.PageContent

GetMarkupConverter() 공개 메소드

Retrieves the MarkupConverter used by this IPageService.
public GetMarkupConverter ( ) : Roadkill.Core.Converters.MarkupConverter
리턴 Roadkill.Core.Converters.MarkupConverter

GetMenu() 공개 메소드

Retrieves the (usually left) menu containing the new page, settings etc. options
public GetMenu ( IUserContext userContext ) : string
userContext IUserContext
리턴 string

GetRelByPage() 공개 메소드

Finds all relationships related to the page.
An database error occurred while getting the list.
public GetRelByPage ( int pageid ) : IEnumerable
pageid int
리턴 IEnumerable

PageService() 공개 메소드

public PageService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, SearchService searchService, PageHistoryService historyService, IUserContext context, ListCache listCache, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, Roadkill.Core.Cache.SiteCache sitecache, IPluginFactory pluginFactory ) : System
settings Roadkill.Core.Configuration.ApplicationSettings
repository IRepository
searchService SearchService
historyService PageHistoryService
context IUserContext
listCache ListCache
pageViewModelCache Roadkill.Core.Cache.PageViewModelCache
sitecache Roadkill.Core.Cache.SiteCache
pluginFactory IPluginFactory
리턴 System

RenameTag() 공개 메소드

Renames a tag by changing all pages that reference the tag to use the new tag name.
An databaseerror occurred while saving one of the pages. An error occurred updating the search index.
public RenameTag ( string oldTagName, string newTagName ) : void
oldTagName string
newTagName string
리턴 void

UpdateLinksToPage() 공개 메소드

Updates all links in pages to another page, when that page's title is changed.
public UpdateLinksToPage ( string oldTitle, string newTitle ) : void
oldTitle string The previous page title.
newTitle string The new page title.
리턴 void

UpdatePage() 공개 메소드

Updates the provided page.
An databaseerror occurred while updating. An error occurred adding the page to the search index.
public UpdatePage ( PageViewModel model ) : void
model Roadkill.Core.Mvc.ViewModels.PageViewModel The summary.
리턴 void