Package helma.framework.core
Class TypeManager
java.lang.Object
helma.framework.core.TypeManager
The type manager periodically checks the prototype definitions for its
applications and updates the evaluators if anything has changed.
-
Constructor Summary
ConstructorsConstructorDescriptionTypeManager
(Application app, String ignore) Creates a new TypeManager object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Run through application's prototype directories and check if anything has been updated.protected void
checkRepository
(Repository repository, boolean update) createPrototype
(String typename, Repository repository, Map typeProps) Create and register a new Prototype.void
Run through application's prototype directories and create prototypes, but don't compile or evaluate any scripts.Return the class loader used by this application.long
Returns the last time any resource in this app was modified.getPrototype
(String typename) Get a prototype defined for this applicationReturn 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.
-
Constructor Details
-
TypeManager
Creates a new TypeManager object.- Parameters:
app
- ...- Throws:
RuntimeException
- ...
-
-
Method Details
-
createPrototypes
Run through application's prototype directories and create prototypes, but don't compile or evaluate any scripts.- Throws:
IOException
-
checkPrototypes
Run through application's prototype directories and check if anything has been updated. If so, update prototypes and scripts.- Throws:
IOException
-
checkRepository
- 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
Return the class loader used by this application.- Returns:
- the ClassLoader
-
getPrototypes
Return a collection containing the prototypes defined for this type manager.- Returns:
- a collection containing the prototypes
-
getPrototype
Get a prototype defined for this application -
createPrototype
Create and register a new Prototype.- Parameters:
typename
- the name of the prototyperepository
- the first prototype sourcetypeProps
- custom type mapping properties- Returns:
- the newly created prototype
-