Skip to main content

Class: DocumentGroup

Defined in: documentGroup.d.ts:10

Container for multiple Document instances. It can also contain multiple AdditionalFile objects that generates additional files beside the documents.

Constructors

Constructor

new DocumentGroup(path): DocumentGroup;

Defined in: documentGroup.d.ts:11

Parameters

ParameterType
pathstring

Returns

DocumentGroup

Properties

PropertyTypeDescriptionDefined in
additionalFilesAdditionalFile[]Additional files in this group. Don't modify this array directly. Use DocumentGroup.addAdditionalFile instead.documentGroup.d.ts:23
applyProvisioner?ProvisionerThe provisioner that applies the documents in this group.documentGroup.d.ts:26
documentsDocument[]Documents in this group. Don't modify this array directly. Use DocumentGroup.addDocument and DocumentGroup.removeDocument instead.documentGroup.d.ts:20
pathstringThe path of the document group.documentGroup.d.ts:14
waitProvisioner?ProvisionerThe provisioner that waits for the documents in this group to be ready.documentGroup.d.ts:29

Methods

addAdditionalFile()

addAdditionalFile(additionalFile): void;

Defined in: documentGroup.d.ts:38

Adds the given additional file to this group.

Parameters

ParameterType
additionalFileAdditionalFile

Returns

void


addDocument()

addDocument(document): void;

Defined in: documentGroup.d.ts:32

Adds the given document to this group and sets its group field to this group.

Parameters

ParameterType
documentDocument

Returns

void


addDocuments()

addDocuments(documents): void;

Defined in: documentGroup.d.ts:35

Adds the given documents to this group and sets their group field to this group.

Parameters

ParameterType
documentsDocument[]

Returns

void


getComponent()

getComponent(): Component;

Defined in: documentGroup.d.ts:44

Returns the component that created this document group. Component is set when the document group is added to the builder context.

Returns

Component


getDocument()

Call Signature

getDocument(path): Document;

Defined in: documentGroup.d.ts:47

Returns the first document that has the given path.

Parameters
ParameterType
pathstring
Returns

Document

Call Signature

getDocument(filter): Document;

Defined in: documentGroup.d.ts:50

Returns the first document that satisfies the given predicate.

Parameters
ParameterType
filter(document) => boolean
Returns

Document


moveTo()

moveTo(group): void;

Defined in: documentGroup.d.ts:56

Removes all documents and additional files from this group and adds them to the given group.

Parameters

ParameterType
groupDocumentGroup

Returns

void


provisionAfter()

provisionAfter(other): void;

Defined in: documentGroup.d.ts:65

Provisions the documents in this group after the documents in the given group.

Parameters

ParameterType
otherDocumentGroup

Returns

void


provisionBefore()

provisionBefore(other): void;

Defined in: documentGroup.d.ts:68

Provisions the documents in this group before the documents in the given group.

Parameters

ParameterType
otherDocumentGroup

Returns

void


removeAdditionalFile()

removeAdditionalFile(additionalFile): void;

Defined in: documentGroup.d.ts:62

Removes the given additional file from this group.

Parameters

ParameterType
additionalFileAdditionalFile

Returns

void


removeDocument()

removeDocument(document): void;

Defined in: documentGroup.d.ts:59

Removes the given document from this group and sets its group field to null.

Parameters

ParameterType
documentDocument

Returns

void


sortedDocuments()

sortedDocuments(): Document[];

Defined in: documentGroup.d.ts:53

Returns the documents in this group sorted by their path.

Returns

Document[]