org.vraptor.webapp
Class DefaultComponentManager

java.lang.Object
  extended by org.vraptor.webapp.DefaultComponentManager
All Implemented Interfaces:
ComponentManager

public class DefaultComponentManager
extends Object
implements ComponentManager

A simple implementation of a component manager.

Author:
Guilherme Silveira

Field Summary
static String[] COMPONENT_TERMINATIONS
           
static String VALIDATE_METHOD_INITIALS
           
 
Constructor Summary
DefaultComponentManager(LogicMethodFactory factory)
           
 
Method Summary
 ComponentType getComponent(String name, String logic)
          Returns the business component
 Set<ComponentType> getComponents()
          Returns a list with all component classes.
 ComponentType getComponentType(Class<?> type)
           
 void register(ComponentType type)
          Directly registers a component type.
 boolean register(String typeClazz)
          Registers a new component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE_METHOD_INITIALS

public static final String VALIDATE_METHOD_INITIALS
See Also:
Constant Field Values

COMPONENT_TERMINATIONS

public static final String[] COMPONENT_TERMINATIONS
Constructor Detail

DefaultComponentManager

public DefaultComponentManager(LogicMethodFactory factory)
Method Detail

getComponent

public ComponentType getComponent(String name,
                                  String logic)
                           throws ComponentNotFoundException,
                                  LogicNotFoundException
Description copied from interface: ComponentManager
Returns the business component

Specified by:
getComponent in interface ComponentManager
Throws:
LogicNotFoundException
ComponentNotFoundException

getComponents

public Set<ComponentType> getComponents()
Description copied from interface: ComponentManager
Returns a list with all component classes.

Specified by:
getComponents in interface ComponentManager
Returns:
all components registered

getComponentType

public ComponentType getComponentType(Class<?> type)
                               throws InvalidComponentException
Specified by:
getComponentType in interface ComponentManager
Throws:
InvalidComponentException

register

public void register(ComponentType type)
              throws LogicNotFoundException
Description copied from interface: ComponentManager
Directly registers a component type.

Specified by:
register in interface ComponentManager
Parameters:
type - the component type
Throws:
LogicNotFoundException

register

public boolean register(String typeClazz)
                 throws InvalidComponentException
Description copied from interface: ComponentManager
Registers a new component

Specified by:
register in interface ComponentManager
Parameters:
typeClazz - component class
Throws:
InvalidComponentException - invalid component


Copyright © 2004-2008 VRaptor. All Rights Reserved.