Adds 'Url', 'ItemType' and the Indexed property alias to IPublishedContent.

Changes Properties to ICollection instead of Collection for IPublishedContent.
Creates PublishedContentBase object which handles the Url and Indexed property on IPublishedContent automatically so implementors should use this base
class instead. Moves GetPropertyValue extensions to the Umbraco.Web project instead of the
Umbraco.Core project because this method needs to parse internal links if the value is a string. We require the UmbracoContext
to do this so they must exist in the Web project.
This commit is contained in:
Shannon Deminick
2012-12-09 03:22:11 +05:00
parent 084e2ee37f
commit 44ccfc0262
13 changed files with 444 additions and 155 deletions

View File

@@ -5,7 +5,7 @@ using System.Collections.ObjectModel;
namespace Umbraco.Core.Models
{
/// <summary>
/// Defines a PublishedContent in Umbraco
/// Defines a published item in Umbraco
/// </summary>
/// <remarks>
/// A replacement for INode which needs to occur since INode doesn't contain the document type alias
@@ -13,7 +13,6 @@ namespace Umbraco.Core.Models
/// </remarks>
public interface IPublishedContent
{
IPublishedContent Parent { get; }
int Id { get; }
int TemplateId { get; }
int SortOrder { get; }
@@ -30,9 +29,20 @@ namespace Umbraco.Core.Models
DateTime UpdateDate { get; }
Guid Version { get; }
int Level { get; }
Collection<IPublishedContentProperty> Properties { get; }
string Url { get; }
PublishedItemType ItemType { get; }
IPublishedContent Parent { get; }
IEnumerable<IPublishedContent> Children { get; }
ICollection<IPublishedContentProperty> Properties { get; }
/// <summary>
/// Returns the property value for the property alias specified
/// </summary>
/// <param name="propertyAlias"></param>
/// <returns></returns>
object this[string propertyAlias] { get; }
/// <summary>
/// Returns a property on the object based on an alias
/// </summary>