Class DefaultContentSoftLinkRepository
Repository for working with SoftLink instances.
Inheritance
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
[ServiceConfiguration]
public class DefaultContentSoftLinkRepository : Object, IContentSoftLinkRepository, IContentSoftLinkStatusServiceConstructors
DefaultContentSoftLinkRepository(IPermanentLinkMapper, ServiceAccessor<ContentSoftLinkDB>)
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)
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 | 
GetBrokenLinks(ContentReference, Int32, Int32)
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)
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 | 
GetUncheckedLinks(DateTime, TimeSpan, Int32)
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)
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)
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)
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)
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  | 
Load(String, Boolean)
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  | 
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  | 
Save(ContentReference, CultureInfo, IList<SoftLink>)
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. | 
Save(ContentReference, CultureInfo, IList<SoftLink>, Boolean)
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 | 
SaveLinkStatus(IEnumerable<SoftLink>)
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 | 
