Object
ReportImporter
All Implemented Interfaces:
ArtifactImporter<ReportManifestEntry>

@Service public class ReportImporter extends Object implements ArtifactImporter<ReportManifestEntry>
  • Constructor Details

  • Method Details

    • getArtifactType

      public String getArtifactType()
      Description copied from interface: ArtifactImporter
      Returns the artifact type name this importer handles (e.g. "panels", "scripts"). Used for logging and result tracking.
      Specified by:
      getArtifactType in interface ArtifactImporter<ReportManifestEntry>
    • getOrder

      public int getOrder()
      Description copied from interface: ArtifactImporter
      Returns the execution order. Lower values run first. This ensures dependencies are imported before dependents (e.g. groups before permissions, queries before reports).
      Specified by:
      getOrder in interface ArtifactImporter<ReportManifestEntry>
    • getEntries

      public List<ReportManifestEntry> getEntries(GitManifest manifest)
      Description copied from interface: ArtifactImporter
      Extracts the typed entry list from the manifest.
      Specified by:
      getEntries in interface ArtifactImporter<ReportManifestEntry>
      Parameters:
      manifest - the parsed manifest
      Returns:
      list of entries to import, may be empty
    • importEntry

      public ArtifactImportResult importEntry(ReportManifestEntry entry, FileResolver resolver, String user)
      Description copied from interface: ArtifactImporter
      Imports a single entry. Handles create-or-update semantics: looks up by key/sigla, creates if missing, updates if exists.
      Specified by:
      importEntry in interface ArtifactImporter<ReportManifestEntry>
      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

      public void deleteOrphan(String key, String user)
      Description copied from interface: ArtifactImporter
      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.
      Specified by:
      deleteOrphan in interface ArtifactImporter<ReportManifestEntry>
      Parameters:
      key - the artifact key (sigla) to delete
      user - the login of the user performing the sync