public class BasicComponent extends Object implements Component
| Modifier and Type | Field and Description |
|---|---|
protected Collection<Component> |
dependencies |
protected Collection<VirtualComponent> |
unsatisfied |
| Constructor and Description |
|---|
BasicComponent(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Element el)
Configures the component, by XML.
|
Map<String,Action> |
getActions()
A component may also define extra 'actions'.
|
Block |
getBlock(String name)
Gets a specific block.
|
Collection<Block> |
getBlocks()
An unmodifiable collection of all blocks associated with the component
|
String |
getBundle()
The baseName of the resource bundle associated with i18n messages for this component.
|
Block |
getDefaultBlock()
Gets the one block that is the 'default' block of this component
|
Collection<Component> |
getDependencies()
All (satisfied) depedencies of this Component.
|
LocalizedString |
getDescription()
The description can contain further information about the component, mainly to be displayed
in pages about components generally.
|
Manifest |
getManifest()
EXPERIMENTAL.
|
String |
getName()
Every component has a (universally) unique name
|
Setting<?> |
getSetting(String name)
Retrieves a setting (a definition, not a value; for that, use
Framework.getSettingValue(Setting, Parameters)) with a certain name. |
Collection<Setting<?>> |
getSettings()
An unmodifiable collection of all settings associated with this component
|
Collection<VirtualComponent> |
getUnsatisfiedDependencies()
The unsatisfied dependencies, so this should return an empty collection.
|
URI |
getUri()
An URI which may identify the configuration of this Component.
|
float |
getVersion()
A component has a version number.
|
protected void |
init()
Called on initializion.
|
void |
resolve(VirtualComponent unsat,
Component comp)
Used during bootstrapping.
|
String |
toString() |
protected final Collection<Component> dependencies
protected final Collection<VirtualComponent> unsatisfied
public BasicComponent(String name)
protected void init()
public String getName()
Componentpublic URI getUri()
Componentpublic float getVersion()
ComponentgetVersion in interface Componentpublic LocalizedString getDescription()
ComponentgetDescription in interface Componentpublic Manifest getManifest()
public void configure(Element el)
Componentpublic Collection<Block> getBlocks()
Componentpublic Block getBlock(String name)
Componentnull is returned.getBlock in interface Componentname - The name of the block. If this parameter is null, then Component.getDefaultBlock() can
be returned.public Block getDefaultBlock()
ComponentgetDefaultBlock in interface Componentpublic String getBundle()
ComponentResourceBundle.getBundle(String, Locale). The framework should decorate
the request with this like fmt:bundle would do before rendinger a block.public Collection<Setting<?>> getSettings()
ComponentgetSettings in interface Componentpublic Setting<?> getSetting(String name)
ComponentFramework.getSettingValue(Setting, Parameters)) with a certain name. Or
null if no such setting in this component.getSetting in interface Componentpublic Collection<Component> getDependencies()
ComponentComponent.getUnsatisfiedDependencies().getDependencies in interface Componentpublic Collection<VirtualComponent> getUnsatisfiedDependencies()
ComponentComponent.resolve(VirtualComponent, Component) when a
dependency is satisfied after all.getUnsatisfiedDependencies in interface Componentpublic Map<String,Action> getActions()
ComponentgetActions in interface Componentpublic void resolve(VirtualComponent unsat, Component comp)
ComponentComponent.getUnsatisfiedDependencies() to Component.getDependencies().MMBase 1.9-SNAPSHOT - ${javadoctimestamp}