org.objectweb.kilim.model
Class RtComponentProperty

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.RtComponentProperty
All Implemented Interfaces:
ComponentElement, ComponentInterface, ComponentProperty, ComponentSource, RuntimeElement, RuntimeSource

public class RtComponentProperty
extends RtComponentInterface
implements ComponentProperty

Author:
horn

Field Summary
private static java.lang.Object UNSET
           
private  boolean used
           
private  java.lang.Object value
           
 
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
RtComponentProperty(TemplateElementImpl aElement, Component aComponent)
          The public constructor for RtComponentProperties.
 
Method Summary
 void bindProvider(RuntimeSource aSource, boolean jReplace)
          binds an interface to a value source.
 boolean checkValue(java.util.Stack exclude)
          returns whether a value can be obtained without having to create new objects
 java.lang.Object getEventSourceValue()
          Method gets the EventSourceValue.
 java.lang.String getLocalName()
          returns the local name of the component element.
 boolean hasValue()
          returns whether a value has been evaluated and stored in the source.
 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.
 void setValue(java.lang.Object aValue)
          sets the value of a property.
protected  void specificBindValue(java.lang.Object aValue)
          Method specificBindValue.
protected  java.lang.Object specificGetValue()
          Method specificGetValue.
protected  void specificUnbindValue()
          Method specificUnbindValue.
 void unbindProvider(RuntimeSource aSource)
          unbinds an interface and source value.
 
Methods inherited from class org.objectweb.kilim.model.RtComponentInterface
addTrigger, bindValue, fireTriggers, getTriggerList, getTriggers, getValue, initializeInstanciation, isModified, removeTrigger, setTriggersDone, 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.ComponentInterface
bindValue, isModified, unbindValue, update
 
Methods inherited from interface org.objectweb.kilim.model.ComponentSource
getValue
 
Methods inherited from interface org.objectweb.kilim.model.ComponentElement
getContainingComponent, getContainingElement, getElementDescription, getQualifiedName, getTemplateDefHierarchy
 
Methods inherited from interface org.objectweb.kilim.model.RuntimeSource
addInterfaceListener, getTarget, removeInterfaceListener
 

Field Detail

UNSET

private static java.lang.Object UNSET

used

private boolean used

value

private java.lang.Object value
Constructor Detail

RtComponentProperty

public RtComponentProperty(TemplateElementImpl aElement,
                           Component aComponent)
The public constructor for RtComponentProperties.

Parameters:
aElement - : the template description of the property.
aComponent - : the component containing the property.
Method Detail

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()

setValue

public void setValue(java.lang.Object aValue)
              throws KilimException
sets the value of a property. It is strictly equivalent to bindValue(aValue).

Specified by:
setValue in interface ComponentProperty
Parameters:
aValue - : the value to be set.
Throws:
KilimException - : generated if the value is illegal (type mismatch, for example).

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)

bindProvider

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

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 interface: ComponentInterface
unbinds an interface and source value.

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)

specificGetValue

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

Specified by:
specificGetValue in class RtComponentInterface
Returns:
Object
Throws:
KilimException - :
See Also:
org.objectweb.kilim.model.RuntimeSource#getValue(RuntimeContext)

specificUnbindValue

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

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

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:
ComponentInterface.bindValue(Object)

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.

Specified by:
isSingleValuePort in interface ComponentInterface
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.

Specified by:
isCollectionPort in interface ComponentInterface
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).

Specified by:
isProvider in interface ComponentInterface
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.

Specified by:
isProperty in interface ComponentInterface
Returns:
boolean
See Also:
ComponentInterface.isProperty()

hasValue

public boolean hasValue()
Description copied from interface: ComponentSource
returns whether a value has been evaluated and stored in the source. The behaviour of this method is highly dependant on the real nature of the source. It always returns false when invoked on a provider.

Specified by:
hasValue in interface ComponentSource
Returns:
boolean
See Also:
org.objectweb.kilim.model.RtComponentInterface#checkValue()

checkValue

public boolean checkValue(java.util.Stack exclude)
                   throws KilimException
Description copied from interface: RuntimeSource
returns whether a value can be obtained without having to create new objects

Specified by:
checkValue in interface RuntimeSource
Parameters:
exclude - : the exclude stack contains objects beiing in the process of being built.
Returns:
boolean
Throws:
KilimException - :
See Also:
RuntimeSource.checkValue(Stack)