Try our conversational search powered by Generative AI!

Class PermanentLinkMapStore

Given an permanent link representation, find an appropriate mapping object instance if possible

Inheritance
System.Object
PermanentLinkMapStore
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.Web
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public static class PermanentLinkMapStore

Fields

ChangeInPLMS

ID for the Permanent Link Map Store event "Changed exising item"

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

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 static int CacheCount { get; }
Property Value
Type Description
System.Int32

The cache count.

PerformanceCounters

Gets the collection of performance counters

Declaration
public static PermanentLinkMapStore.Counters PerformanceCounters { get; }
Property Value
Type Description
PermanentLinkMapStore.Counters

Methods

Clear()

Clears the cache.

Declaration
public static void Clear()

ClearCache(Boolean)

Clears the cache. Optionally this event is broadcasted.

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

if set to trueRaise the event for other clients

ClearItemFromCache(Guid, Boolean)

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

Declaration
public static 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 static PermanentContentLinkMap Find(ContentReference contentReference)
Parameters
Type Name Description
ContentReference contentReference

The content reference.

Returns
Type Description
PermanentContentLinkMap

A link map, or null if not found

Find(UrlBuilder)

Finds an PermanentLinkMap-derived instance from the provided url, if possible.

Declaration
public static PermanentLinkMap Find(UrlBuilder url)
Parameters
Type Name Description
UrlBuilder url

The URL, which may be in permanent link format, or mapped format

Returns
Type Description
PermanentLinkMap

The mapping object or null

Find(Guid)

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

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

The Guid

Returns
Type Description
PermanentLinkMap

The mapping object or null

Find(Guid, PermanentLinkMapStore.StorePreference)

Finds the specified GUID.

Declaration
[Obsolete("This method only supports Virtual Path Providers which are no longer used since 8.0 - use Find(guid) instead")]
public static PermanentLinkMap Find(Guid guid, PermanentLinkMapStore.StorePreference preferredStore)
Parameters
Type Name Description
System.Guid guid

The GUID.

PermanentLinkMapStore.StorePreference preferredStore

The preferred store.

Returns
Type Description
PermanentLinkMap

RemovePageFromCache(PageReference)

Removes link information about the page from link store cache.

Declaration
public static void RemovePageFromCache(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Save(PermanentLinkMap)

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

Declaration
public static 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).

ToMapped(UrlBuilder)

Converts the provided URL to the mapped representation, if possible.

Declaration
[Obsolete("This method only supports classic/mapped url's which are no longer used since 8.0 - use PermanentLinkUtility.GetGuid(url) to get the unique ID from an URL")]
public static bool ToMapped(UrlBuilder url)
Parameters
Type Name Description
UrlBuilder url

The URL. It may be permanent or mapped to begin with.

Returns
Type Description
System.Boolean

true if a mapped representation is provided after the call

ToPermanent(UrlBuilder)

Converts the provided URL to the permanent link representation, if possible.

Declaration
public static bool ToPermanent(UrlBuilder url)
Parameters
Type Name Description
UrlBuilder url

The URL. It may be permanent or mapped to begin with.

Returns
Type Description
System.Boolean

true if a permanent link representation is provided after the call

TryToMapped(String, out String)

Converts the provided URL to the mapped representation, if possible.

Declaration
[Obsolete("This method only supports classic/mapped url's which are no longer used since 8.0 - use PermanentLinkUtility.GetGuid(url) to get the unique ID from an URL")]
public static bool TryToMapped(string url, out string mappedUrl)
Parameters
Type Name Description
System.String url

The URL. It may be permanent or mapped to begin with.

System.String mappedUrl

The resulting mapped URL, if the conversion was possible (or unnecessary)

Returns
Type Description
System.Boolean

true if a mapped representation is provided after the call.

TryToPermanent(String, out String)

Converts the provided URL to the permanent link representation, if possible.

Declaration
public static bool TryToPermanent(string url, out string permanentUrl)
Parameters
Type Name Description
System.String url

The URL. It may be permanent or mapped to begin with.

System.String permanentUrl

The resulting permanent link URL, if the conversion was possible (or unnecessary)

Returns
Type Description
System.Boolean

true if a permanent link representation is provided after the call.