Class SeoUriRouter

Routes a SEO url

Inheritance
System.Object
SeoUriRouter
Implements
EPiServer.Web.Routing.ISimpleAddressRouteHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Routing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class SeoUriRouter : ISimpleAddressRouteHandler

Constructors

SeoUriRouter(PartialRouteHandler, IContentLoader, LanguageSelectorFactory, ReferenceConverter, IContentVersionRepository)

Initializes a new instance of the SeoUriRouter class.

Declaration
[Obsolete("Use the constructor without LanguageSelectorFactory instead. Will remain at least until November 2016.")]
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, LanguageSelectorFactory languageSelectorFactory, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository)
Parameters
Type Name Description
EPiServer.Web.Routing.PartialRouteHandler partialRouteHandler

The partial route handler

EPiServer.IContentLoader contentLoader

The content loader

EPiServer.Core.LanguageSelectorFactory languageSelectorFactory

The language selector factory

ReferenceConverter referenceConverter

The reference converter.

EPiServer.Core.IContentVersionRepository contentVersionRepository

The content version repository

SeoUriRouter(PartialRouteHandler, IContentLoader, ReferenceConverter, IContentVersionRepository)

Initializes a new instance of the SeoUriRouter class.

Declaration
[Obsolete("Use the constructor with ICatalogSystem instead. Will remain at least until January 2017.")]
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository)
Parameters
Type Name Description
EPiServer.Web.Routing.PartialRouteHandler partialRouteHandler

The partial route handler

EPiServer.IContentLoader contentLoader

The content loader

ReferenceConverter referenceConverter

The reference converter.

EPiServer.Core.IContentVersionRepository contentVersionRepository

The content version repository

SeoUriRouter(PartialRouteHandler, IContentLoader, ReferenceConverter, IContentVersionRepository, ICatalogSystem)

Declaration
public SeoUriRouter(PartialRouteHandler partialRouteHandler, IContentLoader contentLoader, ReferenceConverter referenceConverter, IContentVersionRepository contentVersionRepository, ICatalogSystem catalogSystem)
Parameters
Type Name Description
EPiServer.Web.Routing.PartialRouteHandler partialRouteHandler
EPiServer.IContentLoader contentLoader
ReferenceConverter referenceConverter
EPiServer.Core.IContentVersionRepository contentVersionRepository
ICatalogSystem catalogSystem

Fields

SeoUriRouteActiveKey

Declaration
public const string SeoUriRouteActiveKey = "seourirouteactive"
Field Value
Type Description
System.String

Properties

CatalogSystem

The catalog system

Declaration
protected virtual ICatalogSystem CatalogSystem { get; set; }
Property Value
Type Description
ICatalogSystem

Methods

Gets the content link from a catalog entry dto

Declaration
protected virtual ContentReference GetCatalogContentLink(CatalogEntryDto entry)
Parameters
Type Name Description
CatalogEntryDto entry

The catalog entry dto

Returns
Type Description
EPiServer.Core.ContentReference

Gets the content link from a catalog node dto

Declaration
protected virtual ContentReference GetCatalogContentLink(CatalogNodeDto node)
Parameters
Type Name Description
CatalogNodeDto node

The catalog node dto

Returns
Type Description
EPiServer.Core.ContentReference

GetLanguage(CatalogEntryDto, String)

Gets the language from the catalog entry dto

Declaration
protected virtual string GetLanguage(CatalogEntryDto entry, string seoUri)
Parameters
Type Name Description
CatalogEntryDto entry

The catalog entry dto

System.String seoUri

The seo uri

Returns
Type Description
System.String

GetLanguage(CatalogNodeDto, String)

Gets the language from the catalog node dto

Declaration
protected virtual string GetLanguage(CatalogNodeDto node, string seoUri)
Parameters
Type Name Description
CatalogNodeDto node

The catalog node dto

System.String seoUri

The seo uri

Returns
Type Description
System.String

GetRouteStartingPoint(ContentReference)

Gets the starting point for the route.

Declaration
protected virtual ContentReference GetRouteStartingPoint(ContentReference catalogContentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference catalogContentLink

The content link

Returns
Type Description
EPiServer.Core.ContentReference

The content link of the starting point, if fund. Otherwise null.

GetRouteValues(String, ContentReference, SegmentContext)

Tries to handle a segment value as a simple address.

Declaration
public virtual SimpleAddressRouteValues GetRouteValues(string urlSegment, ContentReference routeRoot, SegmentContext segmentContext)
Parameters
Type Name Description
System.String urlSegment

The simple address

EPiServer.Core.ContentReference routeRoot

The route root

EPiServer.Web.Routing.Segments.SegmentContext segmentContext

The segment context

Returns
Type Description
EPiServer.Web.Routing.Segments.SimpleAddressRouteValues

EPiServer.Web.Routing.Segments.SimpleAddressRouteValues if urlSegment was handled, otherwise null

SupportedPartialRouters(ContentReference)

Gets supported commerce routers for content

Declaration
public virtual IEnumerable<ICommerceRouter> SupportedPartialRouters(ContentReference catalogContentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference catalogContentLink

The content link to get the supported partial routers for.

Returns
Type Description
System.Collections.Generic.IEnumerable<ICommerceRouter>

Collection of supported commerce partial routers

Implements

EPiServer.Web.Routing.ISimpleAddressRouteHandler