org.objectweb.kilim.model
Class RtComponentProvider

java.lang.Object
  extended byorg.objectweb.kilim.model.RtComponentElement
      extended byorg.objectweb.kilim.model.RtComponentSource
          extended byorg.objectweb.kilim.model.RtComponentInterface
              extended byorg.objectweb.kilim.model.RtComponentProvider
All Implemented Interfaces:
ComponentElement, ComponentInterface, ComponentSource, RuntimeElement, RuntimeSource
Direct Known Subclasses:
ComponentFactory.RTClassSource, ComponentFactory.RTConstructor, ComponentFactory.RTGetter, ComponentFactory.RTMethod, ComponentFactory.RTNullElement

public abstract class RtComponentProvider
extends RtComponentInterface

Author:
horn

Field Summary
protected static java.util.Stack callStack
           
private  java.lang.Object source
           
private  RuntimeSource support
           
 
Fields inherited from class org.objectweb.kilim.model.RtComponentInterface
fW, pW
 
Fields inherited from class org.objectweb.kilim.model.RtComponentSource
knownValues, mapper, mappingContext, svpStack
 
Fields inherited from class org.objectweb.kilim.model.RtComponentElement
nbComponent, nbElement
 
Constructor Summary
protected RtComponentProvider(TemplateElementImpl aElement, ContainerElement aComponent, RuntimeSource aSupport)
          The public constructor for RtComponentProvider.
 
Method Summary
 void bindProvider(RuntimeSource aSource, boolean jReplace)
          binds an interface to a runtime source.
 java.lang.Object getEventSourceValue()
          Method gets the EventSourceValue.
 int getKind()
          Method getKind.
 java.lang.String getLocalName()
          returns the local name of the component element.
 RuntimeSource getSupport()
          returns the support of the provider.
 boolean isCollectionPort()
          returns true if the interface is a collection port.
 boolean isEventSource()
          returns whether the source is an event source..
 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 setEventSourceValue(java.lang.Object aSource)
          sets the EventSourceValue.
protected  void specificBindValue(java.lang.Object aValue)
          Method specificBindValue.
protected  void specificUnbindValue()
          Method specificUnbindValue.
 void unbindProvider(RuntimeSource aSource)
          unbinds an interface from a runtime source.
 
Methods inherited from class org.objectweb.kilim.model.RtComponentInterface
addTrigger, bindValue, fireTriggers, getTriggerList, getTriggers, getValue, initializeInstanciation, isModified, removeTrigger, setTriggersDone, specificGetValue, triggersDone, unbindValue, update
 
Methods inherited from class org.objectweb.kilim.model.RtComponentSource
addInterfaceListener, evaluationPerformed, getCurrentSVP, getInterfaceListeners, removeInterfaceListener
 
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.ComponentSource
hasValue
 
Methods inherited from interface org.objectweb.kilim.model.ComponentElement
getContainingComponent, getContainingElement, getElementDescription, getQualifiedName, getTemplateDefHierarchy
 
Methods inherited from interface org.objectweb.kilim.model.RuntimeSource
addInterfaceListener, checkValue, getTarget, hasValue, removeInterfaceListener
 

Field Detail

callStack

protected static java.util.Stack callStack

support

private RuntimeSource support

source

private java.lang.Object source
Constructor Detail

RtComponentProvider

protected RtComponentProvider(TemplateElementImpl aElement,
                              ContainerElement aComponent,
                              RuntimeSource aSupport)
The public constructor for RtComponentProvider.

Parameters:
aElement - : the template description associated to the element
aComponent - : the component containing the provider (it is either a component or a slot).
aSupport - : the support of the provider, i.e. source supporting the method, the constructor, the getter, .... associated to the provider.
Method Detail

getLocalName

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

Returns:
String
See Also:
ComponentElement.getLocalName()

isEventSource

public boolean isEventSource()
Description copied from interface: RuntimeSource
returns whether the source is an event source..

Specified by:
isEventSource in interface RuntimeSource
Overrides:
isEventSource in class RtComponentInterface
See Also:
RuntimeSource.isEventSource()

getEventSourceValue

public java.lang.Object getEventSourceValue()
                                     throws KilimException
Description copied from interface: RuntimeSource
Method gets the EventSourceValue.

Specified by:
getEventSourceValue in interface RuntimeSource
Overrides:
getEventSourceValue in class RtComponentInterface
Throws:
KilimException
See Also:
org.objectweb.kilim.model.RuntimeSource#getEventSource()

setEventSourceValue

public void setEventSourceValue(java.lang.Object aSource)
                         throws KilimException
Description copied from interface: RuntimeSource
sets the EventSourceValue.

Specified by:
setEventSourceValue in interface RuntimeSource
Overrides:
setEventSourceValue in class RtComponentInterface
Throws:
KilimException
See Also:
org.objectweb.kilim.model.RuntimeSource#setEventSource(Object)

getSupport

public RuntimeSource getSupport()
returns the support of the provider.

Returns:
RuntimeSource

bindProvider

public void bindProvider(RuntimeSource aSource,
                         boolean jReplace)
                  throws KilimException
Description copied from class: RtComponentInterface
binds an interface to a runtime source.

Specified by:
bindProvider in interface ComponentInterface
Specified by:
bindProvider in class RtComponentInterface
Parameters:
aSource - : the value source to be bound.
jReplace - : true if replacement is allowed.
Throws:
KilimException - : generated if aProvider is null, if the interface is already bound and jReplace is false.
See Also:
RtComponentInterface.bindProvider(RuntimeSource, boolean)

unbindProvider

public void unbindProvider(RuntimeSource aSource)
                    throws KilimException
Description copied from class: RtComponentInterface
unbinds an interface from a runtime source.

Specified by:
unbindProvider in interface ComponentInterface
Specified by:
unbindProvider in class RtComponentInterface
Parameters:
aSource - : the source value to be unbound.
Throws:
KilimException - : generated if aProvider is null or if the interface is not bound to aProvider.
See Also:
RtComponentInterface.unbindProvider(RuntimeSource)

isSingleValuePort

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

Returns:
boolean
See Also:
org.objectweb.kilim.model.ComponentInterface#isSingleValueInterface()

isCollectionPort

public boolean isCollectionPort()
Description copied from interface: ComponentInterface
returns true if the interface is a collection port. It returns false otherwise.

Returns:
boolean
See Also:
org.objectweb.kilim.model.ComponentInterface#isCollectionInterface()

isProvider

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

Returns:
boolean
See Also:
ComponentInterface.isProvider()

isProperty

public boolean isProperty()
Description copied from interface: ComponentInterface
returns true if the interface is a property. It returns false otherwise.

Returns:
boolean
See Also:
ComponentInterface.isProperty()

specificBindValue

protected void specificBindValue(java.lang.Object aValue)
                          throws KilimException
Description copied from class: RtComponentInterface
Method specificBindValue.

Specified by:
specificBindValue in class RtComponentInterface
Parameters:
aValue - :
Throws:
KilimException - :
See Also:
RtComponentInterface.specificBindValue(Object)

specificUnbindValue

protected void specificUnbindValue()
                            throws KilimException
Description copied from class: RtComponentInterface
Method specificUnbindValue.

Specified by:
specificUnbindValue in class RtComponentInterface
Throws:
KilimException - :
See Also:
RtComponentInterface.specificUnbindValue()

getKind

public int getKind()
Method getKind. This method returns the kind of the provider.

Returns:
int