Class IdentityMappingService
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. A service that supports mapping external identities to CMS specific identities.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public abstract class IdentityMappingService : IContentResolver
Constructors
IdentityMappingService()
Declaration
protected IdentityMappingService()
Methods
Delete(IEnumerable<Guid>)
Deletes the identity mappings on a list of contents
Declaration
public abstract void Delete(IEnumerable<Guid> contentGuids)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Guid> | contentGuids |
Delete(Uri)
Deletes the identity mapping that is associated with externalIdentifier
Declaration
public abstract void Delete(Uri externalIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | externalIdentifier |
Get(ContentReference)
Returns a mapping for the contentLink or null if it does not have a mapping.
Declaration
public virtual MappedIdentity Get(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link to get mapping for. |
Returns
Type | Description |
---|---|
MappedIdentity | The mapped identity or null if it does not exist. |
Get(Guid)
Returns a mapping for the contentGuid or null if it does not have a mapping.
Declaration
public virtual MappedIdentity Get(Guid contentGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentGuid | The content link to get mapping for. |
Returns
Type | Description |
---|---|
MappedIdentity | The mapped identity or null if it does not exist. |
Get(Uri)
Returns a mapping for the externalIdentity or null if it does not have a mapping.
Declaration
public virtual MappedIdentity Get(Uri externalIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | externalIdentifier |
Returns
Type | Description |
---|---|
MappedIdentity |
Remarks
This method will not create an entry for a missing mapping.
Get(Uri, Boolean)
Returns a mapping for the externalIdentity or null if it does not have a mapping and createMissingMapping
is false.
Declaration
public virtual MappedIdentity Get(Uri externalIdentifier, bool createMissingMapping)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | externalIdentifier | The identity to get or create a mapping for. |
System.Boolean | createMissingMapping | If true a mapping is created for the |
Returns
Type | Description |
---|---|
MappedIdentity | The mapped identity or null if it does not exist and |
List(IEnumerable<ContentReference>)
Returns a list of mapped identities.
Declaration
public abstract IEnumerable<MappedIdentity> List(IEnumerable<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ContentReference> | contentLinks | The content links to list mappings for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MappedIdentity> | A list of mapped identities. |
List(IEnumerable<Guid>)
Returns a list of mapped identities.
Declaration
public abstract IEnumerable<MappedIdentity> List(IEnumerable<Guid> contentGuids)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Guid> | contentGuids | The content guids to list mappings for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MappedIdentity> | A list of mapped identities. |
List(IEnumerable<Uri>)
Returns a list of mapped identities.
Declaration
public virtual IEnumerable<MappedIdentity> List(IEnumerable<Uri> externalIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Uri> | externalIdentifiers | The external ids to list mappings for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MappedIdentity> | A list of mapped identities. |
Remarks
This method will not create entries for missing mappings.
List(IEnumerable<Uri>, Boolean)
Returns a list of mapped identities. If createMissingMappings
is true
entries will be created for missing mappings.
Declaration
public abstract IEnumerable<MappedIdentity> List(IEnumerable<Uri> externalIdentifiers, bool createMissingMappings)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Uri> | externalIdentifiers | The external identifiers to list or create mappings for. |
System.Boolean | createMissingMappings | If true mappings are created for entries that does not have a mapping. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MappedIdentity> | A list of mapped identities. |
List(String)
Lists all mapped identities associated with specified provider.
Declaration
public abstract IEnumerable<MappedIdentity> List(string provider)
Parameters
Type | Name | Description |
---|---|---|
System.String | provider | The name of the provider. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MappedIdentity> | A list of mapped identities. |
ListProviders()
Lists all providers that mappings have been created for.
Declaration
public abstract IEnumerable<string> ListProviders()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
MapContent(Uri, IContent)
Method to associate/register a mapping from an externalIdentifier to a content instance.
Declaration
public abstract MappedIdentity MapContent(Uri externalIdentifier, IContent content)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | externalIdentifier | The external identifier to associate with the |
IContent | content | The IContent instance that is to be associated with the |
Returns
Type | Description |
---|---|
MappedIdentity |
Explicit Interface Implementations
IContentResolver.ResolveContent(ContentReference)
Tries to resolve a Content from a ContentReference.
Declaration
ContentResolveResult IContentResolver.ResolveContent(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
ContentResolveResult | A ContentResolveResult with the identifiers for the content or null if no content was matched. |
IContentResolver.ResolveContent(Guid)
Tries to resolve a Content from a Guid identifier.
Declaration
ContentResolveResult IContentResolver.ResolveContent(Guid contentGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contentGuid | The content GUID. |
Returns
Type | Description |
---|---|
ContentResolveResult | A ContentResolveResult with the identifiers for the content or null if no content was matched. |