SaaS CMS has officially launched! Learn more now.

Class ContentChangeManager

Inheritance
System.Object
ContentChangeManager
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.Cms.Shell.UI.Rest
Assembly: EPiServer.Cms.Shell.UI.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IContentChangeManager))]
public class ContentChangeManager : IContentChangeManager

Constructors

ContentChangeManager(IContentRepository, IContentTypeRepository, IValidationService, PropertyResolver, IObjectSerializerFactory, IMetaDataResolver, IPropertyDefinitionRepository, LocalizationService, ContentAssetHelper, Settings, ISiteDefinitionRepository, PermissionService, IContentService, LanguageResolver, ServiceAccessor<SiteDefinition>, IStatusTransitionEvaluator, LanguageSelectorFactory)

Declaration
public ContentChangeManager(IContentRepository contentRepository, IContentTypeRepository contentTypeRepository, IValidationService validationService, PropertyResolver propertyResolver, IObjectSerializerFactory serializerFactory, IMetaDataResolver metaDataResolver, IPropertyDefinitionRepository propertyDefinitionRepository, LocalizationService localizationService, ContentAssetHelper contentAssetHelper, Settings settings, ISiteDefinitionRepository siteDefinitionRepository, PermissionService permissionService, IContentService contentService, LanguageResolver languageResolver, ServiceAccessor<SiteDefinition> currentSiteDefinition, IStatusTransitionEvaluator statusTransitionEvaluator, LanguageSelectorFactory languageSelectorFactory)
Parameters
Type Name Description
IContentRepository contentRepository
IContentTypeRepository contentTypeRepository
IValidationService validationService
PropertyResolver propertyResolver
IObjectSerializerFactory serializerFactory
IMetaDataResolver metaDataResolver
IPropertyDefinitionRepository propertyDefinitionRepository
LocalizationService localizationService
ContentAssetHelper contentAssetHelper
Settings settings
ISiteDefinitionRepository siteDefinitionRepository
PermissionService permissionService
IContentService contentService
LanguageResolver languageResolver
ServiceAccessor<SiteDefinition> currentSiteDefinition
IStatusTransitionEvaluator statusTransitionEvaluator
LanguageSelectorFactory languageSelectorFactory

ContentChangeManager(IContentRepository, IContentTypeRepository, IValidationService, IEnumerable<ICommitter>, PropertyResolver, IObjectSerializerFactory, IMetaDataResolver, IPropertyDefinitionRepository, LocalizationService, ContentAssetHelper, Settings, ISiteDefinitionRepository, PermissionService, IContentService, LanguageResolver, ServiceAccessor<SiteDefinition>, IStatusTransitionEvaluator, LanguageSelectorFactory)

Declaration
[Obsolete("This constructor has been obsoleted and will be removed in the next major release.")]
public ContentChangeManager(IContentRepository contentRepository, IContentTypeRepository contentTypeRepository, IValidationService validationService, IEnumerable<ICommitter> committers, PropertyResolver propertyResolver, IObjectSerializerFactory serializerFactory, IMetaDataResolver metaDataResolver, IPropertyDefinitionRepository propertyDefinitionRepository, LocalizationService localizationService, ContentAssetHelper contentAssetHelper, Settings settings, ISiteDefinitionRepository siteDefinitionRepository, PermissionService permissionService, IContentService contentService, LanguageResolver languageResolver, ServiceAccessor<SiteDefinition> currentSiteDefinition, IStatusTransitionEvaluator statusTransitionEvaluator, LanguageSelectorFactory languageSelectorFactory)
Parameters
Type Name Description
IContentRepository contentRepository
IContentTypeRepository contentTypeRepository
IValidationService validationService
System.Collections.Generic.IEnumerable<ICommitter> committers
PropertyResolver propertyResolver
IObjectSerializerFactory serializerFactory
IMetaDataResolver metaDataResolver
IPropertyDefinitionRepository propertyDefinitionRepository
LocalizationService localizationService
ContentAssetHelper contentAssetHelper
Settings settings
ISiteDefinitionRepository siteDefinitionRepository
PermissionService permissionService
IContentService contentService
LanguageResolver languageResolver
ServiceAccessor<SiteDefinition> currentSiteDefinition
IStatusTransitionEvaluator statusTransitionEvaluator
LanguageSelectorFactory languageSelectorFactory

Methods

Commit(ContentReference, SaveAction)

Declaration
public CommitResult Commit(ContentReference contentReference, SaveAction action)
Parameters
Type Name Description
ContentReference contentReference
SaveAction action
Returns
Type Description
CommitResult

Copy(IContent, IContent, Boolean)

Declaration
public ContentReference Copy(IContent source, IContent destination, bool createAsLocalAsset)
Parameters
Type Name Description
IContent source
IContent destination
System.Boolean createAsLocalAsset
Returns
Type Description
ContentReference

Create(ContentReference, Int32, Nullable<Int64>, Boolean, ILocalAssetNameGenerator, IDictionary<String, Object>)

Declaration
public ContentReference Create(ContentReference parentLink, int contentTypeId, long? resourceFolderId, bool createAsLocalAsset, ILocalAssetNameGenerator nameGenerator, IDictionary<string, object> properties)
Parameters
Type Name Description
ContentReference parentLink
System.Int32 contentTypeId
System.Nullable<System.Int64> resourceFolderId
System.Boolean createAsLocalAsset
ILocalAssetNameGenerator nameGenerator
System.Collections.Generic.IDictionary<System.String, System.Object> properties
Returns
Type Description
ContentReference

Create(ContentReference, Int32, Nullable<Int64>, Boolean, ILocalAssetNameGenerator, IDictionary<String, Object>, Boolean)

Declaration
public ContentReference Create(ContentReference parentLink, int contentTypeId, long? resourceFolderId, bool createAsLocalAsset, ILocalAssetNameGenerator nameGenerator, IDictionary<string, object> properties, bool autoPublish)
Parameters
Type Name Description
ContentReference parentLink
System.Int32 contentTypeId
System.Nullable<System.Int64> resourceFolderId
System.Boolean createAsLocalAsset
ILocalAssetNameGenerator nameGenerator
System.Collections.Generic.IDictionary<System.String, System.Object> properties
System.Boolean autoPublish
Returns
Type Description
ContentReference

Create(ContentReference, Int32, Nullable<Int64>, Boolean, String, IDictionary<String, Object>)

Declaration
public ContentReference Create(ContentReference parentLink, int contentTypeId, long? resourceFolderId, bool createAsLocalAsset, string name, IDictionary<string, object> properties)
Parameters
Type Name Description
ContentReference parentLink
System.Int32 contentTypeId
System.Nullable<System.Int64> resourceFolderId
System.Boolean createAsLocalAsset
System.String name
System.Collections.Generic.IDictionary<System.String, System.Object> properties
Returns
Type Description
ContentReference

Create(ContentReference, Int32, Nullable<Int64>, Boolean, String, IDictionary<String, Object>, Boolean)

Declaration
public ContentReference Create(ContentReference parentLink, int contentTypeId, long? resourceFolderId, bool createAsLocalAsset, string name, IDictionary<string, object> properties, bool autoPublish)
Parameters
Type Name Description
ContentReference parentLink
System.Int32 contentTypeId
System.Nullable<System.Int64> resourceFolderId
System.Boolean createAsLocalAsset
System.String name
System.Collections.Generic.IDictionary<System.String, System.Object> properties
System.Boolean autoPublish
Returns
Type Description
ContentReference

CreateContent(ContentReference, Int32, Nullable<Int64>, Boolean, String, IDictionary<String, Object>, Boolean)

Declaration
protected virtual ContentReference CreateContent(ContentReference parentLink, int contentTypeId, long? resourceFolderId, bool createAsLocalAsset, string name, IDictionary<string, object> properties, bool autoPublish)
Parameters
Type Name Description
ContentReference parentLink
System.Int32 contentTypeId
System.Nullable<System.Int64> resourceFolderId
System.Boolean createAsLocalAsset
System.String name
System.Collections.Generic.IDictionary<System.String, System.Object> properties
System.Boolean autoPublish
Returns
Type Description
ContentReference

CreateLanguageBranch(ContentReference, String, String, IDictionary<String, Object>)

Declaration
public ContentReference CreateLanguageBranch(ContentReference contentReference, string name, string languageBranch, IDictionary<string, object> properties)
Parameters
Type Name Description
ContentReference contentReference
System.String name
System.String languageBranch
System.Collections.Generic.IDictionary<System.String, System.Object> properties
Returns
Type Description
ContentReference

EnsureUniqueName(IContent, out Type)

Declaration
protected virtual bool EnsureUniqueName(IContent content, out Type baseType)
Parameters
Type Name Description
IContent content
System.Type baseType
Returns
Type Description
System.Boolean

GetFilteredAncestors(IContent, IEnumerable<Type>)

Declaration
protected IEnumerable<IContent> GetFilteredAncestors(IContent content, IEnumerable<Type> allowedTypes)
Parameters
Type Name Description
IContent content
System.Collections.Generic.IEnumerable<System.Type> allowedTypes
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetOrCreateContentAssetsFolder(ContentReference)

Declaration
public ContentReference GetOrCreateContentAssetsFolder(ContentReference parentLink)
Parameters
Type Name Description
ContentReference parentLink
Returns
Type Description
ContentReference

Move(IContent, IContent, Boolean)

Declaration
public ContentReference Move(IContent source, IContent destination, bool createAsLocalAsset)
Parameters
Type Name Description
IContent source
IContent destination
System.Boolean createAsLocalAsset
Returns
Type Description
ContentReference

TranslateAncestors(IContent)

Declaration
public IEnumerable<ContentReference> TranslateAncestors(IContent content)
Parameters
Type Name Description
IContent content
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentReference>

UpdateContentProperties(ContentReference, IDictionary<String, String>)

Declaration
public virtual PropertiesUpdateResult UpdateContentProperties(ContentReference contentReference, IDictionary<string, string> properties)
Parameters
Type Name Description
ContentReference contentReference
System.Collections.Generic.IDictionary<System.String, System.String> properties
Returns
Type Description
PropertiesUpdateResult

UpdateContentProperties(ContentReference, IDictionary<String, String>, SaveAction)

Declaration
public virtual PropertiesUpdateResult UpdateContentProperties(ContentReference contentReference, IDictionary<string, string> properties, SaveAction saveAction)
Parameters
Type Name Description
ContentReference contentReference
System.Collections.Generic.IDictionary<System.String, System.String> properties
SaveAction saveAction
Returns
Type Description
PropertiesUpdateResult

ValidateUniqueNameChange(IContent, ContentReference, Boolean)

Declaration
protected ValidationError ValidateUniqueNameChange(IContent instance, ContentReference parentLink, bool skipSameContent)
Parameters
Type Name Description
IContent instance
ContentReference parentLink
System.Boolean skipSameContent
Returns
Type Description
ValidationError

ValidateUniqueNameChangeAndThrow(IContent, ContentReference)

Declaration
protected void ValidateUniqueNameChangeAndThrow(IContent instance, ContentReference parentLink)
Parameters
Type Name Description
IContent instance
ContentReference parentLink

Implements

Extension Methods