Block Metadata
The meta-data about each block is stored in a BlockInfo file. The info
includes details on what version the block is, what
The BlockInfo file has the same name as the Block except with the extention
<?xml version="1.0"?> <blockinfo> <block> <version>1.2.3</version> </block> <services> <service name="com.biz.cornerstone.services.MyService" version="2.1.3" /> </services> <dependencies> <dependency> <role>com.biz.cornerstone.services.Authorizer</role> <service name="com.biz.cornerstone.service.Authorizer" version="1.2"/> </dependency> <dependency> <!-- note that role is not specified and defaults to name of service. The service version is not specified and it defaults to "1.0" --> <service name="com.biz.cornerstone.service.RoleMapper"/> </dependency> </dependencies> </blockinfo>
You will notice that the information in the BlockInfo file is separated into
three main sections;
BlockInfo 'block' Section The block section specifies the version of class. In the future this
section will also specify the configuration schema if the block is
BlockInfo 'services' SectionThe services section documents the services that this block can offer other Blocks. The service instances indicate an interface and optionally a version (defaults to version 1.0 if not specified). This section is optional and a Block can choose to not offer any services. BlockInfo 'dependencies' Section The services section documents the services that this block requires to operate.
Required services are placed in the Blocks ServiceManager under the name
specified by the
|