org.kuali.spring.util
Class PropertiesConverter

java.lang.Object
  extended by org.kuali.spring.util.PropertiesConverter

public class PropertiesConverter
extends Object


Field Summary
static boolean DEFAULT_IS_SORT
           
(package private)  org.slf4j.Logger logger
           
(package private)  PropertyLogger plogger
           
(package private)  boolean sort
           
 
Constructor Summary
PropertiesConverter()
           
 
Method Summary
 void convert(Properties properties)
          Perform any conversion on the supplied Properties as needed.
protected  String convert(String originalValue)
          Convert the given property value from the properties source to the value which should be used.
protected  String convert(String propertyName, String propertyValue)
          Convert the given property from the properties source to the value which should be used.
 PropertyLogger getPlogger()
           
 boolean isSort()
           
 void setPlogger(PropertyLogger plogger)
           
 void setSort(boolean sort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

final org.slf4j.Logger logger

DEFAULT_IS_SORT

public static final boolean DEFAULT_IS_SORT
See Also:
Constant Field Values

sort

boolean sort

plogger

PropertyLogger plogger
Constructor Detail

PropertiesConverter

public PropertiesConverter()
Method Detail

convert

public void convert(Properties properties)
Perform any conversion on the supplied Properties as needed.

The default implementation invokes convert(String,String) for each property value and replaces the original with the converted value if the converted value is different

Parameters:
properties - the Properties to convert

convert

protected String convert(String propertyName,
                         String propertyValue)
Convert the given property from the properties source to the value which should be used.

The default implementation calls convert(String).

Parameters:
propertyName - the name of the property
propertyValue - the original value from the properties source
Returns:
the converted value, to be used for processing
See Also:
convert(String)

convert

protected String convert(String originalValue)
Convert the given property value from the properties source to the value which should be used.

The default implementation simply returns the original value. Can be overridden in subclasses, for example to detect encrypted values and decrypt them accordingly.

Parameters:
originalValue - the original value from the properties source
Returns:
the converted value, to be used for processing
See Also:
convert(String, String)

isSort

public boolean isSort()

setSort

public void setSort(boolean sort)

getPlogger

public PropertyLogger getPlogger()

setPlogger

public void setPlogger(PropertyLogger plogger)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.