Class GshTemplateCompileStatus

java.lang.Object
edu.internet2.middleware.grouper.app.gsh.template.GshTemplateCompileStatus

public class GshTemplateCompileStatus extends Object
Per-JVM compile-status cache for compiled-Java GSH templates, backing the GSH template inventory list (whether each compiled template compiles against the running Grouper). Compiling is the expensive part, so the status is computed once per (config id, source hash) and reused until the source changes — the same source-hash invalidation the runtime registry uses. This is read-only validation: it does not define classes or affect the runtime per-template classloader registry. GRP-7034
  • Method Details

    • statusForSource

      public static GshTemplateCompileStatus.GshTemplateCompileStatusResult statusForSource(String configId, String javaSource)
      Compile-status for a compiled template's source, cached per (configId, sourceHash). Recompiles only when the source changes.
      Parameters:
      configId - template config id (cache key); must be non-empty
      javaSource - the Java source the caller read from inline config or a container file; treated as empty when null
      Returns:
      the cached or freshly-computed status
    • clearCache

      public static void clearCache()
      Clear the cache (hooked into cache-clear; tests use it between cases).