View Source
Interface IDocumentRepository
Assembly: Umbraco.Core.dll
Syntax
public interface IDocumentRepository : IContentRepository<int, IContent>, IReadWriteQueryRepository<int, IContent>, IReadRepository<int, IContent>, IWriteRepository<IContent>, IQueryRepository<IContent>, IReadRepository<Guid, IContent>, IRepository
Methods
View Source
AddOrUpdatePermissions(ContentPermissionSet)
Used to add/update a permission for a content item
Declaration
void AddOrUpdatePermissions(ContentPermissionSet permission)
Parameters
View Source
AssignEntityPermission(IContent, string, IEnumerable<int>)
Assigns a single permission to the current content item for the specified user group ids
Declaration
void AssignEntityPermission(IContent entity, string permission, IEnumerable<int> groupIds)
Parameters
| Type |
Name |
Description |
| IContent |
entity |
|
| string |
permission |
|
| IEnumerable<int> |
groupIds |
|
View Source
ClearSchedule(DateTime)
Clears the publishing schedule for all entries having an a date before (lower than, or equal to) a specified date.
Declaration
void ClearSchedule(DateTime date)
Parameters
| Type |
Name |
Description |
| DateTime |
date |
|
View Source
ClearSchedule(DateTime, ContentScheduleAction)
Declaration
void ClearSchedule(DateTime date, ContentScheduleAction action)
Parameters
View Source
CountPublished(string?)
Get the count of published items
Declaration
int CountPublished(string? contentTypeAlias = null)
Parameters
| Type |
Name |
Description |
| string |
contentTypeAlias |
|
Returns
View Source
GetContentForExpiration(DateTime)
Gets IContent objects having an expiration date before (lower than, or equal to) a specified date.
Declaration
IEnumerable<IContent> GetContentForExpiration(DateTime date)
Parameters
| Type |
Name |
Description |
| DateTime |
date |
|
Returns
View Source
GetContentForRelease(DateTime)
Gets IContent objects having a release date before (lower than, or equal to) a specified date.
Declaration
IEnumerable<IContent> GetContentForRelease(DateTime date)
Parameters
| Type |
Name |
Description |
| DateTime |
date |
|
Returns
View Source
GetContentSchedule(int)
Gets publish/unpublish schedule for a content node.
Declaration
ContentScheduleCollection GetContentSchedule(int contentId)
Parameters
| Type |
Name |
Description |
| int |
contentId |
|
Returns
View Source
GetContentSchedulesByIds(int[])
Gets the content keys from the provided collection of keys that are scheduled for publishing.
Declaration
IDictionary<int, IEnumerable<ContentSchedule>> GetContentSchedulesByIds(int[] documentIds)
Parameters
| Type |
Name |
Description |
| int[] |
documentIds |
The IDs of the documents.
|
Returns
| Type |
Description |
| IDictionary<int, IEnumerable<ContentSchedule>> |
The provided collection of content keys filtered for those that are scheduled for publishing.
|
View Source
GetPermissionsForEntity(int)
Gets the explicit list of permissions for the content item
Declaration
EntityPermissionCollection GetPermissionsForEntity(int entityId)
Parameters
| Type |
Name |
Description |
| int |
entityId |
|
Returns
View Source
HasContentForExpiration(DateTime)
Declaration
bool HasContentForExpiration(DateTime date)
Parameters
| Type |
Name |
Description |
| DateTime |
date |
|
Returns
View Source
HasContentForRelease(DateTime)
Declaration
bool HasContentForRelease(DateTime date)
Parameters
| Type |
Name |
Description |
| DateTime |
date |
|
Returns
View Source
IsPathPublished(IContent?)
Declaration
bool IsPathPublished(IContent? content)
Parameters
Returns
View Source
PersistContentSchedule(IContent, ContentScheduleCollection)
Persists publish/unpublish schedule for a content node.
Declaration
void PersistContentSchedule(IContent content, ContentScheduleCollection schedule)
Parameters
View Source
RecycleBinSmells()
Returns true if there is any content in the recycle bin
Declaration
Returns
View Source
ReplaceContentPermissions(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.
Declaration
void ReplaceContentPermissions(EntityPermissionSet permissionSet)
Parameters