com.zfabrik.components
Interface IComponentDescriptor

All Known Implementing Classes:
AbstractComponentDescriptor, FSCRDBComponent

public interface IComponentDescriptor

The Component Descriptor provides access to meta data as provided by component repositories (IComponentsRepository without requiring download of further component resources or other processing.

A Component Descriptor can be retrieved by calling IComponentsRepository.getComponent(String) or by a component lookup passing this interface as expected result type:

IComponentsLookup.INSTANCE.lookup(<component name>,IComponentDescriptor.class); Component metadata is provided as properties in the format of a Properties properties file. At least such property file should declare a component type:

 com.zfabrik.component.type=<component type>
 
For example
 com.zfabrik.component.type=com.zfabrik.java
 
would define a Java component.

Author:
hb
See Also:
IComponentsRepository, IComponentsLookup

Field Summary
static java.lang.String COMPONENT_CLZ
          The class name of the component implementation.
static java.lang.String COMPONENT_NAME
          The name of the component.
static java.lang.String COMPONENT_TYPE
          The type of a component.
static java.lang.String DEPENDENCIES
          Components declare dependency on other components by specifying a comma-separated list of component names.
static java.lang.String STATES_DEPENDENCY
          Deprecated. Use DEPENDENCIES instead.
 
Method Summary
 java.lang.String getName()
          Gets the name of the component.
 java.util.Properties getProperties()
          Get the properties of this component
 java.lang.String getProperty(java.lang.String name)
          Just a short hand for getProperties().getProperty(String)
 long getRevision()
          Get the revision of the component.
 java.lang.String getType()
          Gets the type of the component.
 

Field Detail

COMPONENT_NAME

static final java.lang.String COMPONENT_NAME
The name of the component. This property can be used conveniently to convey a component name, e.g. on a servlet request or elsewhere.

See Also:
Constant Field Values

COMPONENT_TYPE

static final java.lang.String COMPONENT_TYPE
The type of a component. For example com.zfabrik.java for a Java component.

See Also:
Constant Field Values

COMPONENT_CLZ

static final java.lang.String COMPONENT_CLZ
The class name of the component implementation. Many component types support the use of this property, which is why it is declared here. It is by no means a necessary requirement of a component type to require an implementation class. Component's that do support specification of a component implementation class do, by convention, use JavaComponentUtil.html.loadImplementationClassFromJavaComponent() to load that implementation class.

See Also:
Constant Field Values

STATES_DEPENDENCY

static final java.lang.String STATES_DEPENDENCY
Deprecated. Use DEPENDENCIES instead.
Components declare dependency an a System State by specifying a comma-separated list of system state component names. If all the states must be attained before a lookup for the component will be satisfied.

See Also:
Constant Field Values

DEPENDENCIES

static final java.lang.String DEPENDENCIES
Components declare dependency on other components by specifying a comma-separated list of component names. All components will be queries for implementations of IDependencyComponent and correspondingly invoked. The declaring component will be dependent on all declared dependency components

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Gets the name of the component.


getType

java.lang.String getType()
Gets the type of the component. A short-hand for getProperty(COMPONENT_TYPE).


getRevision

long getRevision()
Get the revision of the component. Minimum revision is zero. Revisions may not necessarily be strictly increasing, as components may be provided by different repositories over time.

Returns:

getProperties

java.util.Properties getProperties()
Get the properties of this component


getProperty

java.lang.String getProperty(java.lang.String name)
Just a short hand for getProperties().getProperty(String)

Parameters:
name -
Returns: