|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.framework.ComponentRepository
public class ComponentRepository
This (singleton) class maintains all Components which are registered in the current MMBase.
Components can be configured by placing their configuration in 'config/components/'.
| Nested Class Summary | |
|---|---|
static class |
ComponentRepository.Ready
|
| Field Summary | |
|---|---|
static String |
NAMESPACE_BLOCKTYPES
|
static String |
NAMESPACE_COMPONENT
|
(package private) static ComponentRepository |
repository
|
static String |
XSD_BLOCKTYPES
|
static String |
XSD_COMPONENT
|
| Method Summary | |
|---|---|
protected void |
clear()
|
Block |
getBlock(String componentName,
String blockName)
Returns a certain block for a certain component. |
Block.Type[] |
getBlockClassification(String id)
Converts a comma seperated list of blocks to an array of Block.Types. |
Component |
getComponent(String name)
Acquires the component with given name, or null if no such component. |
protected Component |
getComponent(String name,
Document doc)
Given an XML, creates and configures one component. |
Collection<Component> |
getComponents()
The available components. |
Block |
getDefaultBlock(String componentName)
Returns a default block for a certain component. |
Collection<Component> |
getFailedComponents()
The components which could not be instantiated or configured, due to some misconfiguration. |
static ComponentRepository |
getInstance()
Returns the (ready configured) instance of the repository |
protected boolean |
isConfigured()
|
protected void |
readConfiguration(String child)
Reads all component xmls |
protected boolean |
resolve()
Tries to resolve unsatisified dependencies, in all components, by calling Component.resolve(VirtualComponent, Component) on all Component.getUnsatisfiedDependencies() of all components. |
void |
shutdown()
|
Map<String,Component> |
toMap()
An (unmodifiable) map representing the complete repository |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XSD_COMPONENT
public static final String NAMESPACE_COMPONENT
public static final String XSD_BLOCKTYPES
public static final String NAMESPACE_BLOCKTYPES
static final ComponentRepository repository
| Method Detail |
|---|
public static ComponentRepository getInstance()
public Block.Type[] getBlockClassification(String id)
Block.Types. Possible
'weights' per block are ignored.
public Collection<Component> getComponents()
public Collection<Component> getFailedComponents()
public Map<String,Component> toMap()
public Component getComponent(String name)
null if no such component.
public Block getBlock(String componentName,
String blockName)
getComponent(String).Component.getBlock(String).
null if given component has no such block.
IllegalArgumentException - if no component with given name.public Block getDefaultBlock(String componentName)
getComponent(String).Component.getDefaultBlock().
IllegalArgumentException - if no component with given name.protected boolean resolve()
Component.resolve(VirtualComponent, Component) on all Component.getUnsatisfiedDependencies() of all components.
true if no unsatisfied dependencies remain.public void shutdown()
protected void clear()
protected boolean isConfigured()
protected void readConfiguration(String child)
protected Component getComponent(String name,
Document doc)
throws SAXException,
ClassNotFoundException,
NoSuchMethodException,
InstantiationException,
IllegalAccessException,
InvocationTargetException
SAXException
ClassNotFoundException
NoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||