org.hippoecm.hst.site.container
Class ComponentManagerFacade

java.lang.Object
  extended by org.hippoecm.hst.site.container.ComponentManagerFacade
All Implemented Interfaces:
ComponentManager, ComponentManagerAware

public class ComponentManagerFacade
extends Object
implements ComponentManagerAware, ComponentManager

ComponentManagerFacade

Version:
$Id: ComponentManagerFacade.java 32970 2012-02-15 20:36:52Z wko $

Field Summary
protected  ComponentManager componentManager
           
 
Constructor Summary
ComponentManagerFacade()
           
 
Method Summary
 void close()
          Closes the component manager and all the components.
<T> T
getComponent(String name)
          Returns the registered container component by name.
<T> T
getComponent(String name, String... contextNames)
          Returns the registered component from a child context.
 ComponentManager getComponentManager()
           
<T> Map<String,T>
getComponentsOfType(Class<T> requiredType)
          Returns the registered container components that match the given object type (including subclasses).
<T> Map<String,T>
getComponentsOfType(Class<T> requiredType, String... contextNames)
          Returns the registered container component that match the given object type (including subclasses) from a child context.
 String[] getConfigurationResources()
          Returns configuration resources for components assembly
 ContainerConfiguration getContainerConfiguration()
          Returns the container configuration
 void initialize()
          Initializes the component manager and container components.
 void setComponentManager(ComponentManager componentManager)
          Sets the component manager
 void setConfigurationResources(String[] configurationResources)
          Sets configuration resources for components assembly
 void start()
          Starts the component manager to serve container components.
 void stop()
          Stop the component manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentManager

protected ComponentManager componentManager
Constructor Detail

ComponentManagerFacade

public ComponentManagerFacade()
Method Detail

setComponentManager

public void setComponentManager(ComponentManager componentManager)
Description copied from interface: ComponentManagerAware
Sets the component manager

Specified by:
setComponentManager in interface ComponentManagerAware

getComponentManager

public ComponentManager getComponentManager()

close

public void close()
Description copied from interface: ComponentManager
Closes the component manager and all the components.

Specified by:
close in interface ComponentManager

getComponent

public <T> T getComponent(String name)
Description copied from interface: ComponentManager
Returns the registered container component by name. Returns null if a component is not found by the specified name.

Specified by:
getComponent in interface ComponentManager
Type Parameters:
T - component type
Parameters:
name - the name of the component
Returns:
component

getComponent

public <T> T getComponent(String name,
                          String... contextNames)
Description copied from interface: ComponentManager
Returns the registered component from a child context. If addonModuleNames consists of multiple items, then each addonModuleNames item is regarded as child addon module name in the descendant hierarchy, as ordered. Returns null if a component is not found by the specified name.

Specified by:
getComponent in interface ComponentManager
Returns:

getComponentsOfType

public <T> Map<String,T> getComponentsOfType(Class<T> requiredType)
Description copied from interface: ComponentManager
Returns the registered container components that match the given object type (including subclasses). Returns empty map if a component is not found by the specified required type.

Specified by:
getComponentsOfType in interface ComponentManager
Type Parameters:
T - component type
Parameters:
requiredType - the required type of the component
Returns:
component map

getComponentsOfType

public <T> Map<String,T> getComponentsOfType(Class<T> requiredType,
                                             String... contextNames)
Description copied from interface: ComponentManager
Returns the registered container component that match the given object type (including subclasses) from a child context. Returns empty map if a component is not found from a child context by the specified required type. If addonModuleNames consists of multiple items, then each addonModuleNames item is regarded as child addon module name in the descendant hierarchy, as ordered. Returns empty map if a component is not found by the specified type.

Specified by:
getComponentsOfType in interface ComponentManager
Returns:
component map

getContainerConfiguration

public ContainerConfiguration getContainerConfiguration()
Description copied from interface: ComponentManager
Returns the container configuration

Specified by:
getContainerConfiguration in interface ComponentManager
Returns:

initialize

public void initialize()
Description copied from interface: ComponentManager
Initializes the component manager and container components.

Specified by:
initialize in interface ComponentManager

start

public void start()
Description copied from interface: ComponentManager
Starts the component manager to serve container components.

Specified by:
start in interface ComponentManager

stop

public void stop()
Description copied from interface: ComponentManager
Stop the component manager.

Specified by:
stop in interface ComponentManager

setConfigurationResources

public void setConfigurationResources(String[] configurationResources)
Description copied from interface: ComponentManager
Sets configuration resources for components assembly

Specified by:
setConfigurationResources in interface ComponentManager

getConfigurationResources

public String[] getConfigurationResources()
Description copied from interface: ComponentManager
Returns configuration resources for components assembly

Specified by:
getConfigurationResources in interface ComponentManager


Copyright © 2008-2012 Hippo. All Rights Reserved.