com.uwyn.rife.ioc
Class PropertyValueParticipant

java.lang.Object
  extended by com.uwyn.rife.ioc.PropertyValueParticipant
All Implemented Interfaces:
PropertyValue

public class PropertyValueParticipant
extends Object
implements PropertyValue

Retrieves a property value as an object from a participant.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
PropertyValueParticipant(String name, PropertyValue key)
          The constructor that stores the retrieval parameters.
 
Method Summary
 Object getValue()
          Retrieves a property value.
 String getValueString()
          Retrieves a string representation of the property value.
 boolean isNeglectable()
          Indicates whether the value provided by this instance is neglectable in a textual context.
 boolean isStatic()
          Indicates whether the value is statically fixed an not dynamically retrieved at runtime.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyValueParticipant

public PropertyValueParticipant(String name,
                                PropertyValue key)
The constructor that stores the retrieval parameters.

Parameters:
name - the participant's name
key - the key that will be used to look up the participant's object
Since:
1.0
Method Detail

getValue

public Object getValue()
                throws PropertyValueException
Description copied from interface: PropertyValue
Retrieves a property value.

Specified by:
getValue in interface PropertyValue
Returns:
the requested property value; or

null if the property value couldn't be found

Throws:
PropertyValueException - When something went wrong during the retrieval of the property value.

getValueString

public String getValueString()
                      throws PropertyValueException
Description copied from interface: PropertyValue
Retrieves a string representation of the property value.

Specified by:
getValueString in interface PropertyValue
Returns:
the requested string representation of the property value; or

null if the property value couldn't be found

Throws:
PropertyValueException - When something went wrong during the retrieval of the property value.

toString

public String toString()
Overrides:
toString in class Object

isNeglectable

public boolean isNeglectable()
Description copied from interface: PropertyValue
Indicates whether the value provided by this instance is neglectable in a textual context. This is for instance applicable to pure whitespace values that when trimmed, have zero length. The property construction logic will check this state to determine if it has to concatenate several property values together as one text result of only use one and discard all other neglectable ones.

Specified by:
isNeglectable in interface PropertyValue
Returns:
true if the value is neglectable in a textual context; or

false otherwise


isStatic

public boolean isStatic()
Description copied from interface: PropertyValue
Indicates whether the value is statically fixed an not dynamically retrieved at runtime.

Specified by:
isStatic in interface PropertyValue
Returns:
true if the value is static; or

false if the value is dynamically retrieved at runtime



Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.