fr.paris.lutece.plugins.form.utils
Class FormUtils

java.lang.Object
  extended by fr.paris.lutece.plugins.form.utils.FormUtils

public final class FormUtils
extends java.lang.Object

class FormUtils


Field Summary
static java.lang.String EMPTY_STRING
           
 
Method Summary
static IEntry createEntryByType(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          return an instance of IEntry function of type entry
static Field findFieldByIdInTheList(int nIdField, java.util.List<Field> listField)
          return the field which key is specified in parameter
static java.sql.Timestamp getCurrentDate()
          return current date
static java.sql.Timestamp getDate(java.lang.String strDate, java.util.Locale locale)
          return a timestamp Object which correspond with the string specified in parameter.
static void getHtmlEntry(IEntry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.StringBuffer stringBuffer, java.util.Locale locale)
           
static int getIndexEntryInTheEntryList(int nIdEntry, java.util.List<IEntry> listEntry)
          return the index in the list of the entry whose key is specified in parameter
static int getIndexFieldInTheFieldList(int nIdField, java.util.List<Field> listField)
          return the index in the list of the field whose key is specified in parameter
static FormError getResponseEntry(javax.servlet.http.HttpServletRequest request, IEntry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin, FormResponse formResponse, boolean bResponseNull, java.util.Locale locale)
           
 void sendMail(Form form, fr.paris.lutece.portal.business.user.AdminUser user)
          sendMail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values
Method Detail

sendMail

public void sendMail(Form form,
                     fr.paris.lutece.portal.business.user.AdminUser user)
sendMail

Parameters:
form - the form
user - the user

getDate

public static java.sql.Timestamp getDate(java.lang.String strDate,
                                         java.util.Locale locale)
return a timestamp Object which correspond with the string specified in parameter.

Parameters:
strDate - the date who must convert
locale - the locale
Returns:
a timestamp Object which correspond with the string specified in parameter.

getCurrentDate

public static java.sql.Timestamp getCurrentDate()
return current date

Returns:
return current date

createEntryByType

public static IEntry createEntryByType(javax.servlet.http.HttpServletRequest request,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
return an instance of IEntry function of type entry

Parameters:
request - the request
plugin - the plugin
Returns:
an instance of IEntry function of type entry

getIndexEntryInTheEntryList

public static int getIndexEntryInTheEntryList(int nIdEntry,
                                              java.util.List<IEntry> listEntry)
return the index in the list of the entry whose key is specified in parameter

Parameters:
nIdEntry - the key of the entry
listEntry - the list of the entry
Returns:
the index in the list of the entry whose key is specified in parameter

getIndexFieldInTheFieldList

public static int getIndexFieldInTheFieldList(int nIdField,
                                              java.util.List<Field> listField)
return the index in the list of the field whose key is specified in parameter

Parameters:
nIdField - the key of the field
listField - the list of field
Returns:
the index in the list of the field whose key is specified in parameter

getHtmlEntry

public static void getHtmlEntry(IEntry entry,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                java.lang.StringBuffer stringBuffer,
                                java.util.Locale locale)
Parameters:
entry - the entry which html code must be insert in the stringBuffer
plugin - the plugin
stringBuffer - the buffer which contains the html code
locale - the locale

getResponseEntry

public static FormError getResponseEntry(javax.servlet.http.HttpServletRequest request,
                                         IEntry entry,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                         FormResponse formResponse,
                                         boolean bResponseNull,
                                         java.util.Locale locale)
Parameters:
entry - the entry which html code must be insert in the stringBuffer
plugin - the plugin
stringBuffer - the buffer which contains the html code
locale - the locale

findFieldByIdInTheList

public static Field findFieldByIdInTheList(int nIdField,
                                           java.util.List<Field> listField)
return the field which key is specified in parameter

Parameters:
nIdField - the id of the field who is search
listField - the list of field
Returns:
the field which key is specified in parameter


Copyright © 2007 Mairie de Paris. All Rights Reserved.