Class PublicAccessService
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class PublicAccessService : ScopeRepositoryService, IPublicAccessService, IService
Constructors
PublicAccessService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IEventMessagesFactory)
Declaration
public PublicAccessService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory)
Parameters
Methods
AddOrUpdateRule(IContent, String, String)
Declaration
[Obsolete("Use AddRule instead, this method will be removed in future versions")]
public Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddOrUpdateRule(IContent content, string ruleType, string ruleValue)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.String |
ruleType |
|
System.String |
ruleValue |
|
Returns
AddRule(IContent, String, String)
Declaration
public Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddRule(IContent content, string ruleType, string ruleValue)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.String |
ruleType |
|
System.String |
ruleValue |
|
Returns
Delete(PublicAccessEntry)
Deletes the entry and all associated rules
Declaration
public Attempt<OperationStatus> Delete(PublicAccessEntry entry)
Parameters
Returns
GetAll()
Gets all defined entries and associated rules
Declaration
public IEnumerable<PublicAccessEntry> GetAll()
Returns
GetEntryForContent(String)
Gets the entry defined for the content item based on a content path
Declaration
public PublicAccessEntry GetEntryForContent(string contentPath)
Parameters
Type |
Name |
Description |
System.String |
contentPath |
|
Returns
GetEntryForContent(IContent)
Gets the entry defined for the content item's path
Declaration
public PublicAccessEntry GetEntryForContent(IContent content)
Parameters
Returns
IsProtected(String)
Returns true if the content has an entry based on a content path
Declaration
public Attempt<PublicAccessEntry> IsProtected(string contentPath)
Parameters
Type |
Name |
Description |
System.String |
contentPath |
|
Returns
IsProtected(IContent)
Returns true if the content has an entry for it's path
Declaration
public Attempt<PublicAccessEntry> IsProtected(IContent content)
Parameters
Returns
RemoveRule(IContent, String, String)
Declaration
public Attempt<OperationStatus> RemoveRule(IContent content, string ruleType, string ruleValue)
Parameters
Type |
Name |
Description |
IContent |
content |
|
System.String |
ruleType |
|
System.String |
ruleValue |
|
Returns
Save(PublicAccessEntry)
Declaration
public Attempt<OperationStatus> Save(PublicAccessEntry entry)
Parameters
Returns
Events
Deleted
Declaration
public static event TypedEventHandler<IPublicAccessService, DeleteEventArgs<PublicAccessEntry>> Deleted
Event Type
Deleting
Declaration
public static event TypedEventHandler<IPublicAccessService, DeleteEventArgs<PublicAccessEntry>> Deleting
Event Type
Saved
Declaration
public static event TypedEventHandler<IPublicAccessService, SaveEventArgs<PublicAccessEntry>> Saved
Event Type
Saving
Declaration
public static event TypedEventHandler<IPublicAccessService, SaveEventArgs<PublicAccessEntry>> Saving
Event Type