Package fr.paris.lutece.util.bean
Class BeanUtil
- java.lang.Object
-
- fr.paris.lutece.util.bean.BeanUtil
-
public final class BeanUtil extends java.lang.ObjectBean Utils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>convertMap(java.util.Map<java.lang.String,java.lang.String[]> mapInput)Convert map by casifying parameters names.static java.lang.StringconvertUnderscores(java.lang.String strSource)Remove underscore and set the next letter in capsstatic voidinit()BeanUtil initialization, considering Lutèce availables locales and date format propertiesstatic voidpopulate(java.lang.Object bean, javax.servlet.http.HttpServletRequest request)Populate a bean using parameters in http requeststatic voidpopulate(java.lang.Object bean, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)Populate a bean using parameters in http request, with locale date format controls
-
-
-
Method Detail
-
init
public static void init()
BeanUtil initialization, considering Lutèce availables locales and date format properties
-
populate
public static void populate(java.lang.Object bean, javax.servlet.http.HttpServletRequest request)Populate a bean using parameters in http request- Parameters:
bean-request-
-
populate
public static void populate(java.lang.Object bean, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)Populate a bean using parameters in http request, with locale date format controls- Parameters:
bean- bean to populaterequest- http requestlocale-
-
convertMap
public static java.util.Map<java.lang.String,java.lang.Object> convertMap(java.util.Map<java.lang.String,java.lang.String[]> mapInput)
Convert map by casifying parameters names.- Parameters:
mapInput- The input map- Returns:
- The output map
-
convertUnderscores
public static java.lang.String convertUnderscores(java.lang.String strSource)
Remove underscore and set the next letter in caps- Parameters:
strSource- The source- Returns:
- The converted string
-
-