aokell.lib.util
Class FractalHelper

java.lang.Object
  extended by aokell.lib.util.FractalHelper

public class FractalHelper
extends Object

Helper class that wraps calls to o.o.f.a.Fractal and that throws runtime exception instead of checked exceptions. Various other utility methods.

Author:
Lionel Seinturier

Constructor Summary
FractalHelper()
           
 
Method Summary
static void bindFc(BindingController bc, String itfName, Object dstItf)
          Bind the given destination interface to the given client interface name.
static Interface followBindingsUpToLastInterface(Interface start)
          Follow bindings and return the interface associated to the component located at the end of the binding chain.
static AttributeController getAttributeController(Component c)
          Returns the AttributeController interface of the given component.
static BindingControllerItf getBindingController(Component c)
          Returns the BindingControllerItfinterface of the given component.
static Object getContent(Component c)
           
static ContentController getContentController(Component c)
          Returns the ContentController interface of the given component.
static FactoryItf getFactory(Component c)
          Returns the FactoryItf interface of the given component.
static String getFcFullyQualifiedName(Component comp)
          Return the fully-qualified name of a component, i.e. a slash-separated string of names reflecting the hierarchy of nested components.
static Object getFcInterface(Component c, String itfName)
           
static GenericFactory getGenericFactory(Component c)
          Returns the GenericFactory interface of the given component.
static LifeCycleController getLifeCycleController(Component c)
          Returns the LifeCycleController interface of the given component.
static NameController getNameController(Component c)
          Returns the NameController interface of the given component.
static SuperControllerItf getSuperController(Component c)
          Returns the SuperControllerItf interface of the given component.
static TypeFactory getTypeFactory(Component c)
          Returns the TypeFactory interface of the given component.
static boolean isFcControllerInterfaceName(String itfName)
          Return true if the specified name corresponds to the name of a Fractal controller interface name.
static Object lookupFc(BindingController bc, String itfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractalHelper

public FractalHelper()
Method Detail

getFcInterface

public static Object getFcInterface(Component c,
                                    String itfName)

getAttributeController

public static AttributeController getAttributeController(Component c)
Returns the AttributeController interface of the given component.

Parameters:
c - a component.
Returns:
the AttributeController interface of the given component.

getBindingController

public static BindingControllerItf getBindingController(Component c)
Returns the BindingControllerItfinterface of the given component.

Parameters:
c - a component.
Returns:
the BindingControllerItf interface of the given component.

getContentController

public static ContentController getContentController(Component c)
Returns the ContentController interface of the given component.

Parameters:
c - a component.
Returns:
the ContentController interface of the given component.

getSuperController

public static SuperControllerItf getSuperController(Component c)
Returns the SuperControllerItf interface of the given component.

Parameters:
c - a component.
Returns:
the SuperControllerItf interface of the given component.

getNameController

public static NameController getNameController(Component c)
Returns the NameController interface of the given component.

Parameters:
c - a component.
Returns:
the NameController interface of the given component.

getLifeCycleController

public static LifeCycleController getLifeCycleController(Component c)
Returns the LifeCycleController interface of the given component.

Parameters:
c - a component.
Returns:
the LifeCycleController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getFactory

public static FactoryItf getFactory(Component c)
Returns the FactoryItf interface of the given component.

Parameters:
c - a component.
Returns:
the FactoryItf interface of the given component.

getGenericFactory

public static GenericFactory getGenericFactory(Component c)
Returns the GenericFactory interface of the given component.

Parameters:
c - a component.
Returns:
the GenericFactory interface of the given component.

getTypeFactory

public static TypeFactory getTypeFactory(Component c)
Returns the TypeFactory interface of the given component.

Parameters:
c - a component.
Returns:
the TypeFactory interface of the given component.

getContent

public static Object getContent(Component c)

bindFc

public static void bindFc(BindingController bc,
                          String itfName,
                          Object dstItf)
Bind the given destination interface to the given client interface name.

Parameters:
bc - the binding controller
itfName - the client interface name
dstItf - the destination interface

lookupFc

public static Object lookupFc(BindingController bc,
                              String itfName)

isFcControllerInterfaceName

public static boolean isFcControllerInterfaceName(String itfName)
Return true if the specified name corresponds to the name of a Fractal controller interface name. Note: factory is not considered as a controller interface but as a business one.


followBindingsUpToLastInterface

public static Interface followBindingsUpToLastInterface(Interface start)
Follow bindings and return the interface associated to the component located at the end of the binding chain.


getFcFullyQualifiedName

public static String getFcFullyQualifiedName(Component comp)
Return the fully-qualified name of a component, i.e. a slash-separated string of names reflecting the hierarchy of nested components.