Interface ArtifactImporter<T>

Type Parameters:
T - the manifest entry type this importer handles
All Known Implementing Classes:
EndpointImporter, GroupImporter, LibraryImporter, MenuImporter, PanelImporter, PatchImporter, PermissionImporter, ProcessImporter, PropertyImporter, QueryImporter, ReportImporter, ScriptImporter

public interface ArtifactImporter<T>
Strategy interface for importing a specific artifact type from a Git manifest. Each artifact type (panels, scripts, processes, etc.) has its own implementation.
  • Method Details

    • getArtifactType

      String getArtifactType()
      Returns the artifact type name this importer handles (e.g. "panels", "scripts"). Used for logging and result tracking.
    • getOrder

      int getOrder()
      Returns the execution order. Lower values run first. This ensures dependencies are imported before dependents (e.g. groups before permissions, queries before reports).
    • getEntries

      List<T> getEntries(GitManifest manifest)
      Extracts the typed entry list from the manifest.
      Parameters:
      manifest - the parsed manifest
      Returns:
      list of entries to import, may be empty
    • importEntry

      ArtifactImportResult importEntry(T entry, FileResolver resolver, String user)
      Imports a single entry. Handles create-or-update semantics: looks up by key/sigla, creates if missing, updates if exists.
      Parameters:
      entry - the manifest entry to import
      resolver - resolves relative file paths to input streams
      user - the login of the user performing the import
      Returns:
      result indicating what happened (CREATED, UPDATED, SKIPPED, ERROR)
    • deleteOrphan

      default void deleteOrphan(String key, String user)
      Deletes the artifact identified by the given key, if it exists. Called when a key that was previously tracked is no longer present in the manifest. Implementations that cannot safely delete (e.g. require additional context or have active dependencies) should leave this as a no-op.
      Parameters:
      key - the artifact key (sigla) to delete
      user - the login of the user performing the sync