Expresso 5-6

com.jcorporate.expresso.kernel.metadata
Class ComponentMetadata

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.metadata.ComponentMetadata

public class ComponentMetadata
extends Object

Bean class that stores the component metadata. Although this class is normally populated by the contents of an XML file, it can be manually populated if the developer so wishes.

Version:
$Revision: 1.5 $ on $Date: 2004/11/17 20:48:17 $
Author:
Michael Rimov

Constructor Summary
ComponentMetadata()
          Default constructor
 
Method Summary
 void addChildComponent(ComponentMetadata newComponent)
          Add a new ComponentMetadata object as a child of this component
 void addMethod(Method newValue)
          Add a new Method metadata object
 void addProperty(Property newValue)
          Add a new Property to this component's metadata
 List getChildren()
          Retrieve a list of children
 String getDescription()
          Retrieve the friendly name of the component
 String getMessageBundle()
          Retrieve the 'relative resource path' to the MessageBundle
 Method getMethod(String methodName)
          Retrieve the metadata
 Map getMethods()
          Retrieve all registered methods
 String getName()
          Retrieve the name of the component
 Map getProperties()
          Retrieve the properties for the component
 SchemaData getSchemaData()
          Retrieve the SchemaData bean from the metadata object
 String getVersionNumber()
          Retrieve the version number as a String
 void setDescription(String description)
          Set the description of the component metadata
 void setMessageBundle(String messageBundle)
          Sets the method metadata available.
 void setName(String name)
          Set the name of the compoent
 void setSchemaData(SchemaData newData)
          Sets the Schema data for the component.
 void setVersionNumber(String versionNumber)
          Set the version number as a string
 void setVersionNumber(String major, String minor, String micro)
          Set the version number as a batch of strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentMetadata

public ComponentMetadata()
Default constructor

Method Detail

getName

public String getName()
Retrieve the name of the component

Returns:
java.lang.String

setName

public void setName(String name)
Set the name of the compoent

Parameters:
name - New name for the component

setVersionNumber

public void setVersionNumber(String versionNumber)
Set the version number as a string

Parameters:
versionNumber - new version number in the format major.minor.micro

getVersionNumber

public String getVersionNumber()
Retrieve the version number as a String

Returns:
java.lang.String

setVersionNumber

public void setVersionNumber(String major,
                             String minor,
                             String micro)
Set the version number as a batch of strings

Parameters:
major - the major version number
minor - the minor version number
micro - the micro version number

addChildComponent

public void addChildComponent(ComponentMetadata newComponent)
Add a new ComponentMetadata object as a child of this component

Parameters:
newComponent - an instantiated ComponentMetadata

getChildren

public List getChildren()
Retrieve a list of children

Returns:
UnModifiable List

setDescription

public void setDescription(String description)
Set the description of the component metadata

Parameters:
description - The new 'friendly name' of the component

getDescription

public String getDescription()
Retrieve the friendly name of the component

Returns:
java.lang.String

addProperty

public void addProperty(Property newValue)
Add a new Property to this component's metadata

Parameters:
newValue - the new property value

addMethod

public void addMethod(Method newValue)
Add a new Method metadata object

Parameters:
newValue - the new Method metadata object

getMethod

public Method getMethod(String methodName)
Retrieve the metadata

Parameters:
methodName - name of the method to retrieve
Returns:
The Method or null if it doesn't exist

getMethods

public Map getMethods()
Retrieve all registered methods

Returns:
an Unmodifiable Map

getProperties

public Map getProperties()
Retrieve the properties for the component

Returns:
an Unmodifiable Map of Property classes

setMessageBundle

public void setMessageBundle(String messageBundle)

Sets the method metadata available.

Example Usage: metadata.setMessageBundle("/com/jcorporate/expresso/core/MessagesBundle");

Parameters:
messageBundle - 'resource' path to the MessageBundle.

getMessageBundle

public String getMessageBundle()
Retrieve the 'relative resource path' to the MessageBundle

Returns:
java.lang.String

setSchemaData

public void setSchemaData(SchemaData newData)
Sets the Schema data for the component.

Parameters:
newData - the new SchemaData object

getSchemaData

public SchemaData getSchemaData()
Retrieve the SchemaData bean from the metadata object

Returns:
SchemaData for this metadata

Expresso 5-6

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