org.objectweb.kilim.description
Class Plug

java.lang.Object
  extended byorg.objectweb.kilim.description.TemplateElementImpl
      extended byorg.objectweb.kilim.description.Plug
All Implemented Interfaces:
java.lang.Cloneable, TemplateElement

public class Plug
extends TemplateElementImpl

Author:
horn Describes a slot, which is just a set of unbound ports in a new naming context

Field Summary
private  java.lang.String instanceName
           
private  java.util.LinkedHashMap mappings
           
private static java.lang.String[][] msgTexts
           
private  java.lang.String slotName
           
 
Fields inherited from class org.objectweb.kilim.description.TemplateElementImpl
 
Constructor Summary
Plug(java.lang.String aSlotName, java.lang.String aInstanceName, TemplateDescription aTemplate)
          Method Plug.
 
Method Summary
 void addNameMapping(java.lang.String aExternal, java.lang.String aInternal)
          A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component.
 java.lang.String getInstanceName()
          returns the component name.
 java.lang.String getNameMapping(java.lang.String aName)
          A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component.
 java.util.Iterator getNameMappings()
          A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component.
 java.lang.String getSlotName()
          returns the slot name.
private  java.lang.String msgSuffix1()
           
 void removeNameMapping(java.lang.String aExternal)
          A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component.
 
Methods inherited from class org.objectweb.kilim.description.TemplateElementImpl
clone, getContainingTemplate, getTemplateDefHierarchy, setContainingTemplate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msgTexts

private static java.lang.String[][] msgTexts

slotName

private java.lang.String slotName

instanceName

private java.lang.String instanceName

mappings

private java.util.LinkedHashMap mappings
Constructor Detail

Plug

public Plug(java.lang.String aSlotName,
            java.lang.String aInstanceName,
            TemplateDescription aTemplate)
     throws KilimException
Method Plug.

Parameters:
aSlotName - : the name of the slot
aInstanceName - : the name of the component to be plugged.
aTemplate - : the template in which the plug is done.
Throws:
KilimException - : generates an exception if an argument is null.
Method Detail

getSlotName

public java.lang.String getSlotName()
returns the slot name.

Returns:
String

getInstanceName

public java.lang.String getInstanceName()
returns the component name.

Returns:
String

getNameMapping

public java.lang.String getNameMapping(java.lang.String aName)
A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component. This correspondance has been introduced to relax constraints on the interface naming during plug operations. This method returns the name of component interface that will be associate to interface aName in the slot.

Parameters:
aName - : the local name of the interface declared in the slot.
Returns:
String the local name of the corresponding interface in the component.

getNameMappings

public java.util.Iterator getNameMappings()
A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component. This correspondance has been introduced to relax constraints on the interface naming during plug operations. This method returns as an iterator the name mappings between slot ports and the plugged component ports.

Returns:
Iterator

addNameMapping

public void addNameMapping(java.lang.String aExternal,
                           java.lang.String aInternal)
                    throws KilimException
A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component. This correspondance has been introduced to relax constraints on the interface naming during plug operations. This method adds a new name mapping.

Parameters:
aExternal - :name of the slot port
aInternal - : name of the component port.
Throws:
KilimException - : generated when aExternal or aInternal is null

removeNameMapping

public void removeNameMapping(java.lang.String aExternal)
                       throws KilimException
A name mapping is a correspondance between the name of an interface defined in a slot and the corresponding port in a component. This correspondance has been introduced to relax constraints on the interface naming during plug operations. This method removes a name mapping.

Parameters:
aExternal - : name of the mapping to be removed (name mapping are identified by the slot name of a port).
Throws:
KilimException - : generated if aExternal is null.

msgSuffix1

private java.lang.String msgSuffix1()