abstract classes.domain~NE_Domain_Integration(a, b, deps, id, …opts)

Represents a specific integration that can be applied and mounted onto domains.

new abstract NE_Domain_Integration(a, b, deps, id, …opts)

Creates an instance of an NE_Domain_Integration. Non-abstract subclasses must provide a constructor accepting (deps, id, ...opts...) and call super, unshifted by 2 arguments (a and b) for interface resolving. __defer_init__ is added so that dependencies can be loaded before any possible usage within the integration. Integrations must implement `_mount_domain` and `get_domain_integration_data` methods. The class must have a static method `mount_domain`.
Parameters:
Name Type Attributes Description
a * Instance methods this integration/interface must have in addition to those up the prototype change.
b * Static methods this integration/interface must have in addition to those up the prototype change.
deps Object The dependencies object, called by interfaces.DepsCreatable.create
id string The ID of this NE_Domain_Integration
opts * <repeatable>
Any other options this NE_Domain_Integration may take in its initializer.
Implements:

Methods

static mount_domain(domain, integrations_to_mount, safety) → {classes.domain.NE_Domain_Integration}

Given a domain, should setup the domain to attach all integrations within integrations_to_mount. Called within the
Parameters:
Name Type Default Description
domain classes.domain.NE_Domain The domain to mount this integration to.
integrations_to_mount Array.<(classes.domain.NE_Domain_Integration|string)> The integrations to mount to the domain. Given as an interable of strings as domain names or NE_Domain_Integrations, or key => value where value is of such a type.
safety boolean false Whether to run safety checks, including type resolution and/or domain property pollution.
To Do:
  • Decide whether to create the integration if it does not already exist and can be safely created (difficult), or defer these domains' integration mounting until the integration is created (better).

__defer_init__(id, opts) → {classes.domain.NE_Domain_Integration}

Default initializer for a NE Domain Integration
Parameters:
Name Type Description
id string The ID of this integration
opts Object Options for this NE_Domain_Integration
Properties
Name Type Description
name string | AliasedName The name of this integration

abstract _mount_domain(domain, safety) → {classes.domain.NE_Domain_Integration}

Given a domain, should setup itself to be catch certain events of or define certain properties on the domain object in a non- obtrusive manner.
Parameters:
Name Type Default Description
domain classes.domain.NE_Domain The domain to mount this integration to.
safety boolean true Whether to run safety checks, including type resolution and/or domain property pollution.

package, inner DefaultExports(deps) → {classes.domain.NE_Domain_Integration}

Generates a NE_Domain_Integration class. Called internally within the domain sub-folder assembly. The NE_Domain_Integration class gets assigned to the NE_Domain object and will be inherited down that chain for later accessibility. (There is no need to worry about circular dependencies' memory consumption because these objects will essentially be kept global and need to be frequently accessed anyway. The NE_Domain_Integration class will handle registration of applicable integrations on domains via mount().
Parameters:
Name Type Description
deps Object Dependencies of the NE_Domain_Integration
Properties
Name Type Description
IDHierarchicalCreatable interfaces.IDHierarchicalCreatable The interface NE_Domain_Integration extends from.
NE_Domain classes.domain.NE_Domain Used as an internal safety check by the default NE_Domain_Integration#_mount_domain
AliasedName classes.common.AliasedName.AliasedName Used by the default #__init__ to create a name for the integration.
Returns:
classes.domain.NE_Domain_Integration - The NE_Domain_Integration class