Class ModuleUtils

java.lang.Object
org.jpos.q2.install.ModuleUtils

public class ModuleUtils extends Object
Helpers that enumerate jPOS module metadata embedded under META-INF/modules/ on the runtime classpath.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor; no instance state to initialise.
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<String>
    Enumerates every classpath resource located under prefix, traversing both directory- and JAR-based class-loader entries.
    static List<String>
    Returns the sorted list of module UUIDs discovered under META-INF/modules/uuids/.
    static List<String>
    Returns the sorted list of revocation-key identifiers discovered under META-INF/modules/rkeys/.
    static String
    Returns the Base64-encoded SHA-256 hash of the concatenated module UUIDs, used as a per-installation fingerprint by license verification.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleUtils

      public ModuleUtils()
      Default constructor; no instance state to initialise.
  • Method Details

    • getModuleEntries

      public static List<String> getModuleEntries(String prefix) throws IOException
      Enumerates every classpath resource located under prefix, traversing both directory- and JAR-based class-loader entries.
      Parameters:
      prefix - classpath prefix to scan (e.g. "META-INF/modules/uuids/")
      Returns:
      resource paths relative to the classpath root
      Throws:
      IOException - if classpath enumeration fails
    • getModulesUUIDs

      public static List<String> getModulesUUIDs() throws IOException
      Returns the sorted list of module UUIDs discovered under META-INF/modules/uuids/.
      Returns:
      module UUIDs (one per registered module)
      Throws:
      IOException - if classpath enumeration fails
    • getRKeys

      public static List<String> getRKeys() throws IOException
      Returns the sorted list of revocation-key identifiers discovered under META-INF/modules/rkeys/.
      Returns:
      revocation key identifiers
      Throws:
      IOException - if classpath enumeration fails
    • getSystemHash

      Returns the Base64-encoded SHA-256 hash of the concatenated module UUIDs, used as a per-installation fingerprint by license verification.
      Returns:
      Base64 SHA-256 hash, or empty string when no UUIDs are registered
      Throws:
      IOException - if classpath enumeration fails
      NoSuchAlgorithmException - if SHA-256 is unavailable