Class ContextFactory

java.lang.Object
com.mirth.connect.server.userutil.ContextFactory

public class ContextFactory extends Object
Allows the user to retrieve information about the current JavaScript context.
  • Constructor Details

    • ContextFactory

      public ContextFactory(com.mirth.connect.server.util.javascript.MirthContextFactory delegate)
      Instantiates a new ContextFactory object.
      Parameters:
      delegate - The underlying ContextFactory this class will delegate to.
  • Method Details

    • getResourceIds

      public Set<String> getResourceIds()
      Returns the set of custom resource IDs that the current JavaScript context is using. If no custom libraries are being used in the current JavaScript context, this will return an empty set.
      Returns:
      The set of custom resource IDs that the current JavaScript context is using.
    • getClassLoader

      public ClassLoader getClassLoader()
      Returns the application classloader that the current JavaScript context is using.
      Returns:
      The application classloader that the current JavaScript context is using.
    • getIsolatedClassLoader

      public ClassLoader getIsolatedClassLoader()
      Returns a classloader containing only the libraries contained in the custom resources, with no parent classloader. If no custom libraries are being used in the current JavaScript context, this will return null.
      Returns:
      A classloader containing only the libraries contained in the custom resources, with no parent classloader.