org.loom.util
Class PropertyUtils

java.lang.Object
  extended by org.loom.util.PropertyUtils

public class PropertyUtils
extends java.lang.Object


Constructor Summary
PropertyUtils()
           
 
Method Summary
static java.lang.String concatPropertyPath(java.lang.String... propertyNames)
          Concats properties to form a property path
static java.lang.String getLastNode(java.lang.String propertyPath)
          Returns the last node of a property path a.b.c becomes c a.b becomes b a becomes a
static java.lang.String normalize(java.lang.String propertyPath)
          Normalize a property path.
static java.lang.String removeRootNode(java.lang.String propertyPath)
          Pops the root level of a property path: a.b.c becomes b.c a.b becomes b a becomes null
static java.lang.String[] split(java.lang.String propertyPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyUtils

public PropertyUtils()
Method Detail

split

public static java.lang.String[] split(java.lang.String propertyPath)

normalize

public static java.lang.String normalize(java.lang.String propertyPath)
Normalize a property path. Normalized property paths are the only way to retrieve the correct PropertyBinder from the Map Removes all indexes from a propertyPath

Parameters:
propertyPath - the property path as is in the HttpServletRequest object, e.g. child.parent[5].name
Returns:
the propertyPath without indexes, e.g. child.parent.name
Throws:
MalformedPropertyPathException - If there is any index that misses the ending ']'

concatPropertyPath

public static java.lang.String concatPropertyPath(java.lang.String... propertyNames)
Concats properties to form a property path


removeRootNode

public static java.lang.String removeRootNode(java.lang.String propertyPath)
Pops the root level of a property path:


getLastNode

public static java.lang.String getLastNode(java.lang.String propertyPath)
Returns the last node of a property path