C# Класс Sitecore.Sharedsource.Tasks.NewsMover

Показать файл Открыть проект

Открытые методы

Метод Описание
AddTemplateConfiguration ( XmlNode configNode ) : void

Adds a configured template to be organized

NewsMover ( ) : System
OnItemSaved ( object sender, EventArgs args ) : void

Called when [item saved].

Защищенные методы

Метод Описание
EnsureAndGetDate ( System.Item item, string dateFieldName ) : System.DateTime

Initializes the date field to the current date if there is no value.

GetItem ( EventArgs args ) : System.Item

Gets the item from the event args.

GetOrCreateChild ( System.Item parent, TemplateItem template, string childName, SortOrder subItemSorting ) : System.Item

Gets the or create child.

GetRoot ( System.Item item, TemplateConfiguration config ) : System.Item

Gets the root of where we start organization. i.e. the parent of the 'year' node

LoadLegacySettings ( ) : void

Loads the legacy settings.

OrganizeItem ( System.Item item, TemplateConfiguration config, System.DateTime articleDate ) : void

Organizes the item in the configurd year, [month], [day] structure. It will also remove any empty folders

Приватные методы

Метод Описание
IsItemYearMonthOrDay ( System.Item item, TemplateConfiguration config ) : bool

Determines whether the item is a year, month or day item.

Описание методов

AddTemplateConfiguration() публичный Метод

Adds a configured template to be organized
public AddTemplateConfiguration ( XmlNode configNode ) : void
configNode System.Xml.XmlNode The XML configuration node.
Результат void

EnsureAndGetDate() защищенный Метод

Initializes the date field to the current date if there is no value.
protected EnsureAndGetDate ( System.Item item, string dateFieldName ) : System.DateTime
item System.Item The article.
dateFieldName string Name of the date field.
Результат System.DateTime

GetItem() защищенный Метод

Gets the item from the event args.
protected GetItem ( EventArgs args ) : System.Item
args System.EventArgs The instance containing the event data.
Результат System.Item

GetOrCreateChild() защищенный Метод

Gets the or create child.
protected GetOrCreateChild ( System.Item parent, TemplateItem template, string childName, SortOrder subItemSorting ) : System.Item
parent System.Item The parent.
template TemplateItem The template.
childName string Name of the child.
subItemSorting SortOrder
Результат System.Item

GetRoot() защищенный Метод

Gets the root of where we start organization. i.e. the parent of the 'year' node
protected GetRoot ( System.Item item, TemplateConfiguration config ) : System.Item
item System.Item The item.
config TemplateConfiguration The config.
Результат System.Item

LoadLegacySettings() защищенный Метод

Loads the legacy settings.
protected LoadLegacySettings ( ) : void
Результат void

NewsMover() публичный Метод

public NewsMover ( ) : System
Результат System

OnItemSaved() публичный Метод

Called when [item saved].
public OnItemSaved ( object sender, EventArgs args ) : void
sender object The sender.
args System.EventArgs The instance containing the event data.
Результат void

OrganizeItem() защищенный Метод

Organizes the item in the configurd year, [month], [day] structure. It will also remove any empty folders
protected OrganizeItem ( System.Item item, TemplateConfiguration config, System.DateTime articleDate ) : void
item System.Item The item.
config TemplateConfiguration The config.
articleDate System.DateTime The article date.
Результат void