org.objectweb.fractal.julia.control.content
Class BasicContentControllerMixin

java.lang.Object
  extended byorg.objectweb.fractal.julia.control.content.BasicContentControllerMixin
All Implemented Interfaces:
ContentController, Controller

public abstract class BasicContentControllerMixin
extends Object
implements Controller, ContentController

Provides a basic implementation of the ContentController interface.

Requirements


Field Summary
 Component _this_weaveableOptC
          The weaveableOptC field required by this mixin.
 Map fcInternalInterfaces
          The internal interfaces of the component to which this controller object belongs.
 List fcSubComponents
          The sub components of the component to which this controller object belongs.
 
Method Summary
abstract  void _super_initFcController(InitializationContext i)
          The initFcController method overriden by this mixin.
 void addFcSubComponent(Component subComponent)
          Adds a sub-component to this component.
 Object getFcInternalInterface(String interfaceName)
          Returns an internal interface of the component to which this interface belongs.
 Object[] getFcInternalInterfaces()
          Returns the internal interfaces of the component to which this interface belongs.
 Component[] getFcSubComponents()
          Returns the sub-components of this component.
 void initFcController(InitializationContext ic)
          Initializes the fields of this mixin and then calls the overriden method.
 void removeFcSubComponent(Component subComponent)
          Removes a sub-component from this component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fcInternalInterfaces

public Map fcInternalInterfaces
The internal interfaces of the component to which this controller object belongs.


fcSubComponents

public List fcSubComponents
The sub components of the component to which this controller object belongs.


_this_weaveableOptC

public Component _this_weaveableOptC
The weaveableOptC field required by this mixin. This field is supposed to reference the Component interface of the component to which this controller object belongs.

Method Detail

initFcController

public void initFcController(InitializationContext ic)
                      throws InstantiationException
Initializes the fields of this mixin and then calls the overriden method.

Specified by:
initFcController in interface Controller
Parameters:
ic - information about the component to which this controller object belongs.
Throws:
InstantiationException - if the initialization fails.

getFcInternalInterfaces

public Object[] getFcInternalInterfaces()
Description copied from interface: ContentController
Returns the internal interfaces of the component to which this interface belongs.

Specified by:
getFcInternalInterfaces in interface ContentController
Returns:
the internal interfaces of the component to which this interface belongs.

getFcInternalInterface

public Object getFcInternalInterface(String interfaceName)
                              throws NoSuchInterfaceException
Description copied from interface: ContentController
Returns an internal interface of the component to which this interface belongs.

Specified by:
getFcInternalInterface in interface ContentController
Parameters:
interfaceName - the name of the internal interface that must be returned.
Returns:
the internal interface of the component to which this interface belongs, whose name is equal to the given name.
Throws:
NoSuchInterfaceException - if there is no such interface.

getFcSubComponents

public Component[] getFcSubComponents()
Description copied from interface: ContentController
Returns the sub-components of this component.

Specified by:
getFcSubComponents in interface ContentController
Returns:
the Component interfaces of the sub-components of the component to which this interface belongs.

addFcSubComponent

public void addFcSubComponent(Component subComponent)
                       throws IllegalContentException,
                              IllegalLifeCycleException
Description copied from interface: ContentController
Adds a sub-component to this component. More precisely adds the component whose reference is given as a sub-component of the component to which this interface belongs. If C is the sub-component set returned by getFcSubComponents just before a call to this method, and C' is the sub-component set just after this call, then subComponent is guaranteed to be in C', but C' is not guaranted to be the union of C and {subComponent}, nor to contain all the elements of C.

Specified by:
addFcSubComponent in interface ContentController
Parameters:
subComponent - the component to be added inside this component.
Throws:
IllegalContentException - if the given component cannot be added inside this component.
IllegalLifeCycleException - if this component has a LifeCycleController interface, but it is not in an appropriate state to perform this operation.

removeFcSubComponent

public void removeFcSubComponent(Component subComponent)
                          throws IllegalContentException,
                                 IllegalLifeCycleException
Description copied from interface: ContentController
Removes a sub-component from this component. More precisely removes the sub-component whose reference is given from the component to which this interface belongs. If C is the sub-component set returned by getFcSubComponents just before a call to this method, and C' is the sub-component set just after this call, then subComponent is guaranteed not to be in C', but C' is not guaranted to be the difference of C and {subComponent}, nor to contain all the elements of C distinct from subComponent.

Specified by:
removeFcSubComponent in interface ContentController
Parameters:
subComponent - the component to be removed from this component.
Throws:
IllegalContentException - if the given component cannot be removed from this component.
IllegalLifeCycleException - if this component has a LifeCycleController interface, but it is not in an appropriate state to perform this operation.

_super_initFcController

public abstract void _super_initFcController(InitializationContext i)
                                      throws InstantiationException
The initFcController method overriden by this mixin.

Throws:
InstantiationException