|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtl.engine.service.MTLDynamicTemplatesRegistry
public final class MTLDynamicTemplatesRegistry
This will allow MTL to dynamically resolve templates overrides within the modules registered by this registry.
Take note that all modules will be loaded in the registry's resource set if loaded from the registry
through addModulesFrom(File).
| Field Summary | |
|---|---|
static MTLDynamicTemplatesRegistry |
INSTANCE
Singleton instance of the registry. |
| Method Summary | |
|---|---|
boolean |
addModule(Module module)
Adds a module to the registry. |
boolean |
addModules(java.util.Collection<Module> modules)
Adds a set of module to the registry. |
void |
addModulesFrom(java.io.File file)
This will register all modules that can be retrieved from file. |
void |
clearRegistry()
Clears all registered modules out of the registry. |
void |
clearRegistryResourceSet()
This can be used to clear the registry's resource set from manually loaded Modules. |
java.util.Set<Module> |
getRegisteredModules()
Returns all registered modules. |
boolean |
removeModule(Module module)
Removes a module from the registry. |
boolean |
removeModules(java.util.Collection<Module> modules)
Removes a set of modules from the registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final MTLDynamicTemplatesRegistry INSTANCE
| Method Detail |
|---|
public boolean addModule(Module module)
module - Module that is to be registered for dynamic template resolution.
true if the set didn't already contain module.public boolean addModules(java.util.Collection<Module> modules)
modules - Modules that are to be registered for dynamic template resolution.
true if the set didn't already contain one of the modules contained by
modules.public void addModulesFrom(java.io.File file)
file.
That is, if file is a directory, this will iterate over all its direct and indirect
children (except for "CVS" and ".svn" named sub-directories), then load and
register all child representing a module. Otherwise, if file itself represents a module,
it will be loaded and registered.
If file is neither a module nor a directory, this will have no effect.
file - The module to register or directory to iterate over for modules.public java.util.Set<Module> getRegisteredModules()
public boolean removeModule(Module module)
module - Module that is to be removed from dynamic template resolution.
true if the set contained module.public boolean removeModules(java.util.Collection<Module> modules)
modules - Modules that are to be removed from dynamic template resolution.
true if the set has been changed.public void clearRegistry()
public void clearRegistryResourceSet()
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||