C# Класс Bloom.Book.BookStarter

Creates the files for a new blank book from a template book
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
OnNextRunSimulateFailureMakingBook bool

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

Метод Описание
BookStarter ( IChangeableFileLocator fileLocator, BookStorage bookStorageFactory, CollectionSettings collectionSettings ) : System
CreateBookOnDiskFromTemplate ( string sourceBookFolder, string parentCollectionPath ) : string

Given a template, make a new book

SetLanguageForElementsWithMetaLanguage ( XmlNode elementOrDom, CollectionSettings settings ) : void

In xmatter, text fields are normally labeled with a "meta" language code, like "N1" for first national language. This method detects those and then looks them up, returning the actual language code in use at the moment.

This is a little uncomfortable in this class, as this feature is not currently used in any bloom-translationGroup elements.

SetupIdAndLineage ( XmlElement parentPageDiv, XmlElement childPageDiv ) : void
SetupPage ( XmlElement pageDiv, CollectionSettings collectionSettings, string contentLanguageIso1, string contentLanguageIso2 ) : void

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

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

When building on templates, we usually want to have some sample text, but don't let them bleed through to what the user sees

CopyFolder ( string sourcePath, string destinationPath ) : void
GetInitialName ( string sourcePath, string parentCollectionPath ) : string
GetMetaValue ( XmlDocument Dom, string name, string defaultValue ) : string
GetPathToHtmlFile ( string folder ) : string
InjectXMatter ( string initialPath, BookStorage storage, Layout sizeAndOrientation ) : void
RemoveDataDivElement ( XmlNode dom, string key ) : void
SetBookTitle ( BookStorage storage, BookData bookData, bool usingTemplate ) : void
SetLineageAndId ( BookStorage storage, string sourceFolderPath ) : void
SetupNewDocumentContents ( string sourceFolderPath, string initialPath ) : string
UpdateEditabilityMetadata ( BookStorage storage ) : void

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

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

public BookStarter ( IChangeableFileLocator fileLocator, BookStorage bookStorageFactory, CollectionSettings collectionSettings ) : System
fileLocator IChangeableFileLocator
bookStorageFactory BookStorage
collectionSettings Bloom.Collection.CollectionSettings
Результат System

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

Given a template, make a new book
public CreateBookOnDiskFromTemplate ( string sourceBookFolder, string parentCollectionPath ) : string
sourceBookFolder string
parentCollectionPath string
Результат string

SetLanguageForElementsWithMetaLanguage() публичный статический Метод

In xmatter, text fields are normally labeled with a "meta" language code, like "N1" for first national language. This method detects those and then looks them up, returning the actual language code in use at the moment.
This is a little uncomfortable in this class, as this feature is not currently used in any bloom-translationGroup elements.
public static SetLanguageForElementsWithMetaLanguage ( XmlNode elementOrDom, CollectionSettings settings ) : void
elementOrDom System.Xml.XmlNode
settings Bloom.Collection.CollectionSettings
Результат void

SetupIdAndLineage() публичный статический Метод

public static SetupIdAndLineage ( XmlElement parentPageDiv, XmlElement childPageDiv ) : void
parentPageDiv System.Xml.XmlElement
childPageDiv System.Xml.XmlElement
Результат void

SetupPage() публичный статический Метод

public static SetupPage ( XmlElement pageDiv, CollectionSettings collectionSettings, string contentLanguageIso1, string contentLanguageIso2 ) : void
pageDiv System.Xml.XmlElement
collectionSettings Bloom.Collection.CollectionSettings
contentLanguageIso1 string
contentLanguageIso2 string
Результат void

Описание свойств

OnNextRunSimulateFailureMakingBook публичное свойство

Used in unit testing
public bool OnNextRunSimulateFailureMakingBook
Результат bool