public abstract class AbstractModelLoader extends Object
Constructor and Description |
---|
AbstractModelLoader(String[] extensions)
Create a model loader.
|
AbstractModelLoader(String[] extensions,
int cachesize)
Create a model loader.
|
Modifier and Type | Method and Description |
---|---|
void |
clearModelCache()
Clears the model cache.
|
void |
deregisterModel(Object key)
Deregister a model.
|
ICacheableModel |
loadModel(String name,
String[] imports,
ClassLoader classloader,
Object context)
Load a model.
|
ICacheableModel |
loadModel(String name,
String extension,
String[] imports,
ClassLoader classloader,
Object context)
Load a model with a required extension.
|
void |
registerModel(Object key,
ICacheableModel model)
Register a model.
|
public AbstractModelLoader(String[] extensions)
extensions
- The supported file extensions by order of importance.public AbstractModelLoader(String[] extensions, int cachesize)
extensions
- The supported file extensions by order of importance.public ICacheableModel loadModel(String name, String[] imports, ClassLoader classloader, Object context) throws Exception
name
- The name of the model (file name or logical name).imports
- The imports to use when resolving logical names.Exception
public ICacheableModel loadModel(String name, String extension, String[] imports, ClassLoader classloader, Object context) throws Exception
name
- The name of the model (file name or logical name).extension
- The specific extension to look for.imports
- The imports to use when resolving logical names.Exception
public void registerModel(Object key, ICacheableModel model)
public void deregisterModel(Object key)
public void clearModelCache()
Copyright © 2012. All Rights Reserved.