November Happy Hour will be moved to Thursday December 5th.

Class ProjectPublisher

Component for publishing IContent versions associated with Project and ProjectItem

Inheritance
System.Object
ProjectPublisher
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public abstract class ProjectPublisher

Constructors

ProjectPublisher()

Declaration
protected ProjectPublisher()

Methods

PublishAsync(Project)

Publishes the specified Project and all content items referenced by a Project, ensuring that the current user has at least Publish access to all content items.

Declaration
public virtual Task<Project> PublishAsync(Project project)
Parameters
Type Name Description
Project project

The project to publish

Returns
Type Description
System.Threading.Tasks.Task<Project>

A task that runs the publishing process or a completed task if there was nothing to do

Remarks

Published and previously published content will be ignored since they are considered already published.

PublishAsync(Project, AccessLevel)

Publishes the specified Project and all content items referenced by a Project.

Declaration
public virtual Task<Project> PublishAsync(Project project, AccessLevel access)
Parameters
Type Name Description
Project project

The project to publish

AccessLevel access

Required access level needed for each individual content item.

Returns
Type Description
System.Threading.Tasks.Task<Project>

A task that runs the publishing process or a completed task if there was nothing to do

Remarks

Published and previously published content will be ignored since they are considered already published.

PublishAsync(Project, IEnumerable<ProjectItem>, Nullable<DateTime>, AccessLevel)

Schedules the specified Project and the specified list of ProjectItem for publication at the given date. Publishing will be immediate if parameter delayPublishUntil is null.

Declaration
public abstract Task<Project> PublishAsync(Project project, IEnumerable<ProjectItem> projectItems, DateTime? delayPublishUntil, AccessLevel access)
Parameters
Type Name Description
Project project

The project to publish

System.Collections.Generic.IEnumerable<ProjectItem> projectItems

The items to publish (if value is null all not previously published content in the project will be published)

System.Nullable<System.DateTime> delayPublishUntil

The point in time when the project and it's items should be published.

AccessLevel access

Required access level needed for each individual content item.

Returns
Type Description
System.Threading.Tasks.Task<Project>

The task that runs the publishing process or a completed task if there was nothing to do

Remarks

No filtering or other validation will be done of the content, the project items should be ready to publish.

PublishAsync(Project, Nullable<DateTime>)

Schedules the specified Project and all content items referenced by a Project for publication at the given date. Publishing will be immediate if parameter delayPublishUntil is null.

Declaration
public virtual Task<Project> PublishAsync(Project project, DateTime? delayPublishUntil)
Parameters
Type Name Description
Project project

The project to publish

System.Nullable<System.DateTime> delayPublishUntil

The point in time when the project and it's items should be published.

Returns
Type Description
System.Threading.Tasks.Task<Project>

A task that runs the publishing process or a completed task if there was nothing to do

Remarks

Published and previously published content will be ignored since they are considered already published.

PublishAsync(Project, Nullable<DateTime>, AccessLevel)

Schedules the specified Project and all content items referenced by a Project for publication at the given date. Publishing will be immediate if parameter delayPublishUntil is null.

Declaration
public virtual Task<Project> PublishAsync(Project project, DateTime? delayPublishUntil, AccessLevel access)
Parameters
Type Name Description
Project project

The project to publish

System.Nullable<System.DateTime> delayPublishUntil

The point in time when the project and it's items should be published.

AccessLevel access

Required access level needed for each individual content item.

Returns
Type Description
System.Threading.Tasks.Task<Project>

The task that runs the publishing process or a completed task if there was nothing to do

Remarks

Published and previously published content will be ignored since they are considered already published.

ReactivateAsync(Project)

Reactivates the specified Project and all content items referenced by a Project and resets the status to Active.

Declaration
public virtual Task<Project> ReactivateAsync(Project project)
Parameters
Type Name Description
Project project

The project to reactivate

Returns
Type Description
System.Threading.Tasks.Task<Project>

The task that runs the reactivation process or a completed task if there was nothing to do

ReactivateAsync(Project, AccessLevel)

Reactivates the specified Project and all content items referenced by a Project and resets the status to Active.

Declaration
public abstract Task<Project> ReactivateAsync(Project project, AccessLevel access)
Parameters
Type Name Description
Project project

The project to reactivate

AccessLevel access

Required access level needed for each individual content item.

Returns
Type Description
System.Threading.Tasks.Task<Project>

The task that runs the reactivation process or a completed task if there was nothing to do

Extension Methods