com.xenonsoft.bridgetown.soa.impl
Class PropertiesBeanPropertyValueResolver

java.lang.Object
  extended bycom.xenonsoft.bridgetown.soa.impl.PropertiesBeanPropertyValueResolver
All Implemented Interfaces:
IBeanPropertyValueResolver, java.io.Serializable

public class PropertiesBeanPropertyValueResolver
extends java.lang.Object
implements IBeanPropertyValueResolver, java.io.Serializable

An implementation of a bean property value resolver that evaluates the value of the bean according to a Properties. The class interprets properties if the input value is a String that matches the start and end delimiters. If the input value is not recognised the input value is returned as the output unmodified.

By default the implementation has a start delimiter of "${" and end delimiter of "}". Therefore properties are only resolved by default if there are in the form of "${Your Property Name}".

Version:
$Id: PropertiesBeanPropertyValueResolver.java,v 1.4 2005/03/17 02:37:22 peter_pilgrim Exp $
Author:
peterp, 05-Feb-2005
See Also:
Serialized Form

Field Summary
protected  java.lang.String endDelimiter
          End delimiter string
protected  java.util.Properties properties
          The properties
protected  java.lang.String startDelimiter
          Beginning delimiter string
 
Constructor Summary
PropertiesBeanPropertyValueResolver()
          The default constructor
PropertiesBeanPropertyValueResolver(java.util.Properties properties)
          The standard constructor
 
Method Summary
 java.lang.String getEndDelimiter()
          Gets the endDelimiter
 java.util.Properties getProperties()
          Gets the properties
 java.lang.String getStartDelimiter()
          Gets the startDelimiter
 java.lang.Object getValue(ValueReferenceConfig valueRef, java.lang.Object value, java.lang.String description)
          Get the evaluation value of the property value as required to set the bean property during IoC assembly.
 void setEndDelimiter(java.lang.String endDelimiter)
          Sets the endDelimiter
 void setProperties(java.util.Properties properties)
          Sets the properties
 void setStartDelimiter(java.lang.String startDelimiter)
          Sets the startDelimiter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Properties properties
The properties


startDelimiter

protected java.lang.String startDelimiter
Beginning delimiter string


endDelimiter

protected java.lang.String endDelimiter
End delimiter string

Constructor Detail

PropertiesBeanPropertyValueResolver

public PropertiesBeanPropertyValueResolver()
The default constructor


PropertiesBeanPropertyValueResolver

public PropertiesBeanPropertyValueResolver(java.util.Properties properties)
The standard constructor

Parameters:
properties - the input properties
Method Detail

getProperties

public java.util.Properties getProperties()
Gets the properties

Returns:
Returns the properties.

setProperties

public void setProperties(java.util.Properties properties)
Sets the properties

Parameters:
properties - The properties to set.

getEndDelimiter

public java.lang.String getEndDelimiter()
Gets the endDelimiter

Returns:
Returns the endDelimiter.

setEndDelimiter

public void setEndDelimiter(java.lang.String endDelimiter)
Sets the endDelimiter

Parameters:
endDelimiter - The endDelimiter to set.

getStartDelimiter

public java.lang.String getStartDelimiter()
Gets the startDelimiter

Returns:
Returns the startDelimiter.

setStartDelimiter

public void setStartDelimiter(java.lang.String startDelimiter)
Sets the startDelimiter

Parameters:
startDelimiter - The startDelimiter to set.

getValue

public java.lang.Object getValue(ValueReferenceConfig valueRef,
                                 java.lang.Object value,
                                 java.lang.String description)
Get the evaluation value of the property value as required to set the bean property during IoC assembly.

Specified by:
getValue in interface IBeanPropertyValueResolver
Parameters:
valueRef - a reference to the value reference configuration
value - the input value for the property
description - the additional description supplied the assembly factory for use in error reporting and debugging
Returns:
the output value for the property
See Also:
IBeanPropertyValueResolver.getValue(com.xenonsoft.bridgetown.soa.config.ValueReferenceConfig, java.lang.Object, java.lang.String)


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.