November Happy Hour will be moved to Thursday December 5th.

Class PermanentLinkMapper

Uses PermanentLinkMapStore for mapping between url/Guid/PageReference

Inheritance
System.Object
PermanentLinkMapper
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class PermanentLinkMapper : Object, IPermanentLinkBatchMapper, IPermanentLinkMapper

Constructors

PermanentLinkMapper(PermanentContentLinkMapper)

Declaration
public PermanentLinkMapper(PermanentContentLinkMapper contentResolverRegistry)
Parameters
Type Name Description
PermanentContentLinkMapper contentResolverRegistry

Fields

ClearPLMS

ID for the Permanent Link Map Store event "Clear store"

Declaration
public static readonly Guid ClearPLMS
Field Value
Type Description
System.Guid

RemoveFromPLMS

ID for the Permanent Link Map Store event "Item removed"

Declaration
public static readonly Guid RemoveFromPLMS
Field Value
Type Description
System.Guid

Properties

CacheCount

Gets the number of items in the cache.

Declaration
public int CacheCount { get; }
Property Value
Type Description
System.Int32

The cache count.

Instance

The global permanent link mapper instance. This is not intended to be set by external code.

Declaration
public static IPermanentLinkMapper Instance { get; set; }
Property Value
Type Description
IPermanentLinkMapper

Methods

Clear()

Clears the cache.

Declaration
public void Clear()

ClearCache(Boolean)

Clears the cache. Optionally this event is broadcasted.

Declaration
public void ClearCache(bool raiseEvent)
Parameters
Type Name Description
System.Boolean raiseEvent

if set to trueRaise the event for other clients

ClearItemFromCache(ContentReference, Boolean)

Removes the item with specified id from cache. If raiseEvent is true the cache removal is broadcasted.

Declaration
public void ClearItemFromCache(ContentReference contentLink, bool raiseEvent)
Parameters
Type Name Description
ContentReference contentLink

The item id.

System.Boolean raiseEvent

if set to true [raise event].

ClearItemFromCache(Guid, Boolean)

Removes the item with specified id from cache. If raiseEvent is true the cache removal is broadcasted.

Declaration
public void ClearItemFromCache(Guid itemId, bool raiseEvent)
Parameters
Type Name Description
System.Guid itemId

The item id.

System.Boolean raiseEvent

if set to true [raise event].

Find(ContentReference)

Finds a PermanentLinkMap-derived instance from the specified page reference.

Declaration
public virtual PermanentLinkMap Find(ContentReference contentReference)
Parameters
Type Name Description
ContentReference contentReference

The page reference.

Returns
Type Description
PermanentLinkMap

A link map, or null if not found

Find(IEnumerable<ContentReference>)

Creates PermanentLinkMap-derived instances from the specified page references.

Declaration
public virtual IEnumerable<PermanentLinkMap> Find(IEnumerable<ContentReference> contentReferences)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentReferences

The page references.

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

The mapped objects of those found

Find(IEnumerable<Guid>)

Creates PermanentLinkMap-derived instances from the provided Guids, if possible.

Declaration
public virtual IEnumerable<PermanentLinkMap> Find(IEnumerable<Guid> guids)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Guid> guids

The Guids

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

The mapped objects of those found

Find(Guid)

Creates an PermanentLinkMap-derived instance from the provided Guid, if possible.

Declaration
public virtual PermanentLinkMap Find(Guid guid)
Parameters
Type Name Description
System.Guid guid

The Guid

Returns
Type Description
PermanentLinkMap

The mapping object or null

Save(PermanentLinkMap)

Saves the specified PermanentLinkMap to the repository, making it available for lookup.

Declaration
public void Save(PermanentLinkMap plm)
Parameters
Type Name Description
PermanentLinkMap plm

The PermanentLinkMap

Remarks

This method must be called whenever a new mapping is created, or an existing one has some aspect modified to save it to the backing store (actually an in-memory cache in this implementation).

Implements

Extension Methods