Try our conversational search powered by Generative AI!

Class DefaultContentTypeRepository

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

Inheritance
System.Object
DefaultContentTypeRepository
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(ServiceType = typeof(IContentTypeRepository), Lifecycle = ServiceInstanceScope.Singleton)]
[ServiceConfiguration(ServiceType = typeof(IContentTypeRepository<ContentType>))]
public class DefaultContentTypeRepository : ContentTypeRepository, IContentTypeRepository, IContentTypeRepository<ContentType>, ICachedRepository

Constructors

DefaultContentTypeRepository(ContentTypeModelRepository, ContentTypeDB, ModelMerger, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, ITypeReferenceAnalyzer, IPropertyDefinitionRepository, ISynchronizedObjectInstanceCache, IContentTypeBaseResolver, IContentTypeVersionEvaluator, IContentTypeComparer)

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

Declaration
public DefaultContentTypeRepository(ContentTypeModelRepository modelRepository, ContentTypeDB contentTypeDataAccess, ModelMerger modelMerger, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ITypeReferenceAnalyzer circularReferenceValidator, IPropertyDefinitionRepository propertyDefinitionRepository, ISynchronizedObjectInstanceCache cacheInstance, IContentTypeBaseResolver contentTypeBaseResolver, IContentTypeVersionEvaluator contentTypeVersionEvaluator, IContentTypeComparer contentTypeComparer)
Parameters
Type Name Description
ContentTypeModelRepository modelRepository

The model repository.

ContentTypeDB contentTypeDataAccess

The page type data access object to be used by this instance.

ModelMerger modelMerger

The model merger that should be used by this instance.

ITabDefinitionRepository tabDefinitionRepository

The tab definition repository that should be used by this instance.

IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository

The property definition type repository that should be used by this instance.

ITypeReferenceAnalyzer circularReferenceValidator

The circular reference validator that should be used by this instance.

IPropertyDefinitionRepository propertyDefinitionRepository

The property definition repository that should be used by this instance.

ISynchronizedObjectInstanceCache cacheInstance

The synchronized object instance cache that should be used by this instance.

IContentTypeBaseResolver contentTypeBaseResolver

The content type base resolver.

IContentTypeVersionEvaluator contentTypeVersionEvaluator

The Content type version evaluator

IContentTypeComparer contentTypeComparer

The content type comparer

Methods

ClearCache()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears the local content type cache.

Declaration
public static void ClearCache()

Copy(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a copy of the specified content type in the data repository and returns it.

Declaration
public override ContentType Copy(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

The ContentType to be copied.

Returns
Type Description
ContentType

The copy of the ContentType that was provided.

Overrides

Delete(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes a ContentType from the data repository.

Declaration
public override void Delete(ContentType contentType)
Parameters
Type Name Description
ContentType contentType
Overrides

List()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Lists all ContentTypes in the data repository.

Declaration
public override IEnumerable<ContentType> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentType>

Enumeration of ContentTypes.

Overrides

Load(Guid)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads a ContentType with the specified System.Guid from the data repository.

Declaration
public override ContentType Load(Guid guid)
Parameters
Type Name Description
System.Guid guid

The ContentType GUID.

Returns
Type Description
ContentType

The ContentType that matches the given System.Guid or null if none could be found.

Overrides

Load(Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads a ContentType with the specified id from the data repository.

Declaration
public override ContentType Load(int id)
Parameters
Type Name Description
System.Int32 id

The ContentType id.

Returns
Type Description
ContentType

The ContentType that matches the given id or null if none could be found.

Overrides

Load(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads a ContentType with the specified name from the data repository.

Declaration
public override ContentType Load(string name)
Parameters
Type Name Description
System.String name

The ContentType name.

Returns
Type Description
ContentType

The ContentType that matches the given name or null if none could be found.

Overrides

Load(Type)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads a ContentType with the underlying System.Type from the data repository.

Declaration
public override ContentType Load(Type modelType)
Parameters
Type Name Description
System.Type modelType

The underlying System.Type of the ContentType.

Returns
Type Description
ContentType

The ContentType that matches the given System.Type or null if none could be found.

Overrides

Save(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves the specified content type to the data repository.

Declaration
public override void Save(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

The content type to save.

Overrides
Remarks

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Exceptions
Type Condition
System.NotSupportedException

contentType is marked as read only.

Save(IEnumerable<ContentType>, ContentTypeSaveOptions)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Save list of ContentType with respect to ContentTypeSaveOptions

Declaration
public override void Save(IEnumerable<ContentType> contentTypes, ContentTypeSaveOptions options)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentType> contentTypes

The content types.

ContentTypeSaveOptions options

The content type save options.

Overrides
Exceptions
Type Condition
VersionValidationException

Throws the exception when version transition is not valid.

Explicit Interface Implementations

ICachedRepository.ClearCache()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears all the cached data from the repository.

Declaration
void ICachedRepository.ClearCache()

Implements

Extension Methods