org.codehaus.waffle.testing.registrar
Class RegistrarHelper

java.lang.Object
  extended by org.codehaus.waffle.testing.registrar.RegistrarHelper

public class RegistrarHelper
extends java.lang.Object

Registrar helper class. Retrieves controller instances registered in a Registrar and allows the registration of all the components in a given context level.

Author:
Mauro Talevi

Constructor Summary
RegistrarHelper()
           
 
Method Summary
 void componentsFor(java.lang.Class<?> registrarType, org.codehaus.waffle.context.ContextLevel level)
          Registers the components for the given registrar and level
 java.lang.Object controllerFor(java.lang.Class<?> registrarType, org.codehaus.waffle.context.ContextLevel level, java.lang.String path)
          Returns the registered controller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrarHelper

public RegistrarHelper()
Method Detail

controllerFor

public java.lang.Object controllerFor(java.lang.Class<?> registrarType,
                                      org.codehaus.waffle.context.ContextLevel level,
                                      java.lang.String path)
Returns the registered controller

Parameters:
registrarType - the Class representing the registrar type
level - the ContextLevel
path - the path under which the controller is registered
Returns:
The controller instance or null if not found

componentsFor

public void componentsFor(java.lang.Class<?> registrarType,
                          org.codehaus.waffle.context.ContextLevel level)
Registers the components for the given registrar and level

Parameters:
registrarType - the Class representing the registrar type
level - the ContextLevel


Copyright © 2008. All Rights Reserved.