Class ProjectPublisher
Component for publishing IContent versions associated with Project and ProjectItem
Inheritance
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public abstract class ProjectPublisher : Object
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)
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, Nullable<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 |
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, Nullable<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, Nullable<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 |