public class CachingInstanceTemplateManager extends Object implements InstanceTemplateManager
| Constructor and Description |
|---|
CachingInstanceTemplateManager() |
CachingInstanceTemplateManager(boolean restrictFormTypes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormType(int formID)
Set a form type as allowed for caching.
|
void |
clearCache()
Remove all model templates from the cache.
|
FormInstance |
getTemplateInstance(int formID)
Return the template model for the given form type.
|
void |
resetFormTypes()
Empty the list of allowed form types
|
public CachingInstanceTemplateManager()
public CachingInstanceTemplateManager(boolean restrictFormTypes)
restrictFormTypes - if true, only allowed form types will be cached; any requests for the templates
for other form types will throw an error; the list of allowed types starts out empty; register allowed
form types with addFormType(). if false, all form types will be handled and cachedpublic void clearCache()
public void addFormType(int formID)
formID - public void resetFormTypes()
public FormInstance getTemplateInstance(int formID)
getTemplateInstance in interface InstanceTemplateManagerCopyright © 2022. All rights reserved.