Class DefaultContentSoftLinkRepository

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Repository for working with SoftLink instances.

Inheritance
System.Object
DefaultContentSoftLinkRepository
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.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IContentSoftLinkRepository))]
[ServiceConfiguration(typeof(IContentSoftLinkStatusService))]
public class DefaultContentSoftLinkRepository : IContentSoftLinkRepository, IContentSoftLinkStatusService

Constructors

DefaultContentSoftLinkRepository(IPermanentLinkMapper, ServiceAccessor<ContentSoftLinkDB>)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultContentSoftLinkRepository class.

Declaration
public DefaultContentSoftLinkRepository(IPermanentLinkMapper permanentLinkMapper, ServiceAccessor<ContentSoftLinkDB> softLinkDataAccess)
Parameters
Type Name Description
IPermanentLinkMapper permanentLinkMapper

The permanent link mapper that should be used by this instance and any loaded links.

ServiceAccessor<ContentSoftLinkDB> softLinkDataAccess

An accessor method that retrieves the soft link data access instance that should be used by this instance.

Methods

Delete(ContentReference, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Delete all softlink references for ownerContent with specific language.

Declaration
public virtual void Delete(ContentReference ownerContent, string language)
Parameters
Type Name Description
ContentReference ownerContent

The content reference

System.String language

The language

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets broken links from the database

Declaration
public virtual IEnumerable<SoftLink> GetBrokenLinks(ContentReference root, int skipCount, int maxResults)
Parameters
Type Name Description
ContentReference root

The root item.

System.Int32 skipCount

The skip count.

System.Int32 maxResults

The max results.

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

GetBrokenLinksCount(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets total number of broken links from the database

Declaration
public virtual int GetBrokenLinksCount(ContentReference root)
Parameters
Type Name Description
ContentReference root

The root item.

Returns
Type Description
System.Int32

Number of broken link

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get Unchecked links from the database

Declaration
public virtual IList<SoftLink> GetUncheckedLinks(DateTime lastCheckedDate, TimeSpan ignoreWorkingLinksInterval, int maxNumberOfLinks)
Parameters
Type Name Description
System.DateTime lastCheckedDate

Date when the links were last checked

System.TimeSpan ignoreWorkingLinksInterval

The time back in history where we don't want to recheck working links.

System.Int32 maxNumberOfLinks

Maximum number of links that should be returnd

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

Links that has not been checked prior to the start date

Load(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the links that are being referenced by an content item.

Declaration
public virtual IList<SoftLink> Load(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content item

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

A list of SoftLink instances

Load(ContentReference, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the links that are being referenced by or references an content item.

Declaration
public virtual IList<SoftLink> Load(ContentReference contentLink, bool reversed)
Parameters
Type Name Description
ContentReference contentLink

The content item

System.Boolean reversed

If when check should be performed on links pointing to an item instead

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

A list of SoftLink instances

Load(Guid, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the links that are being referenced by or references an content item.

Declaration
public virtual IList<SoftLink> Load(Guid contentGuid, bool reversed)
Parameters
Type Name Description
System.Guid contentGuid

The unique id of the content item.

System.Boolean reversed

If when check should be performed on links pointing to an item instead

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

A list of SoftLink instances

Load(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the links that reference the file specified with a path.

Declaration
public virtual IList<SoftLink> Load(string path)
Parameters
Type Name Description
System.String path

The path.

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

A collection of SoftLink instances that will contain information about all links that point to the file specified in path.

Load(String, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the links that reference the file specified with a path.

Declaration
public virtual IList<SoftLink> Load(string path, bool exactMatch)
Parameters
Type Name Description
System.String path

The path.

System.Boolean exactMatch

if set to true an exact match is required. If set to false only the beginning of the path needs to match.

Returns
Type Description
System.Collections.Generic.IList<SoftLink>

A collection of SoftLink instances that will contain information about all links that point to the file specified in path.

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves all the specified SoftLink instances with the same owner page link.

Declaration
public virtual void Save(ContentReference ownerContent, CultureInfo ownerLanguage, IList<SoftLink> links)
Parameters
Type Name Description
ContentReference ownerContent

The owner content link.

System.Globalization.CultureInfo ownerLanguage

The language, specify null to re-save links for all languages

System.Collections.Generic.IList<SoftLink> links

The collection of SoftLink instances.

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves all the specified SoftLink instances with the same owner page link.

Declaration
public virtual void Save(ContentReference ownerContent, CultureInfo ownerLanguage, IList<SoftLink> links, bool appendOnly)
Parameters
Type Name Description
ContentReference ownerContent

The owner content link.

System.Globalization.CultureInfo ownerLanguage

The language, specify null to re-save links for all languages

System.Collections.Generic.IList<SoftLink> links

The collection of SoftLink instances.

System.Boolean appendOnly

If links should be appended to the existing links

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Save softlink status

Declaration
public virtual void SaveLinkStatus(IEnumerable<SoftLink> links)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<SoftLink> links

A list of SoftLink instances

Implements

Extension Methods