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

java.lang.Object
  extended by org.objectweb.fractal.julia.control.content.CheckContentMixin
All Implemented Interfaces:
ContentController

public abstract class CheckContentMixin
extends Object
implements ContentController

Provides basic checks to a ContentController.

Requirements


Field Summary
 Component _this_weaveableC
          The weaveableC field required by this mixin.
 
Method Summary
abstract  void _super_addFcSubComponent(Component subComponent)
          The addFcSubComponent method overriden by this mixin.
abstract  void _super_removeFcSubComponent(Component subComponent)
          The removeFcSubComponent method overriden by this mixin.
abstract  Component[] _this_getFcSubComponents()
          The getFcSubComponents method required by this mixin.
 void addFcSubComponent(Component subComponent)
          Checks that the given component is not already a sub component, and then calls the overriden method.
 boolean containsFcSubComponent(Component subComponent)
          Tests if this component contains the given sub component.
 void removeFcSubComponent(Component subComponent)
          Checks that the given component is really a sub component, and then calls the overriden method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.fractal.api.control.ContentController
getFcInternalInterface, getFcInternalInterfaces, getFcSubComponents
 

Field Detail

_this_weaveableC

public Component _this_weaveableC
The weaveableC 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

addFcSubComponent

public void addFcSubComponent(Component subComponent)
                       throws IllegalContentException,
                              IllegalLifeCycleException
Checks that the given component is not already a sub component, and then calls the overriden method. This method also checks that the addition of this sub component will not create a cycle in the component hierarchy.

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
Checks that the given component is really a sub component, and then calls the overriden method.

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.

containsFcSubComponent

public boolean containsFcSubComponent(Component subComponent)
Tests if this component contains the given sub component.

Parameters:
subComponent - a component.
Returns:
true if this component contains the given sub component, or false otherwise.

_this_getFcSubComponents

public abstract Component[] _this_getFcSubComponents()
The getFcSubComponents method required by this mixin.

Returns:
the Component interfaces of the sub-components of the component to which this interface belongs.

_super_addFcSubComponent

public abstract void _super_addFcSubComponent(Component subComponent)
                                       throws IllegalContentException,
                                              IllegalLifeCycleException
The addFcSubComponent method overriden by this mixin.

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.

_super_removeFcSubComponent

public abstract void _super_removeFcSubComponent(Component subComponent)
                                          throws IllegalContentException,
                                                 IllegalLifeCycleException
The removeFcSubComponent method overriden by this mixin.

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.