helma.framework.core
Class TypeManager

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

public final class TypeManager
extends java.lang.Object

The type manager periodically checks the prototype definitions for its applications and updates the evaluators if anything has changed.


Constructor Summary
TypeManager(Application app, java.lang.String ignore)
          Creates a new TypeManager object.
 
Method Summary
 void checkPrototypes()
          Run through application's prototype directories and check if anything has been updated.
protected  void checkRepository(Repository repository, boolean update)
           
 Prototype createPrototype(java.lang.String typename, Repository repository)
          Create and register a new Prototype.
 void createPrototypes()
          Run through application's prototype directories and create prototypes, but don't compile or evaluate any scripts.
 java.lang.ClassLoader getClassLoader()
          Return the class loader used by this application.
 long getLastCodeUpdate()
          Returns the last time any resource in this app was modified.
 Prototype getPrototype(java.lang.String typename)
          Get a prototype defined for this application
 java.util.Collection getPrototypes()
          Return a collection containing the prototypes defined for this type manager.
 void setLastCodeUpdate(long update)
          Set the last time any resource in this app was modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeManager

public TypeManager(Application app,
                   java.lang.String ignore)
Creates a new TypeManager object.

Parameters:
app - ...
Throws:
java.lang.RuntimeException - ...
Method Detail

createPrototypes

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

Throws:
java.io.IOException

checkPrototypes

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

Throws:
java.io.IOException

checkRepository

protected void checkRepository(Repository repository,
                               boolean update)
                        throws java.io.IOException
Throws:
java.io.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 java.lang.ClassLoader getClassLoader()
Return the class loader used by this application.

Returns:
the ClassLoader

getPrototypes

public java.util.Collection getPrototypes()
Return a collection containing the prototypes defined for this type manager.

Returns:
a collection containing the prototypes

getPrototype

public Prototype getPrototype(java.lang.String typename)
Get a prototype defined for this application


createPrototype

public Prototype createPrototype(java.lang.String typename,
                                 Repository repository)
Create and register a new Prototype.

Parameters:
typename - the name of the prototype
repository - the first prototype source
Returns:
the newly created prototype


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.