Class PublishingStrategy
Currently acts as an interconnection between the new public api and the legacy api for publishing
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class PublishingStrategy : BasePublishingStrategy, IPublishingStrategy, IPublishingStrategy2
Constructors
PublishingStrategy(IEventMessagesFactory, ILogger)
Declaration
[Obsolete("This class is not intended to be used, it will be removed in future versions")]
public PublishingStrategy(IEventMessagesFactory eventMessagesFactory, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IEventMessagesFactory | eventMessagesFactory | |
ILogger | logger |
PublishingStrategy(IScopeProvider, IEventMessagesFactory, ILogger)
Declaration
public PublishingStrategy(IScopeProvider scopeProvider, IEventMessagesFactory eventMessagesFactory, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IScopeProvider | scopeProvider | |
IEventMessagesFactory | eventMessagesFactory | |
ILogger | logger |
Methods
Publish(IContent, Int32)
Publishes a single piece of Content
Declaration
public override bool Publish(IContent content, int userId)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | IContent to publish |
System.Int32 | userId | Id of the User issueing the publish operation |
Returns
Type | Description |
---|---|
System.Boolean | True if the publish operation was successfull and not cancelled, otherwise false |
PublishingFinalized(IEnumerable<IContent>, Boolean)
Call to fire event that updating the published content has finalized.
Declaration
public override void PublishingFinalized(IEnumerable<IContent> content, bool isAllRepublished)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IContent> | content | An enumerable list of IContent thats being published |
System.Boolean | isAllRepublished | Boolean indicating whether its all content that is republished |
PublishingFinalized(IContent)
Call to fire event that updating the published content has finalized.
Declaration
public override void PublishingFinalized(IContent content)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | IContent thats being published |
Remarks
This seperation of the OnPublished event is done to ensure that the Content has been properly updated (committed unit of work) and xml saved in the db.
PublishWithChildren(IEnumerable<IContent>, Int32)
Publishes a list of Content
Declaration
public override bool PublishWithChildren(IEnumerable<IContent> content, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IContent> | content | An enumerable list of IContent |
System.Int32 | userId | Id of the User issueing the publish operation |
Returns
Type | Description |
---|---|
System.Boolean | True if the publish operation was successfull and not cancelled, otherwise false |
UnPublish(IEnumerable<IContent>, Int32)
Unpublishes a list of Content
Declaration
public override bool UnPublish(IEnumerable<IContent> content, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IContent> | content | An enumerable list of IContent |
System.Int32 | userId | Id of the User issueing the unpublish operation |
Returns
Type | Description |
---|---|
System.Boolean | True if the unpublish operation was successfull and not cancelled, otherwise false |
UnPublish(IContent, Int32)
Unpublishes a single piece of Content
Declaration
public override bool UnPublish(IContent content, int userId)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | IContent to unpublish |
System.Int32 | userId | Id of the User issueing the unpublish operation |
Returns
Type | Description |
---|---|
System.Boolean | True if the unpublish operation was successfull and not cancelled, otherwise false |
UnPublishingFinalized(IEnumerable<IContent>)
Call to fire event that updating the unpublished content has finalized.
Declaration
public override void UnPublishingFinalized(IEnumerable<IContent> content)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IContent> | content | An enumerable list of IContent thats being unpublished |
UnPublishingFinalized(IContent)
Call to fire event that updating the unpublished content has finalized.
Declaration
public override void UnPublishingFinalized(IContent content)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | IContent thats being unpublished |
Events
Published
Occurs after publish
Declaration
[Obsolete("Use events on the ContentService")]
public static event TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> Published
Event Type
Type | Description |
---|---|
TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> |
Publishing
Occurs before publish
Declaration
[Obsolete("Use events on the ContentService")]
public static event TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> Publishing
Event Type
Type | Description |
---|---|
TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> |
UnPublished
Occurs after unpublish
Declaration
[Obsolete("Use events on the ContentService")]
public static event TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> UnPublished
Event Type
Type | Description |
---|---|
TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> |
UnPublishing
Occurs before unpublish
Declaration
[Obsolete("Use events on the ContentService")]
public static event TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> UnPublishing
Event Type
Type | Description |
---|---|
TypedEventHandler<IPublishingStrategy, PublishEventArgs<IContent>> |