Try our conversational search powered by Generative AI!

Class CleanUnusedAssetsFoldersJob

Scheduled job that removes content asset folders where the related content has been deleted.

Inheritance
System.Object
CleanUnusedAssetsFoldersJob
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.Util
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ScheduledPlugIn(DisplayName = "Remove Unrelated Content Resources", LanguagePath = "/admin/databasejob/contentassetscleanupjob", HelpFile = "contentassetscleanupjob", DefaultEnabled = true, InitialTime = "1.1:0:0", IntervalLength = 1, IntervalType = ScheduledIntervalType.Weeks)]
public class CleanUnusedAssetsFoldersJob : JobBase

Constructors

CleanUnusedAssetsFoldersJob()

Initializes a new instance of the CleanUnusedAssetsFoldersJob class.

Declaration
public CleanUnusedAssetsFoldersJob()

CleanUnusedAssetsFoldersJob(IContentRepository, DynamicDataStoreFactory, IChangeLog, ServiceAccessor<ContentListDB>)

Initializes a new instance of the CleanUnusedAssetsFoldersJob class.

Declaration
[Obsolete("Use alternative constructor")]
public CleanUnusedAssetsFoldersJob(IContentRepository contentRepository, DynamicDataStoreFactory ddsFactory, IChangeLog changeLog, ServiceAccessor<ContentListDB> contentListDb)
Parameters
Type Name Description
IContentRepository contentRepository

The content repository.

DynamicDataStoreFactory ddsFactory

The DDS factory.

IChangeLog changeLog

The change log.

ServiceAccessor<ContentListDB> contentListDb

The content list db.

Fields

BatchSize

The number of items that is loaded in a batch.

Declaration
public const int BatchSize = 10
Field Value
Type Description
System.Int32

Methods

Execute()

Execute the job

Declaration
public override string Execute()
Returns
Type Description
System.String
Overrides

OnStatusChanged(String)

Raise a StatusChanged event

Declaration
protected override void OnStatusChanged(string statusMessage)
Parameters
Type Name Description
System.String statusMessage

Status message to report

Overrides

Stop()

Stop the job

Declaration
public override void Stop()
Overrides

Extension Methods