Beans (extension point)
This extension point allows you to resolve Java objects by paths in BioUML runtime. Objects located in the tree can be resolved via BioUML repository, but sometimes it's desired to have a static link to some other object (even not DataElement). For this purpose
BeanRegistry.getBean(String) method can be used.
Using this extension point you may register your own prefix to resolve all objects which names start with given prefix. To achieve this you have to implement
BeanProvider interface and register the created class as an extension.
<!ELEMENT provider> <!ATTLIST provider class CDATA #REQUIRED prefix CDATA #REQUIRED >
- Fully-qualified name of the class implementing
- Prefix, cannot end with
"/". Only latin letters and
"/"are allowed to use in prefix. All paths starting with this prefix will be handled by your class unless more detailed handler is registered. For example, if class A is registered for
"properties/myplugin"prefix and class B is registered for
"properties/myplugin/deep"prefix, then all paths starting with
"properties/myplugin/deep"will be handled by class B, while all other paths starting with
"properties/myplugin"will be handled by class A. If two classes are registered for the same prefix, it's undefined which one will handle it.
BeanRegistry.getBeanmethod always looks first in the BioUML repository for the supplied path. Thus be careful to avoid names collisions. It's recommended to start prefix with
- When you implement
BeanProviderinterface, please note that parameter passed to
BeanProvider.getBeanmethod is not the full path, but the path except the prefix.
- Currently this extension point is mainly used by BioUML web edition code. See
<extension point="ru.biosoft.access.beans"> <provider class="ru.biosoft.table.TableCellBeanProvider" prefix="properties/tableCell"/> </extension>
All paths starting with "properties/tableCell" will be handled by