using System.Collections.Generic; using Umbraco.Core.Models; namespace Umbraco.Core.Services { public interface IPublicAccessService : IService { /// /// Gets all defined entries and associated rules /// /// IEnumerable GetAll(); /// /// Gets the entry defined for the content item's path /// /// /// Returns null if no entry is found PublicAccessEntry GetEntryForContent(IContent content); /// /// Gets the entry defined for the content item based on a content path /// /// /// Returns null if no entry is found PublicAccessEntry GetEntryForContent(string contentPath); /// /// Returns true if the content has an entry for it's path /// /// /// Attempt IsProtected(IContent content); /// /// Returns true if the content has an entry based on a content path /// /// /// Attempt IsProtected(string contentPath); /// /// Adds a rule if the entry doesn't already exist /// /// /// /// /// Attempt> AddRule(IContent content, string ruleType, string ruleValue); /// /// Removes a rule /// /// /// /// Attempt RemoveRule(IContent content, string ruleType, string ruleValue); /// /// Saves the entry /// /// Attempt Save(PublicAccessEntry entry); /// /// Deletes the entry and all associated rules /// /// Attempt Delete(PublicAccessEntry entry); } }