org.objectweb.kilim.model
Class RtComponentSlot

java.lang.Object
  extended byorg.objectweb.kilim.model.RtComponentElement
      extended byorg.objectweb.kilim.model.RtComponentSlot
All Implemented Interfaces:
ComponentElement, ComponentSlot, ContainerElement, RuntimeElement

public class RtComponentSlot
extends RtComponentElement
implements ComponentSlot

Author:
horn

Field Summary
private  SlotFactory factory
           
private  java.util.List interfaces
           
private  boolean isInitialized
           
private  java.util.List plugIns
           
 
Fields inherited from class org.objectweb.kilim.model.RtComponentElement
nbComponent, nbElement
 
Constructor Summary
RtComponentSlot(Slot aSlot, Component aComponent, SlotFactory aFactory)
          The public constructor for RtComponentSlots
 
Method Summary
 void addInterface(ComponentInterface aInterface)
          adds an Interface.in the slot.
 Factory getFactory()
          returns the factory used to create the container.
 ComponentInterface getInterface(java.lang.String aName)
          returns the local interface identified by its local name.
 java.util.Iterator getInterfaces()
          returns as an interator the interfaces known inthe slot.
 java.lang.String getLocalName()
          returns the local name of the component element.
 java.util.Iterator getPlugIns()
          returns as an iterator the components plugged in the slot..
 boolean isComponent()
          returns true if the container is a component.
 boolean isInitialized()
          returns true when the container is in the "initialized" state or not.
 boolean isSlot()
          returns true if the container is a slot.
 void plug(Component aComponent)
          plugs a component in the slot.
 void removeInterface(ComponentInterface aInterface)
          removes an interface.
 void setInitialized()
          sets the container in the"initialized" state.
 void unplug(Component aComponent)
          unplugs a component from the slot.
 
Methods inherited from class org.objectweb.kilim.model.RtComponentElement
containsElement, getContainingComponent, getContainingElement, getElement, getElementDescription, getNbComponent, getNbElement, getQualifiedName, getTarget, getTemplateDefHierarchy, removeElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.kilim.model.ComponentElement
getContainingComponent, getContainingElement, getElementDescription, getQualifiedName, getTemplateDefHierarchy
 

Field Detail

factory

private SlotFactory factory

isInitialized

private boolean isInitialized

interfaces

private java.util.List interfaces

plugIns

private java.util.List plugIns
Constructor Detail

RtComponentSlot

public RtComponentSlot(Slot aSlot,
                       Component aComponent,
                       SlotFactory aFactory)
The public constructor for RtComponentSlots

Parameters:
aSlot - : the slot template description
aComponent - : the component containing the slot
aFactory - : the slot factory.
Method Detail

isComponent

public boolean isComponent()
Description copied from interface: ContainerElement
returns true if the container is a component.

Specified by:
isComponent in interface ContainerElement
Returns:
boolean
See Also:
ContainerElement.isComponent()

isSlot

public boolean isSlot()
Description copied from interface: ContainerElement
returns true if the container is a slot.

Specified by:
isSlot in interface ContainerElement
Returns:
boolean
See Also:
ContainerElement.isSlot()

getFactory

public Factory getFactory()
Description copied from interface: ContainerElement
returns the factory used to create the container. The result is a CompoonentFactory if the container is a component or a SlotFactory if the container is a slot.

Specified by:
getFactory in interface ContainerElement
Returns:
Factory
See Also:
ContainerElement.getFactory()

isInitialized

public boolean isInitialized()
Description copied from interface: ContainerElement
returns true when the container is in the "initialized" state or not.

Specified by:
isInitialized in interface ContainerElement
Returns:
boolean
See Also:
ContainerElement.isInitialized()

setInitialized

public void setInitialized()
Description copied from interface: ContainerElement
sets the container in the"initialized" state.

Specified by:
setInitialized in interface ContainerElement
See Also:
org.objectweb.kilim.model.Component#setInitialized(boolean)

getLocalName

public java.lang.String getLocalName()
Description copied from interface: ComponentElement
returns the local name of the component element.

Specified by:
getLocalName in interface ComponentElement
Returns:
String
See Also:
ComponentElement.getLocalName()

addInterface

public void addInterface(ComponentInterface aInterface)
                  throws KilimException
adds an Interface.in the slot.

Specified by:
addInterface in interface ContainerElement
Parameters:
aInterface - : the interface to be added.
Throws:
KilimException - : generated if aInterface is null or is already present in the slot.

removeInterface

public void removeInterface(ComponentInterface aInterface)
                     throws KilimException
removes an interface. from the slot.

Specified by:
removeInterface in interface ContainerElement
Parameters:
aInterface - : the interface to be removed.
Throws:
KilimException - : generated if aInterface is null or is unknown.

getInterfaces

public java.util.Iterator getInterfaces()
returns as an interator the interfaces known inthe slot.

Specified by:
getInterfaces in interface ContainerElement
Returns:
Iterator

getInterface

public ComponentInterface getInterface(java.lang.String aName)
                                throws KilimException
returns the local interface identified by its local name.

Specified by:
getInterface in interface ContainerElement
Parameters:
aName - : the local name of the interface.
Returns:
ComponentInterface :
Throws:
KilimException - : generated if aName is null or if the slot does not contain an interface whose name is aName.

getPlugIns

public java.util.Iterator getPlugIns()
returns as an iterator the components plugged in the slot..

Specified by:
getPlugIns in interface ComponentSlot
Returns:
Iterator

plug

public void plug(Component aComponent)
          throws KilimException
plugs a component in the slot.

Specified by:
plug in interface ComponentSlot
Parameters:
aComponent - : the component to be plugged.
Throws:
KilimException - : generated if aComponent is null or is already plugged in the slot.

unplug

public void unplug(Component aComponent)
            throws KilimException
unplugs a component from the slot.

Specified by:
unplug in interface ComponentSlot
Parameters:
aComponent - : the component to be removed.
Throws:
KilimException - : generated if aComponent is null or is not plugged in the slot.