Package org.opennms.web.api
Class RestUtils
- java.lang.Object
-
- org.opennms.web.api.RestUtils
-
public abstract class RestUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconvertNameToPropertyName(String name)Convert a column name with underscores to the corresponding property name using "camel case".static voidsetBeanProperties(Object bean, javax.ws.rs.core.MultivaluedMap<String,String> properties)Use Spring'sPropertyAccessorFactoryto set values on the specified bean.
-
-
-
Method Detail
-
setBeanProperties
public static void setBeanProperties(Object bean, javax.ws.rs.core.MultivaluedMap<String,String> properties)
Use Spring's
PropertyAccessorFactoryto set values on the specified bean. This call registers severalPropertyEditorclasses to properly convert values.- Parameters:
bean-properties-
-
convertNameToPropertyName
public static String convertNameToPropertyName(String name)
Convert a column name with underscores to the corresponding property name using "camel case". A name like "customer_number" would match a "customerNumber" property name.- Parameters:
name- the column name to be converted- Returns:
- the name using "camel case"
-
-