C# Class BetterCms.Module.Blog.Services.DefaultBlogMLService

Inheritance: IBlogMLService
Show file Open project: devbridge/BetterCMS Class Usage Examples

Public Methods

Method Description
ConstructFilePath ( System.Guid guid ) : Uri
DefaultBlogMLService ( IRepository repository, IUrlService urlService, IBlogService blogService, IUnitOfWork unitOfWork, IRedirectService redirectService, IPageService pageService, ICmsConfiguration cmsConfiguration, IHttpContextAccessor httpContextAccessor ) : System
DeserializeXMLFile ( string filePath ) : BlogMLBlog
DeserializeXMLStream ( Stream stream ) : BlogMLBlog
ImportBlogs ( BlogMLBlog blogPosts, List modifications, IPrincipal principal, bool createRedirects = false, bool RecreateCategoryTree = true, bool ReuseExistingCategories = false ) : List
ValidateImport ( BlogMLBlog blogPosts ) : List

Private Methods

Method Description
BlogHasCategory ( BlogMLPost blog, string categoryId ) : bool
BlogMlCategoryCollectionToEnumerable ( BlogMLPost collection ) : IEnumerable
CreateFailedResult ( BlogMLPost blogML ) : BetterCms.Module.Blog.Models.BlogPostImportResult
GetContentRoot ( string rootPath ) : string
ImportAuthors ( BlogMLBlog authors, IList createdAuthors, List blogs ) : Guid>.IDictionary
ImportBlogPosts ( IPrincipal principal, Guid>.IDictionary authors, Guid>.IDictionary categories, List blogs, List modifications, bool createRedirects = false ) : List
ImportCategories ( BlogMLBlog categories, IEnumerable blogs, List &newCategoriesTreeList, List &newCategoriesList, bool ReuseExistingCategories, bool RecreateCategoryTree ) : Guid>.IDictionary
MapViewModel ( BlogMLPost blogML, BetterCms.Module.Blog.Models.BlogPostImportResult modification = null, List unsavedUrls = null ) : BetterCms.Module.Blog.ViewModels.Blog.BlogPostViewModel
TryValidateOldUrl ( string url ) : string
ValidateModel ( BetterCms.Module.Blog.ViewModels.Blog.BlogPostViewModel blogPostModel, BlogMLPost blogML, BetterCms.Module.Blog.Models.BlogPostImportResult &failedResult ) : bool

Method Details

ConstructFilePath() public method

public ConstructFilePath ( System.Guid guid ) : Uri
guid System.Guid
return System.Uri

DefaultBlogMLService() public method

public DefaultBlogMLService ( IRepository repository, IUrlService urlService, IBlogService blogService, IUnitOfWork unitOfWork, IRedirectService redirectService, IPageService pageService, ICmsConfiguration cmsConfiguration, IHttpContextAccessor httpContextAccessor ) : System
repository IRepository
urlService IUrlService
blogService IBlogService
unitOfWork IUnitOfWork
redirectService IRedirectService
pageService IPageService
cmsConfiguration ICmsConfiguration
httpContextAccessor IHttpContextAccessor
return System

DeserializeXMLFile() public method

public DeserializeXMLFile ( string filePath ) : BlogMLBlog
filePath string
return BlogMLBlog

DeserializeXMLStream() public method

public DeserializeXMLStream ( Stream stream ) : BlogMLBlog
stream Stream
return BlogMLBlog

ImportBlogs() public method

public ImportBlogs ( BlogMLBlog blogPosts, List modifications, IPrincipal principal, bool createRedirects = false, bool RecreateCategoryTree = true, bool ReuseExistingCategories = false ) : List
blogPosts BlogMLBlog
modifications List
principal IPrincipal
createRedirects bool
RecreateCategoryTree bool
ReuseExistingCategories bool
return List

ValidateImport() public method

public ValidateImport ( BlogMLBlog blogPosts ) : List
blogPosts BlogMLBlog
return List