The compendium metadata which defines the compendium content and location
A subsidiary collection which contains the more minimal index of the pack
An Array of application references which will be automatically updated when the collection content changes
Record the set of document ids where the Document was not initialized because of invalid source data
Track which document fields have been indexed for this compendium pack
The amount of time that Document instances within this CompendiumCollection are held in memory. Accessing the contents of the Compendium pack extends the duration of this lifetime.
The named game setting which contains Compendium configurations.
The base Document type which is contained within this DocumentCollection
The canonical Compendium name - comprised of the originating package and the pack name
Access the compendium configuration data for this pack
Track whether the Compendium Collection is locked for editing
Whether the compendium is currently open in the UI.
Track whether the Compendium Collection is private
A convenience reference to the label which should be used as the title for the Compendium pack.
The index fields which should be loaded for this compendium pack
Has this compendium pack been fully indexed?
A reference to the Document class definition which is contained within this DocumentCollection.
The Collection class name
Load the Compendium index and cache it as the keys and values of the Collection.
Options which customize how the index is created
Get a single Document from this Compendium by ID. The document may already be locally cached, otherwise it is retrieved from the server.
The requested Document id
The retrieved Document instance
Load multiple documents from the Compendium pack using a provided query object.
A database query used to retrieve documents from the underlying database
The retrieved Document instances
Import a Document into this Compendium Collection.
The existing Document you wish to import
The imported Document instance
Fully import the contents of a Compendium pack into a World folder.
Options which modify the import operation. Additional options are forwarded to {@link WorldCollection#fromCompendium} and Document.createDocuments
The imported Documents, now existing within the World
Provide a dialog form that prompts the user to import the full contents of a Compendium pack into the World.
A promise which resolves in the following ways: an array of imported Documents if the "yes" button was pressed, false if the "no" button was pressed, or null if the dialog was closed without making a choice.
Add a Document to the index, capturing its relevant index attributes
The document to index
Assign configuration metadata settings to the compendium pack
The object of compendium settings to define
A Promise which resolves once the setting is updated
Delete an existing world-level Compendium Collection. This action may only be performed for world-level packs by a Gamemaster User.
Duplicate a compendium pack to the current World.
A new Compendium label
Migrate a compendium pack. This operation re-saves all documents within the compendium pack to disk, applying the current data model. If the document type has system data, the latest system data template will also be applied to all documents.
Update all objects in this DocumentCollection with a provided transformation. Conditionally filter to only apply to Entities which match a certain condition.
An object of data or function to apply to all matched objects
A function which tests whether to target each object
An array of updated data once the operation is complete
Follow-up actions taken after a set of Documents in this Collection are created.
An Array of created Documents
An Array of created data objects
Options which modified the creation operation
The ID of the User who triggered the operation
Follow-up actions taken after a set of Documents in this Collection are updated.
An Array of updated Documents
An Array of incremental data objects
Options which modified the update operation
The ID of the User who triggered the operation
Follow-up actions taken after a set of Documents in this Collection are deleted.
An Array of deleted Documents
An Array of document IDs being deleted
Options which modified the deletion operation
The ID of the User who triggered the operation
Obtain a temporary Document instance for a document id which currently has invalid source data.
A document ID with invalid source data.
An in-memory instance for the invalid Document
Render any Applications associated with this DocumentCollection.
Preliminary actions taken before a set of Documents in this Collection are created.
An Array of created data objects
Options which modified the creation operation
The ID of the User who triggered the operation
Preliminary actions taken before a set of Documents in this Collection are updated.
An Array of incremental data objects
Options which modified the update operation
The ID of the User who triggered the operation
Preliminary actions taken before a set of Documents in this Collection are deleted.
An Array of document IDs being deleted
Options which modified the deletion operation
The ID of the User who triggered the operation
Validate that the current user is able to modify content of this Compendium pack
Follow-up actions taken when Documents within this Compendium pack are modified
Create a new Compendium Collection using provided metadata.
The compendium metadata used to create the new pack
Additional options which modify the Compendium creation request
A collection of Document objects contained within a specific compendium pack. Each Compendium pack has its own associated instance of the CompendiumCollection class which contains its contents.
{Game#packs}
The compendium metadata, an object provided by game.data