Implements the content service.
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic class ContentService : RepositoryService, IContentService, IContentServiceBase<IContent>, IContentServiceBase, IService
Constructors View Source ContentService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDocumentRepository, IEntityRepository, IAuditRepository, IContentTypeRepository, IDocumentBlueprintRepository, ILanguageRepository, Lazy<IPropertyValidationService>, IShortStringHelper, ICultureImpactFactory) Declaration
public ContentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDocumentRepository documentRepository, IEntityRepository entityRepository, IAuditRepository auditRepository, IContentTypeRepository contentTypeRepository, IDocumentBlueprintRepository documentBlueprintRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, IShortStringHelper shortStringHelper, ICultureImpactFactory cultureImpactFactory)
Parameters View Source ContentService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDocumentRepository, IEntityRepository, IAuditRepository, IContentTypeRepository, IDocumentBlueprintRepository, ILanguageRepository, Lazy<IPropertyValidationService>, IShortStringHelper, ICultureImpactFactory, IUserIdKeyResolver) Declaration
public ContentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDocumentRepository documentRepository, IEntityRepository entityRepository, IAuditRepository auditRepository, IContentTypeRepository contentTypeRepository, IDocumentBlueprintRepository documentBlueprintRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, IShortStringHelper shortStringHelper, ICultureImpactFactory cultureImpactFactory, IUserIdKeyResolver userIdKeyResolver)
Parameters View Source ContentService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDocumentRepository, IEntityRepository, IAuditRepository, IContentTypeRepository, IDocumentBlueprintRepository, ILanguageRepository, Lazy<IPropertyValidationService>, IShortStringHelper, ICultureImpactFactory, IUserIdKeyResolver, PropertyEditorCollection) Declaration
public ContentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDocumentRepository documentRepository, IEntityRepository entityRepository, IAuditRepository auditRepository, IContentTypeRepository contentTypeRepository, IDocumentBlueprintRepository documentBlueprintRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, IShortStringHelper shortStringHelper, ICultureImpactFactory cultureImpactFactory, IUserIdKeyResolver userIdKeyResolver, PropertyEditorCollection propertyEditorCollection)
Parameters View Source ContentService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDocumentRepository, IEntityRepository, IAuditRepository, IContentTypeRepository, IDocumentBlueprintRepository, ILanguageRepository, Lazy<IPropertyValidationService>, IShortStringHelper, ICultureImpactFactory, IUserIdKeyResolver, PropertyEditorCollection, IIdKeyMap) Declaration
public ContentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDocumentRepository documentRepository, IEntityRepository entityRepository, IAuditRepository auditRepository, IContentTypeRepository contentTypeRepository, IDocumentBlueprintRepository documentBlueprintRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, IShortStringHelper shortStringHelper, ICultureImpactFactory cultureImpactFactory, IUserIdKeyResolver userIdKeyResolver, PropertyEditorCollection propertyEditorCollection, IIdKeyMap idKeyMap)
Parameters View Source ContentService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDocumentRepository, IEntityRepository, IAuditRepository, IContentTypeRepository, IDocumentBlueprintRepository, ILanguageRepository, Lazy<IPropertyValidationService>, IShortStringHelper, ICultureImpactFactory, IUserIdKeyResolver, PropertyEditorCollection, IIdKeyMap, IOptionsMonitor<ContentSettings>, IRelationService) Declaration
public ContentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDocumentRepository documentRepository, IEntityRepository entityRepository, IAuditRepository auditRepository, IContentTypeRepository contentTypeRepository, IDocumentBlueprintRepository documentBlueprintRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, IShortStringHelper shortStringHelper, ICultureImpactFactory cultureImpactFactory, IUserIdKeyResolver userIdKeyResolver, PropertyEditorCollection propertyEditorCollection, IIdKeyMap idKeyMap, IOptionsMonitor<ContentSettings> optionsMonitor, IRelationService relationService)
Parameters Methods View Source CheckDataIntegrity(ContentDataIntegrityReportOptions) Declaration
public ContentDataIntegrityReport CheckDataIntegrity(ContentDataIntegrityReportOptions options)
Parameters Returns View Source Copy(IContent, Int32, Boolean, Boolean, Int32)
Copies an IContent object by creating a new Content object of the same type and copies all data from the current to the new copy which is returned.
Declarationpublic IContent Copy(IContent content, int parentId, bool relateToOriginal, bool recursive, int userId = -1)
Parameters Type Name Description IContent content
The IContent to copy
System.Int32 parentIdId of the Content's new Parent
System.Boolean relateToOriginalBoolean indicating whether the copy should be related to the original
System.Boolean recursiveA value indicating whether to recursively copy children.
System.Int32 userIdOptional Id of the User copying the Content
Returns View Source Copy(IContent, Int32, Boolean, Int32)Copies an IContent object by creating a new Content object of the same type and copies all data from the current to the new copy which is returned. Recursively copies all children.
Declarationpublic IContent Copy(IContent content, int parentId, bool relateToOriginal, int userId = -1)
Parameters Type Name Description IContent content
The IContent to copy
System.Int32 parentIdId of the Content's new Parent
System.Boolean relateToOriginalBoolean indicating whether the copy should be related to the original
System.Int32 userIdOptional Id of the User copying the Content
Returns View Source Count(String) Declarationpublic int Count(string contentTypeAlias = null)
Parameters Type Name Description System.String contentTypeAlias Returns Type Description System.Int32 View Source CountChildren(Int32, String) Declaration
public int CountChildren(int parentId, string contentTypeAlias = null)
Parameters Type Name Description System.Int32 parentId System.String contentTypeAlias Returns Type Description System.Int32 View Source CountDescendants(Int32, String) Declaration
public int CountDescendants(int parentId, string contentTypeAlias = null)
Parameters Type Name Description System.Int32 parentId System.String contentTypeAlias Returns Type Description System.Int32 View Source CountPublished(String) Declaration
public int CountPublished(string contentTypeAlias = null)
Parameters Type Name Description System.String contentTypeAlias Returns Type Description System.Int32 View Source Create(String, Guid, String, Int32)
Creates an IContent object using the alias of the IContentType that this Content should based on.
Declarationpublic IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = -1)
Parameters Type Name Description System.String name
Name of the Content object
Guid parentIdId of Parent for the new Content
System.String contentTypeAliasAlias of the IContentType
System.Int32 userIdOptional id of the user creating the content
Returns View Source Create(String, Int32, String, Int32)Creates an IContent object of a specified content type.
Declarationpublic IContent Create(string name, int parentId, string contentTypeAlias, int userId = -1)
Parameters Type Name Description System.String name
The name of the content object.
System.Int32 parentIdThe identifier of the parent, or -1.
System.String contentTypeAliasThe alias of the content type.
System.Int32 userIdThe optional id of the user creating the content.
Returns Type Description IContentThe content object.
View Source Create(String, Int32, IContentType, Int32)Creates an IContent object of a specified content type.
Declarationpublic IContent Create(string name, int parentId, IContentType contentType, int userId = -1)
Parameters Type Name Description System.String name
The name of the content object.
System.Int32 parentIdThe identifier of the parent, or -1.
IContentType contentTypeThe content type of the content
System.Int32 userIdThe optional id of the user creating the content.
Returns Type Description IContentThe content object.
View Source Create(String, IContent, String, Int32)Creates an IContent object of a specified content type, under a parent.
Declarationpublic IContent Create(string name, IContent parent, string contentTypeAlias, int userId = -1)
Parameters Type Name Description System.String name
The name of the content object.
IContent parentThe parent content object.
System.String contentTypeAliasThe alias of the content type.
System.Int32 userIdThe optional id of the user creating the content.
Returns Type Description IContentThe content object.
View Source CreateAndSave(String, Int32, String, Int32)Creates an IContent object of a specified content type.
Declarationpublic IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = -1)
Parameters Type Name Description System.String name
The name of the content object.
System.Int32 parentIdThe identifier of the parent, or -1.
System.String contentTypeAliasThe alias of the content type.
System.Int32 userIdThe optional id of the user creating the content.
Returns Type Description IContentThe content object.
Remarks View Source CreateAndSave(String, IContent, String, Int32)Creates an IContent object of a specified content type, under a parent.
Declarationpublic IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = -1)
Parameters Type Name Description System.String name
The name of the content object.
IContent parentThe parent content object.
System.String contentTypeAliasThe alias of the content type.
System.Int32 userIdThe optional id of the user creating the content.
Returns Type Description IContentThe content object.
Remarks View Source CreateContentFromBlueprint(IContent, String, Int32) Declarationpublic IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = -1)
Parameters Type Name Description IContent blueprint System.String name System.Int32 userId Returns View Source Delete(IContent, Int32)
Deletes a document.
Declarationpublic OperationResult Delete(IContent content, int userId = -1)
Parameters Type Name Description IContent content System.Int32 userId Returns View Source DeleteBlueprint(IContent, Int32) Declaration
public void DeleteBlueprint(IContent content, int userId = -1)
Parameters Type Name Description IContent content System.Int32 userId View Source DeleteBlueprintsOfType(Int32, Int32) Declaration
public void DeleteBlueprintsOfType(int contentTypeId, int userId = -1)
Parameters Type Name Description System.Int32 contentTypeId System.Int32 userId View Source DeleteBlueprintsOfTypes(IEnumerable<Int32>, Int32) Declaration
public void DeleteBlueprintsOfTypes(IEnumerable<int> contentTypeIds, int userId = -1)
Parameters Type Name Description IEnumerable<System.Int32> contentTypeIds System.Int32 userId View Source DeleteOfType(Int32, Int32)
Deletes all content items of specified type. All children of deleted content item is moved to Recycle Bin.
Declarationpublic void DeleteOfType(int contentTypeId, int userId = -1)
Parameters Type Name Description System.Int32 contentTypeId
Id of the IContentType
System.Int32 userIdOptional id of the user deleting the media
View Source DeleteOfTypes(IEnumerable<Int32>, Int32)Deletes all content of specified type. All children of deleted content is moved to Recycle Bin.
Declarationpublic void DeleteOfTypes(IEnumerable<int> contentTypeIds, int userId = -1)
Parameters Type Name Description IEnumerable<System.Int32> contentTypeIds
Id of the IContentType
System.Int32 userIdOptional Id of the user issuing the delete operation
View Source DeleteVersion(Int32, Int32, Boolean, Int32)Permanently deletes specific version(s) from an IContent object. This method will never delete the latest version of a content item.
Declarationpublic void DeleteVersion(int id, int versionId, bool deletePriorVersions, int userId = -1)
Parameters Type Name Description System.Int32 id
Id of the IContent object to delete a version from
System.Int32 versionIdId of the version to delete
System.Boolean deletePriorVersionsBoolean indicating whether to delete versions prior to the versionId
System.Int32 userIdOptional Id of the User deleting versions of a Content object
View Source DeleteVersions(Int32, DateTime, Int32)Permanently deletes versions from an IContent object prior to a specific date. This method will never delete the latest version of a content item.
Declarationpublic void DeleteVersions(int id, DateTime versionDate, int userId = -1)
Parameters Type Name Description System.Int32 id
Id of the IContent object to delete versions from
DateTime versionDateLatest version date
System.Int32 userIdOptional Id of the User deleting versions of a Content object
View Source EmptyRecycleBin(Int32)Empties the Recycle Bin by deleting all IContent that resides in the bin
Declarationpublic OperationResult EmptyRecycleBin(int userId = -1)
Parameters Type Name Description System.Int32 userId Returns View Source EmptyRecycleBinAsync(Guid) Declaration
public async Task<OperationResult> EmptyRecycleBinAsync(Guid userId)
Parameters Type Name Description Guid userId Returns View Source GetAncestors(Int32)
Gets a collection of IContent objects, which are ancestors of the current content.
Declarationpublic IEnumerable<IContent> GetAncestors(int id)
Parameters Type Name Description System.Int32 id
Id of the IContent to retrieve ancestors for
Returns View Source GetAncestors(IContent)Gets a collection of IContent objects, which are ancestors of the current content.
Declarationpublic IEnumerable<IContent> GetAncestors(IContent content)
Parameters Returns View Source GetBlueprintById(Guid) Declaration
public IContent GetBlueprintById(Guid id)
Parameters Type Name Description Guid id Returns View Source GetBlueprintById(Int32) Declaration
public IContent GetBlueprintById(int id)
Parameters Type Name Description System.Int32 id Returns View Source GetBlueprintsForContentTypes(Int32[]) Declaration
public IEnumerable<IContent> GetBlueprintsForContentTypes(params int[] contentTypeId)
Parameters Type Name Description System.Int32[] contentTypeId Returns View Source GetById(Guid)
Gets an IContent object by its 'UniqueId'
Declarationpublic IContent GetById(Guid key)
Parameters Type Name Description Guid key
Guid key of the Content to retrieve
Returns View Source GetById(Int32)Gets an IContent object by Id
Declarationpublic IContent GetById(int id)
Parameters Type Name Description System.Int32 id
Id of the Content to retrieve
Returns View Source GetByIds(IEnumerable<Guid>)Gets IContent objects by Ids
Declarationpublic IEnumerable<IContent> GetByIds(IEnumerable<Guid> ids)
Parameters Type Name Description IEnumerable<Guid> ids
Ids of the Content to retrieve
Returns View Source GetByIds(IEnumerable<Int32>)Gets an IContent object by Id
Declarationpublic IEnumerable<IContent> GetByIds(IEnumerable<int> ids)
Parameters Type Name Description IEnumerable<System.Int32> ids
Ids of the Content to retrieve
Returns View Source GetByLevel(Int32)Gets a collection of IContent objects by Level
Declarationpublic IEnumerable<IContent> GetByLevel(int level)
Parameters Type Name Description System.Int32 level
The level to retrieve Content from
Returns View Source GetContentForExpiration(DateTime)Gets documents having an expiration date before (lower than, or equal to) a specified date.
Declarationpublic IEnumerable<IContent> GetContentForExpiration(DateTime date)
Parameters Type Name Description DateTime date Returns View Source GetContentForRelease(DateTime)
Gets documents having a release date before (lower than, or equal to) a specified date.
Declarationpublic IEnumerable<IContent> GetContentForRelease(DateTime date)
Parameters Type Name Description DateTime date Returns View Source GetContentScheduleByContentId(Guid) Declaration
public ContentScheduleCollection GetContentScheduleByContentId(Guid contentId)
Parameters Type Name Description Guid contentId Returns View Source GetContentScheduleByContentId(Int32)
Gets publish/unpublish schedule for a content node.
Declarationpublic ContentScheduleCollection GetContentScheduleByContentId(int contentId)
Parameters Type Name Description System.Int32 contentId
Id of the Content to load schedule for
Returns View Source GetPagedChildren(Int32, Int64, Int32, out Int64, IQuery<IContent>, Ordering)Gets child documents of a parent.
Declarationpublic IEnumerable<IContent> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren, IQuery<IContent> filter = null, Ordering ordering = null)
Parameters Type Name Description System.Int32 id
The parent identifier.
System.Int64 pageIndexThe page number.
System.Int32 pageSizeThe page size.
System.Int64 totalChildren IQuery<IContent> filterQuery filter.
Ordering orderingOrdering infos.
Returns View Source GetPagedContentInRecycleBin(Int64, Int32, out Int64, IQuery<IContent>, Ordering)Gets a collection of an IContent objects, which resides in the Recycle Bin
Declarationpublic IEnumerable<IContent> GetPagedContentInRecycleBin(long pageIndex, int pageSize, out long totalRecords, IQuery<IContent> filter = null, Ordering ordering = null)
Parameters Type Name Description System.Int64 pageIndex System.Int32 pageSize System.Int64 totalRecords IQuery<IContent> filter Ordering ordering Returns View Source GetPagedDescendants(Int32, Int64, Int32, out Int64, IQuery<IContent>, Ordering)
Gets descendant documents of a given parent.
Declarationpublic IEnumerable<IContent> GetPagedDescendants(int id, long pageIndex, int pageSize, out long totalChildren, IQuery<IContent> filter = null, Ordering ordering = null)
Parameters Type Name Description System.Int32 id
The parent identifier.
System.Int64 pageIndexThe page number.
System.Int32 pageSizeThe page size.
System.Int64 totalChildren IQuery<IContent> filterQuery filter.
Ordering orderingOrdering infos.
Returns View Source GetPagedOfType(Int32, Int64, Int32, out Int64, IQuery<IContent>, Ordering)Gets paged documents of a content
Declarationpublic IEnumerable<IContent> GetPagedOfType(int contentTypeId, long pageIndex, int pageSize, out long totalRecords, IQuery<IContent> filter = null, Ordering ordering = null)
Parameters Type Name Description System.Int32 contentTypeId
The page number.
System.Int64 pageIndexThe page number.
System.Int32 pageSizeThe page size.
System.Int64 totalRecordsTotal number of documents.
IQuery<IContent> filterSearch text filter.
Ordering orderingOrdering infos.
Returns View Source GetPagedOfTypes(Int32[], Int64, Int32, out Int64, IQuery<IContent>, Ordering)Gets paged documents for specified content types
Declarationpublic IEnumerable<IContent> GetPagedOfTypes(int[] contentTypeIds, long pageIndex, int pageSize, out long totalRecords, IQuery<IContent> filter, Ordering ordering = null)
Parameters Type Name Description System.Int32[] contentTypeIds
The page number.
System.Int64 pageIndexThe page number.
System.Int32 pageSizeThe page size.
System.Int64 totalRecordsTotal number of documents.
IQuery<IContent> filterSearch text filter.
Ordering orderingOrdering infos.
Returns View Source GetParent(Int32)Gets the parent of the current content as an IContent item.
Declarationpublic IContent GetParent(int id)
Parameters Type Name Description System.Int32 id
Id of the IContent to retrieve the parent from
Returns View Source GetParent(IContent)Gets the parent of the current content as an IContent item.
Declarationpublic IContent GetParent(IContent content)
Parameters Returns View Source GetPermissions(IContent)
Returns implicit/inherited permissions assigned to the content item for all user groups
Declarationpublic EntityPermissionCollection GetPermissions(IContent content)
Parameters Returns View Source GetPublishedChildren(Int32)
Gets a collection of published IContent objects by Parent Id
Declarationpublic IEnumerable<IContent> GetPublishedChildren(int id)
Parameters Type Name Description System.Int32 id
Id of the Parent to retrieve Children from
Returns Type Description IEnumerable<IContent>An Enumerable list of published IContent objects
View Source GetRootContent()Gets a collection of IContent objects, which reside at the first level / root
Declarationpublic IEnumerable<IContent> GetRootContent()
Returns View Source GetVersion(Int32)
Gets a specific version of an IContent item.
Declarationpublic IContent GetVersion(int versionId)
Parameters Type Name Description System.Int32 versionId
Id of the version to retrieve
Returns View Source GetVersionIds(Int32, Int32)Gets a list of all version Ids for the given content item ordered so latest is first
Declarationpublic IEnumerable<int> GetVersionIds(int id, int maxRows)
Parameters Type Name Description System.Int32 id System.Int32 maxRows
The maximum number of rows to return
Returns Type Description IEnumerable<System.Int32> View Source GetVersions(Int32)Gets a collection of an IContent objects versions by Id
Declarationpublic IEnumerable<IContent> GetVersions(int id)
Parameters Type Name Description System.Int32 id Returns View Source GetVersionsSlim(Int32, Int32, Int32)
Gets a collection of an IContent objects versions by Id
Declarationpublic IEnumerable<IContent> GetVersionsSlim(int id, int skip, int take)
Parameters Type Name Description System.Int32 id System.Int32 skip System.Int32 take Returns View Source HasChildren(Int32)
Checks whether an IContent item has any children
Declarationpublic bool HasChildren(int id)
Parameters Type Name Description System.Int32 id
Id of the IContent
Returns Type Description System.BooleanTrue if the content has any children otherwise False
View Source IsPathPublishable(IContent)Checks if the passed in IContent can be published based on the ancestors publish state.
Declarationpublic bool IsPathPublishable(IContent content)
Parameters Type Name Description IContent content
IContent to check if ancestors are published
Returns Type Description System.BooleanTrue if the Content can be published, otherwise False
View Source IsPathPublished(IContent) Declarationpublic bool IsPathPublished(IContent content)
Parameters Returns Type Description System.Boolean View Source Move(IContent, Int32, Int32)
Moves an IContent object to a new location by changing its parent id.
Declarationpublic OperationResult Move(IContent content, int parentId, int userId = -1)
Parameters Type Name Description IContent content
The IContent to move
System.Int32 parentIdId of the Content's new Parent
System.Int32 userIdOptional Id of the User moving the Content
Returns View Source MoveToRecycleBin(IContent, Int32)Moves a document to the recycle bin.
Declarationpublic OperationResult MoveToRecycleBin(IContent content, int userId = -1)
Parameters Type Name Description IContent content System.Int32 userId Returns View Source PerformScheduledPublish(DateTime)
Publishes and unpublishes scheduled documents.
Declarationpublic IEnumerable<PublishResult> PerformScheduledPublish(DateTime date)
Parameters Type Name Description DateTime date Returns View Source PersistContentSchedule(IContent, ContentScheduleCollection)
Persists publish/unpublish schedule for a content node.
Declarationpublic void PersistContentSchedule(IContent content, ContentScheduleCollection contentSchedule)
Parameters View Source Publish(IContent, String[], Int32) Declaration
public PublishResult Publish(IContent content, string[] cultures, int userId = -1)
Parameters Type Name Description IContent content System.String[] cultures System.Int32 userId Returns View Source PublishBranch(IContent, Boolean, String[], Int32)
Publishes a document branch.
Declarationpublic IEnumerable<PublishResult> PublishBranch(IContent content, bool force, string[] cultures, int userId = -1)
Parameters Type Name Description IContent content
The root document.
System.Boolean forceA value indicating whether to force-publish documents that are not already published.
System.String[] culturesThe cultures to publish.
System.Int32 userIdThe identifier of the user performing the operation.
Returns View Source PublishBranch(IContent, PublishBranchFilter, String[], Int32)Publishes a document branch.
Declarationpublic IEnumerable<PublishResult> PublishBranch(IContent content, PublishBranchFilter publishBranchFilter, string[] cultures, int userId = -1)
Parameters Type Name Description IContent content
The root document.
PublishBranchFilter publishBranchFilterA value indicating options for force publishing unpublished or re-publishing unchanged content.
System.String[] culturesThe cultures to publish.
System.Int32 userIdThe identifier of the user performing the operation.
Returns View Source RecycleBinSmells() Declarationpublic bool RecycleBinSmells()
Returns Type Description System.Boolean View Source Rollback(Int32, Int32, String, Int32) Declaration
public OperationResult Rollback(int id, int versionId, string culture = "*", int userId = -1)
Parameters Type Name Description System.Int32 id System.Int32 versionId System.String culture System.Int32 userId Returns View Source Save(IEnumerable<IContent>, Int32)
Saves documents.
Declarationpublic OperationResult Save(IEnumerable<IContent> contents, int userId = -1)
Parameters Type Name Description IEnumerable<IContent> contents System.Int32 userId Returns View Source Save(IContent, Nullable<Int32>, ContentScheduleCollection)
Saves a document.
Declarationpublic OperationResult Save(IContent content, int? userId = null, ContentScheduleCollection contentSchedule = null)
Parameters Returns View Source SaveAndPublish(IContent, String, Int32) Declaration
public PublishResult SaveAndPublish(IContent content, string culture = "*", int userId = -1)
Parameters Type Name Description IContent content System.String culture System.Int32 userId Returns View Source SaveAndPublish(IContent, String[], Int32) Declaration
public PublishResult SaveAndPublish(IContent content, string[] cultures, int userId = -1)
Parameters Type Name Description IContent content System.String[] cultures System.Int32 userId Returns View Source SaveAndPublishBranch(IContent, Boolean, String, Int32) Declaration
public IEnumerable<PublishResult> SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = -1)
Parameters Type Name Description IContent content System.Boolean force System.String culture System.Int32 userId Returns View Source SaveAndPublishBranch(IContent, Boolean, String[], Int32) Declaration
public IEnumerable<PublishResult> SaveAndPublishBranch(IContent content, bool force, string[] cultures, int userId = -1)
Parameters Type Name Description IContent content System.Boolean force System.String[] cultures System.Int32 userId Returns View Source SaveBlueprint(IContent, Int32) Declaration
public void SaveBlueprint(IContent content, int userId = -1)
Parameters Type Name Description IContent content System.Int32 userId View Source SendToPublication(IContent, Int32)
Sends an IContent to Publication, which executes handlers and events for the 'Send to Publication' action.
Declarationpublic bool SendToPublication(IContent content, int userId = -1)
Parameters Type Name Description IContent content
The IContent to send to publication
System.Int32 userIdOptional Id of the User issuing the send to publication
Returns Type Description System.BooleanTrue if sending publication was successful otherwise false
View Source SetPermission(IContent, String, IEnumerable<Int32>)Assigns a single permission to the current content item for the specified group ids
Declarationpublic void SetPermission(IContent entity, string permission, IEnumerable<int> groupIds)
Parameters Type Name Description IContent entity System.String permission IEnumerable<System.Int32> groupIds View Source SetPermissions(EntityPermissionSet)
Used to bulk update the permissions set for a content item. This will replace all permissions assigned to an entity with a list of user id & permission pairs.
Declarationpublic void SetPermissions(EntityPermissionSet permissionSet)
Parameters View Source Sort(IEnumerable<IContent>, Int32)
Sorts a collection of IContent objects by updating the SortOrder according to the ordering of items in the passed in items
.
public OperationResult Sort(IEnumerable<IContent> items, int userId = -1)
Parameters Type Name Description IEnumerable<IContent> items System.Int32 userId Returns Type Description OperationResult
Result indicating what action was taken when handling the command.
View Source Sort(Nullable<IEnumerable<Int32>>, Int32)Sorts a collection of IContent objects by updating the SortOrder according to the ordering of items identified by the ids
.
public OperationResult Sort(IEnumerable<int>? ids, int userId = -1)
Parameters Type Name Description System.Nullable<IEnumerable<System.Int32>> ids System.Int32 userId Returns Type Description OperationResult
Result indicating what action was taken when handling the command.
View Source Unpublish(IContent, String, Int32)Unpublishes a document.
Declarationpublic PublishResult Unpublish(IContent content, string culture = "*", int userId = -1)
Parameters Type Name Description IContent content System.String culture System.Int32 userId Returns Explicit Interface Implementations View Source IContentServiceBase<IContent>.Save(IEnumerable<IContent>, Int32) Declaration
Attempt<OperationResult> IContentServiceBase<IContent>.Save(IEnumerable<IContent> contents, int userId)
Parameters Type Name Description IEnumerable<IContent> contents System.Int32 userId Returns
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4