|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.framework.BasicComponent
public class BasicComponent
A component is a piece of pluggable functionality that typically has dependencies on other components, and may be requested several blocks.
| Field Summary | |
|---|---|
protected Collection<Component> |
dependencies
|
protected Collection<VirtualComponent> |
unsatisfied
|
| Constructor Summary | |
|---|---|
BasicComponent(String name)
|
|
| Method Summary | |
|---|---|
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, org.mmbase.util.functions.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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Collection<Component> dependencies
protected final Collection<VirtualComponent> unsatisfied
| Constructor Detail |
|---|
public BasicComponent(String name)
| Method Detail |
|---|
protected void init()
public String getName()
Component
getName in interface Componentpublic URI getUri()
Component
getUri in interface Componentpublic float getVersion()
Component
getVersion in interface Componentpublic LocalizedString getDescription()
Component
getDescription in interface Componentpublic Manifest getManifest()
public void configure(Element el)
Component
configure in interface Componentel - A 'component' element from the 'components' XSD.public Collection<Block> getBlocks()
Component
getBlocks in interface 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()
Component
getDefaultBlock in interface Componentpublic String toString()
toString in class Objectpublic String getBundle()
ComponentResourceBundle.getBundle(String, Locale). The framework should decorate
the request with this like fmt:bundle would do before rendinger a block.
getBundle in interface Componentpublic Collection<Setting<?>> getSettings()
Component
getSettings in interface Componentpublic Setting<?> getSetting(String name)
ComponentFramework.getSettingValue(Setting, org.mmbase.util.functions.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()
Component
getActions in interface Component
public void resolve(VirtualComponent unsat,
Component comp)
ComponentComponent.getUnsatisfiedDependencies() to Component.getDependencies().
resolve in interface Componentunsat - The VirtualComponent object that used to be unsatisfiedcomp - The object representing the same component, but now as an actual Component.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||