org.objectweb.kilim.model
Interface ComponentInterface

All Superinterfaces:
ComponentElement, ComponentSource
All Known Subinterfaces:
ComponentProperty
All Known Implementing Classes:
RtComponentInterface, RtComponentProperty, RtSingleValuePort

public interface ComponentInterface
extends ComponentSource

Author:
horn A ComponentInterface is a runtime descriptor of an interface. This class provides therefore several methods to determine the real nature of the interface (unary port, nary port, provider or property). It supports morover several methods to bind or unbind the interface to values or value sources.

Method Summary
 void bindProvider(RuntimeSource aProvider, boolean jReplace)
          binds an interface to a value source.
 void bindValue(java.lang.Object aValue)
          assigns a value to an interface.
 boolean isCollectionPort()
          returns true if the interface is a collection port.
 boolean isModified()
          Method isModified.
 boolean isProperty()
          returns true if the interface is a property.
 boolean isProvider()
          returns true if the interface is a provider (i.e.
 boolean isSingleValuePort()
          Method isSingleValueInterface returns true if the interface is a single value port.
 void unbindProvider(RuntimeSource aProvider)
          unbinds an interface and source value.
 void unbindValue()
          sets the value of an interface to null.
 void update()
          reexecutes all triggers associated to the interface.
 
Methods inherited from interface org.objectweb.kilim.model.ComponentSource
getValue, hasValue
 
Methods inherited from interface org.objectweb.kilim.model.ComponentElement
getContainingComponent, getContainingElement, getElementDescription, getLocalName, getQualifiedName, getTemplateDefHierarchy
 

Method Detail

isSingleValuePort

public boolean isSingleValuePort()
Method isSingleValueInterface returns true if the interface is a single value port. It returns flase otherwise.

Returns:
boolean

isCollectionPort

public boolean isCollectionPort()
returns true if the interface is a collection port. It returns false otherwise.

Returns:
boolean

isProperty

public boolean isProperty()
returns true if the interface is a property. It returns false otherwise.

Returns:
boolean

isProvider

public boolean isProvider()
returns true if the interface is a provider (i.e. an unbuffered value source).

Returns:
boolean

bindProvider

public void bindProvider(RuntimeSource aProvider,
                         boolean jReplace)
                  throws KilimException
binds an interface to a value source. This method has a behaviour which depends on the exact kind

Parameters:
aProvider - : the value source.
jReplace - : bindProvider applied to a single value port having already a provider generates a warning if jReplace is false. It silently replaces the existing value if jReplace is true.
Throws:
KilimException - : generated if aProvider is null.

unbindProvider

public void unbindProvider(RuntimeSource aProvider)
                    throws KilimException
unbinds an interface and source value.

Parameters:
aProvider - : the source value to be unbound.
Throws:
KilimException - : generated if aProvider is null or is not bound to the interface.

isModified

public boolean isModified()
                   throws KilimException
Method isModified.

Returns:
boolean
Throws:
KilimException - :

bindValue

public void bindValue(java.lang.Object aValue)
               throws KilimException
assigns a value to an interface. If a value has already been associated to the interface, "unbind" triggers are executed prior to the new value assignment. Bind triggers are then executed.

Parameters:
aValue - : the value to be assigned to the interface.
Throws:
KilimException - : generated when applied to a provider

unbindValue

public void unbindValue()
                 throws KilimException
sets the value of an interface to null. Unbind triggers are executed (using the value stored in the interface prior to the unbind operation).

Throws:
KilimException - :

update

public void update()
            throws KilimException
reexecutes all triggers associated to the interface.

Throws:
KilimException - :