Class RestUtils


  • public abstract class RestUtils
    extends Object
    • Constructor Detail

      • RestUtils

        public RestUtils()
    • Method Detail

      • setBeanProperties

        public static void setBeanProperties​(Object bean,
                                             javax.ws.rs.core.MultivaluedMap<String,​String> properties)

        Use Spring's PropertyAccessorFactory to set values on the specified bean. This call registers several PropertyEditor classes to properly convert values.

        • StringXmlCalendarPropertyEditor
        • ISO8601DateEditor
        • InetAddressTypeEditor
        • OnmsSeverityEditor
        • PrimaryTypeEditor
        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"