Package helma.framework.core

# 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 Summary

Constructors
Constructor
Description
`TypeManager(Application app, String ignore)`
Creates a new TypeManager object.

## Method Summary

Modifier and Type
Method
Description
`void`
`checkPrototypes()`
Run through application's prototype directories and check if anything has been updated.
`protected void`
`checkRepository(Repository repository, boolean update)`
`Prototype`
`createPrototype(String typename, Repository repository, Map typeProps)`
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.
`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(String typename)`
Get a prototype defined for this application
`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 Details

### TypeManager

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

Parameters:
  `app` - ...
Throws:
  `RuntimeException` - ...

## 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