Package com.inductiveautomation.ignition.gateway.importexport
@NullMarked
package com.inductiveautomation.ignition.gateway.importexport
Gateway Import/Export
Public APIs for module authors to participate in the gateway import/export system (
.gwex files). Users can selectively export and import gateway configuration resources and
projects without a gateway restart.
Two Participation Models
ImportExportDelegate— Controls per-resource-type behavior. Registered onResourceTypeMetaviagetImportExportDelegate(). Most resource types useDefaultImportExportDelegateautomatically with zero changes.ImportExportContributor— Standalone content not tied to any resource type (e.g.,user-lib/pylib, tags). Supports optional sub-item selection. Registered withImportExportManager.registerContributor()during startup. Resource types can opt out of the delegate path and use a contributor for fully custom export/import behavior.
ImportExportManager orchestrates
both — delegates are called per resource type, contributors are called per additional content ID.
Key Types
ImportExportDelegate— Per-resource-type export/import behavior (batches).DefaultImportExportDelegate— Default: standard resource file copy + pass-through.ImportExportContributor— Standalone content with optional sub-item tree.ImportExportManager— Registration point for contributors.ResourceWriter— Delegate write access (resource files +content/data).ResourceReader— Delegate read access (resource files +content/data).ContentWriter— Contributor write access (contributed/{id}/).ContentReader— Contributor read access (contributed/{id}/).ImportContext— Source gateway metadata for version-specific handling.
Delegate Options
- Default — Don't override
getImportExportDelegate().DefaultImportExportDelegateis used automatically. - Extend — Extend
DefaultImportExportDelegate, callsuper, add custom data. - Replace — Implement
ImportExportDelegatefor fully custom logic. - Exclude — Return
nullfromgetImportExportDelegate().
Usage Examples
Custom delegate:
ResourceTypeMeta.newBuilder(MyConfig.class)
.resourceType(MY_RESOURCE_TYPE)
.categoryNameKey("Resources.MyResource")
.withImportExportDelegate(new MyCustomDelegate())
.build();
Contributor:
public void setup(GatewayContext context) {
context.getImportExportManager()
.registerContributor(new MyCustomContentContributor());
}
- See Also:
-
ClassDescriptionDefault implementation of
ImportExportDelegatethat provides standard import/export behavior for resource types:Provides metadata about the source gateway from a.gwexfile'sexportinfo.json.Contributes standalone content (not tied to a specific resource type) to the gateway import/export system.Reads content data from the.gwexZIP for this contributor.Writes content data to the.gwexZIP for this contributor.A selectable sub-item within a contributor.Delegate that controls how a resource type participates in the gateway import/export system (.gwexfiles).A resource entry bundling the resource, its decoded configuration, and the collection it belongs to (or is being imported into).Pairs aResourcePathwith the collection it was found in within the.gwexZIP.Module-author SPI for the gateway import/export system (.gwexfiles), reachable viaGatewayContext.getImportExportManager().Describes the contents of a parsed.gwexfile as it would apply to the receiving gateway.A group of config resources sharing aResourceType.A contributor entry present in the.gwex.Project conflict reasons.A project present in the.gwex.Config resource conflict reasons.A single config resource entry from the archive.Thrown when an uploaded.gwexcannot be parsed because itsexportinfo.jsonis missing, malformed, or has null required fields.Provides read access to a.gwexZIP file during import.Provides write access to a.gwexZIP file during export.