ch.tatool.app.setup
Class DefaultModuleCreatorRegistry

java.lang.Object
  extended by ch.tatool.app.setup.DefaultModuleCreatorRegistry
All Implemented Interfaces:
ModuleCreatorRegistry

public class DefaultModuleCreatorRegistry
extends Object
implements ModuleCreatorRegistry

Default registry implementation. Objects can either be defined by adding them to the registry directly or by using a registry registration bean. Please note that creators need to be unique in their id, otherwise they overwrite each other!

Author:
Michael Ruflin

Constructor Summary
DefaultModuleCreatorRegistry()
           
 
Method Summary
 void addCreator(ModuleCreator creator)
          Add a creator to the registry.
 void addCreators(List<ModuleCreator> creators)
          Add a list of creators.
 ModuleCreator getCreatorById(String id)
          Get a creator given its id.
 List<ModuleCreator> getCreators()
          Get the list of creators.
 void removeAll()
          Remove all registered creators from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModuleCreatorRegistry

public DefaultModuleCreatorRegistry()
Method Detail

getCreators

public List<ModuleCreator> getCreators()
Get the list of creators.

Specified by:
getCreators in interface ModuleCreatorRegistry

getCreatorById

public ModuleCreator getCreatorById(String id)
Get a creator given its id.

Specified by:
getCreatorById in interface ModuleCreatorRegistry
Parameters:
id - the id of the creator
Returns:
the ModuleCreator if available or null if not found

addCreators

public void addCreators(List<ModuleCreator> creators)
Add a list of creators.

Specified by:
addCreators in interface ModuleCreatorRegistry
Parameters:
creators - the creators to add

addCreator

public void addCreator(ModuleCreator creator)
Add a creator to the registry.

Specified by:
addCreator in interface ModuleCreatorRegistry
Parameters:
creator - the creator to add

removeAll

public void removeAll()
Remove all registered creators from the registry.

Specified by:
removeAll in interface ModuleCreatorRegistry


Copyright © 2012. All Rights Reserved.