Expresso 5-6

com.jcorporate.expresso.kernel
Interface Describable

All Known Implementing Classes:
ComponentBase

public interface Describable

This interface represents an object that can have it's metadata described by an XML file. The Describable interface returns the URL that contains the xml file that is the metadata for the component. This could event potentially be located in a central server for metadata distribution.

Note that the default component implementations (NonContainercomponentBase and ContainerComponentBase) implement Describable in such a way that it looks for an xml file by the name of: [className].xml in the same package as the Component class itself is located

Minimal Metadata

The minimal xml file to be associated with the Expresso component is:

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-metadata PUBLIC "-//Jcorporate Ltd// DTD Expresso Component Metadata Configuration 5.1//EN" "http://www.jcorporate.com/dtds/expresso-metadata_5_1.dtd"> <component-metadata name="ExpressoServiceWriter"> <description>Sample Component Description</description> <version-info> <major-version>1</major-version> <minor-version>0</minor-version> <micro-version>0</micro-version> </version-info> </component-metadata>

Author:
Michael Rimov

Method Summary
 URL getMetadataLocation()
          Get the location of the metadata.
 void setMetaData(ComponentMetadata metadata)
          Sets the component metadata for component.
 

Method Detail

getMetadataLocation

public URL getMetadataLocation()
Get the location of the metadata. The URL is usually retrieved via a this.getClass().loadResource("metadataname"); call. NonContainerComponentBase implements a default method.

Returns:
the URL for the metadata

setMetaData

public void setMetaData(ComponentMetadata metadata)
Sets the component metadata for component. Usually the external 'factory class' that parsed the metadata would then set a ComponentMetadata object for this component.

Parameters:
metadata - the component metadata

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.