Class TypeManager

java.lang.Object
helma.framework.core.TypeManager

public final class TypeManager extends Object
The type manager periodically checks the prototype definitions for its applications and updates the evaluators if anything has changed.
  • Constructor Details

  • Method Details

    • createPrototypes

      public void createPrototypes() throws IOException
      Run through application's prototype directories and create prototypes, but don't compile or evaluate any scripts.
      Throws:
      IOException
    • checkPrototypes

      public void checkPrototypes() throws IOException
      Run through application's prototype directories and check if anything has been updated. If so, update prototypes and scripts.
      Throws:
      IOException
    • checkRepository

      protected void checkRepository(Repository repository, boolean update) throws IOException
      Throws:
      IOException
    • getLastCodeUpdate

      public long getLastCodeUpdate()
      Returns the last time any resource in this app was modified. This can be used to find out quickly if any file has changed.
    • setLastCodeUpdate

      public void setLastCodeUpdate(long update)
      Set the last time any resource in this app was modified.
    • getClassLoader

      public ClassLoader getClassLoader()
      Return the class loader used by this application.
      Returns:
      the ClassLoader
    • getPrototypes

      public Collection getPrototypes()
      Return a collection containing the prototypes defined for this type manager.
      Returns:
      a collection containing the prototypes
    • getPrototype

      public Prototype getPrototype(String typename)
      Get a prototype defined for this application
    • createPrototype

      public Prototype createPrototype(String typename, Repository repository, Map typeProps)
      Create and register a new Prototype.
      Parameters:
      typename - the name of the prototype
      repository - the first prototype source
      typeProps - custom type mapping properties
      Returns:
      the newly created prototype