org.objectweb.fractal.api.control
Interface ContentController


public interface ContentController

A component interface to control the content of the component to which it belongs. This content is supposed to be made of an unordered, unstructured set of components.


Method Summary
 void addFcSubComponent(Component subComponent)
          Adds a sub-component to this component.
 java.lang.Object getFcInternalInterface(java.lang.String interfaceName)
          Returns an internal interface of the component to which this interface belongs.
 java.lang.Object[] getFcInternalInterfaces()
          Returns the internal interfaces of the component to which this interface belongs.
 Component[] getFcSubComponents()
          Returns the sub-components of this component.
 void removeFcSubComponent(Component subComponent)
          Removes a sub-component from this component.
 

Method Detail

getFcInternalInterfaces

java.lang.Object[] getFcInternalInterfaces()
Returns the internal interfaces of the component to which this interface belongs.

Returns:
the internal interfaces of the component to which this interface belongs.

getFcInternalInterface

java.lang.Object getFcInternalInterface(java.lang.String interfaceName)
                                        throws NoSuchInterfaceException
Returns an internal interface of the component to which this interface belongs.

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

Component[] getFcSubComponents()
Returns the sub-components of this component.

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

addFcSubComponent

void addFcSubComponent(Component subComponent)
                       throws IllegalContentException,
                              IllegalLifeCycleException
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.

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

void removeFcSubComponent(Component subComponent)
                          throws IllegalContentException,
                                 IllegalLifeCycleException
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.

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.


Copyright © 2007-2011. All Rights Reserved.