Interface IContentRepository
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface IContentRepository : IRepositoryVersionable<int, IContent>, IRepositoryQueryable<int, IContent>, IRepository<int, IContent>, IReadRepository<int, IContent>, IRecycleBinRepository<IContent>, IReadRepository<Guid, IContent>, IRepository, IDisposable, IDeleteMediaFilesRepository
Methods
AddOrUpdateContentXml(IContent, Func<IContent, XElement>)
Used to add/update published xml for the content item
Declaration
void AddOrUpdateContentXml(IContent content, Func<IContent, XElement> xml)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.Func<IContent, System.Xml.Linq.XElement> |
xml |
|
AddOrUpdatePermissions(ContentPermissionSet)
Used to add/update a permission for a content item
Declaration
void AddOrUpdatePermissions(ContentPermissionSet permission)
Parameters
AddOrUpdatePreviewXml(IContent, Func<IContent, XElement>)
Used to add/update preview xml for the content item
Declaration
void AddOrUpdatePreviewXml(IContent content, Func<IContent, XElement> xml)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.Func<IContent, System.Xml.Linq.XElement> |
xml |
|
AssignEntityPermission(IContent, Char, IEnumerable<Int32>)
Assigns a single permission to the current content item for the specified user group ids
Declaration
void AssignEntityPermission(IContent entity, char permission, IEnumerable<int> groupIds)
Parameters
Type |
Name |
Description |
IContent |
entity |
|
System.Char |
permission |
|
System.Collections.Generic.IEnumerable<System.Int32> |
groupIds |
|
BuildXmlCache()
This builds the Xml document used for the XML cache
Declaration
XmlDocument BuildXmlCache()
Returns
Type |
Description |
System.Xml.XmlDocument |
|
ClearPublished(IContent)
Clears the published flag for a content.
Declaration
void ClearPublished(IContent content)
Parameters
CountPublished(String)
Get the count of published items
Declaration
int CountPublished(string contentTypeAlias = null)
Parameters
Type |
Name |
Description |
System.String |
contentTypeAlias |
|
Returns
Type |
Description |
System.Int32 |
|
DeleteContentXml(IContent)
Used to remove the content xml for a content item
Declaration
void DeleteContentXml(IContent content)
Parameters
GetByPublishedVersion(IQuery<IContent>)
Gets all published Content by the specified query
Declaration
IEnumerable<IContent> GetByPublishedVersion(IQuery<IContent> query)
Parameters
Type |
Name |
Description |
IQuery<IContent> |
query |
Query to execute against published versions
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IContent> |
An enumerable list of IContent
|
GetPermissionsForEntity(Int32)
Gets the explicit list of permissions for the content item
Declaration
EntityPermissionCollection GetPermissionsForEntity(int entityId)
Parameters
Type |
Name |
Description |
System.Int32 |
entityId |
|
Returns
ReplaceContentPermissions(EntityPermissionSet)
Declaration
void ReplaceContentPermissions(EntityPermissionSet permissionSet)
Parameters