C# Class Roadkill.Core.Services.RelService

Provides a set of tasks for wiki page management.
Inheritance: Roadkill.Core.Services.ServiceBase, IRelService
Mostra file Open project: LocalGovDigital/pipeline

Public Methods

Method Description
AddRel ( RelViewModel model ) : RelViewModel

Adds the page to the database.

AllRelsCreatedBy ( string userName ) : IEnumerable

Gets alls the pages created by a user.

DeleteRel ( int id ) : void

Deletes a page from the database.

FindAllRels ( bool loadPageContent = false ) : IEnumerable

Retrieves a list of all pages in the system.

FindByTag ( string tag ) : IEnumerable

Finds all pages with the given tag.

FindByTitle ( string title ) : PageViewModel

Finds a page by its title

GetRelById ( int id, bool loadContent = false ) : RelViewModel

Retrieves the page by its id.

RelService ( 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
UpdateRel ( RelViewModel model ) : void

Updates the provided relationship.

Method Details

AddRel() public method

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

AllRelsCreatedBy() public method

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

DeleteRel() public method

Deletes a page from the database.
An databaseerror occurred while deleting the page.
public DeleteRel ( int id ) : void
id int
return void

FindAllRels() public method

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

FindByTag() public method

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.
return IEnumerable

FindByTitle() public method

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

GetRelById() public method

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

RelService() public method

public RelService ( 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
return System

UpdateRel() public method

Updates the provided relationship.
An databaseerror occurred while updating. An error occurred adding the page to the search index.
public UpdateRel ( RelViewModel model ) : void
model Roadkill.Core.Mvc.ViewModels.RelViewModel The summary.
return void