biz.hammurapi.registry
Interface RegistryEntry

All Known Implementing Classes:
Directory

public interface RegistryEntry

Entry in Java Service/Component Registry.

Author:
Tatyana Konukova

Method Summary
 java.util.List<RegistryEntry> getChildren(java.lang.Class<?>[] componentTypes, java.lang.Class<?> factoryTypes, java.util.Set<java.lang.String> filterTokens)
           
 java.lang.Class<?>[] getComponentTypes()
          One entry may produce different types of objects.
 java.lang.String getDescription()
           
 java.lang.Class<?>[] getFactoryTypes()
          One entry may support different factory types, e.g.
 java.lang.String getName()
           
 java.lang.String getTooltip()
           
 boolean hasChildren(java.lang.Class<?>[] componentTypes, java.lang.Class<?> factoryTypes, java.util.Set<java.lang.String> filterTokens)
           
 boolean match(java.lang.Class<?>[] componentTypes, java.lang.Class<?> factoryTypes, java.util.Set<java.lang.String> filterTokens)
           
<T> FactoryConfigurator<T>
newFactory(java.lang.Class<T> factoryClass)
          Creates new factory for configuring and instantiating registry entry of given type.
 

Method Detail

getName

java.lang.String getName()
Returns:
Component/service name

getTooltip

java.lang.String getTooltip()
Returns:
Short description to display in component selection tree control.

getDescription

java.lang.String getDescription()
Returns:
Long description to display in component details panel.

getComponentTypes

java.lang.Class<?>[] getComponentTypes()
One entry may produce different types of objects. This method returns types supported by the entry.

Returns:
Classes/interfaces implemented by this entry.

getFactoryTypes

java.lang.Class<?>[] getFactoryTypes()
One entry may support different factory types, e.g. CodeSnippet factory creates a code snippet. That code snippet instantiates and configures component. XML document factory creates an XML element/document for instantiating/configuring component.

Returns:

match

boolean match(java.lang.Class<?>[] componentTypes,
              java.lang.Class<?> factoryTypes,
              java.util.Set<java.lang.String> filterTokens)
Parameters:
componentTypes - If this parameter is not null then only entries which support one of component types are displayed.
componentTypes - If this parameter is not null then only entries which support one of factory types are displayed.
filterTokens - Filter tokens
Returns:
True if entry itself matches (i.e. it can be selected in the browser).

hasChildren

boolean hasChildren(java.lang.Class<?>[] componentTypes,
                    java.lang.Class<?> factoryTypes,
                    java.util.Set<java.lang.String> filterTokens)
Parameters:
componentTypes - If this parameter is not null then only entries which support one of component types are displayed.
componentTypes - If this parameter is not null then only entries which support one of factory types are displayed.
filterTokens - Filter tokens
Returns:
True if entry has children matching tokens.

getChildren

java.util.List<RegistryEntry> getChildren(java.lang.Class<?>[] componentTypes,
                                          java.lang.Class<?> factoryTypes,
                                          java.util.Set<java.lang.String> filterTokens)
Parameters:
componentTypes - If this parameter is not null then only entries which support one of component types are returned.
componentTypes - If this parameter is not null then only entries which support one of factory types are returned.
filterTokens -
Returns:
Children matching tokens.

newFactory

<T> FactoryConfigurator<T> newFactory(java.lang.Class<T> factoryClass)
Creates new factory for configuring and instantiating registry entry of given type.

Type Parameters:
T - Factory class.
Returns:
Configurator for the factory.


Copyright © 2006 Hammurapi Group. All Rights Reserved.