fr.paris.lutece.plugins.workflow.utils
Class WorkflowUtils

java.lang.Object
  extended by fr.paris.lutece.plugins.workflow.utils.WorkflowUtils

public final class WorkflowUtils
extends java.lang.Object

class DirectoryUtils


Field Summary
static java.lang.String CONSTANT_AND
           
static int CONSTANT_ID_NULL
           
static java.lang.String CONSTANT_WHERE
           
static java.lang.String EMPTY_STRING
           
static java.lang.String PROPERTY_SELECT_EMPTY_CHOICE
           
 
Method Summary
static void addHeaderResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String strFileName)
          write the http header in the response
static java.lang.String buildRequestWithFilter(java.lang.String strSelect, java.util.List<java.lang.String> listStrFilter, java.lang.String strOrder)
          Builds a query with filters placed in parameters
static int convertStringToInt(java.lang.String strParameter)
          convert a string to int
static java.lang.Integer[] convertStringToInt(java.lang.String[] listToConvert)
          Convert an array of Strings into an array of Integers
static java.sql.Timestamp getCurrentTimestamp()
          return current Timestamp
static fr.paris.lutece.portal.service.plugin.Plugin getPlugin()
          Get the workflow plugin
static fr.paris.lutece.util.ReferenceList getRefList(java.util.Collection listReferenceItem, boolean bWitdthEmptyChoice, java.util.Locale locale)
          return a referenceList
static fr.paris.lutece.util.ReferenceList getRefList(java.util.Collection listReferenceItem, boolean bWitdthEmptyChoice, java.lang.String strLabelEmptyChoice, java.util.Locale locale)
          return a referenceList
static java.lang.String trim(java.lang.String strParameter)
          Returns a copy of the string , with leading and trailing whitespace omitted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT_WHERE

public static final java.lang.String CONSTANT_WHERE
See Also:
Constant Field Values

CONSTANT_AND

public static final java.lang.String CONSTANT_AND
See Also:
Constant Field Values

CONSTANT_ID_NULL

public static final int CONSTANT_ID_NULL
See Also:
Constant Field Values

EMPTY_STRING

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

PROPERTY_SELECT_EMPTY_CHOICE

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

getCurrentTimestamp

public static java.sql.Timestamp getCurrentTimestamp()
return current Timestamp

Returns:
return current Timestamp

addHeaderResponse

public static void addHeaderResponse(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     java.lang.String strFileName)
write the http header in the response

Parameters:
request - the httpServletRequest
response - the http response
strFileName - the name of the file who must insert in the response

convertStringToInt

public static int convertStringToInt(java.lang.String strParameter)
convert a string to int

Parameters:
strParameter - the string parameter to convert
Returns:
the conversion

trim

public static java.lang.String trim(java.lang.String strParameter)
Returns a copy of the string , with leading and trailing whitespace omitted.

Parameters:
strParameter - the string parameter to convert
Returns:
null if the strParameter is null other return with leading and trailing whitespace omitted.

buildRequestWithFilter

public static java.lang.String buildRequestWithFilter(java.lang.String strSelect,
                                                      java.util.List<java.lang.String> listStrFilter,
                                                      java.lang.String strOrder)
Builds a query with filters placed in parameters

Parameters:
strSelect - the select of the query
listStrFilter - the list of filter to add in the query
strOrder - the order by of the query
Returns:
a query

getRefList

public static fr.paris.lutece.util.ReferenceList getRefList(java.util.Collection listReferenceItem,
                                                            boolean bWitdthEmptyChoice,
                                                            java.util.Locale locale)
return a referenceList

Parameters:
listReferenceItem - a list of referenc Item
bWitdthEmptyChoice - true if a empty item must be insert in the reference list
locale - the locale
Returns:
referencelist

getRefList

public static fr.paris.lutece.util.ReferenceList getRefList(java.util.Collection listReferenceItem,
                                                            boolean bWitdthEmptyChoice,
                                                            java.lang.String strLabelEmptyChoice,
                                                            java.util.Locale locale)
return a referenceList

Parameters:
listReferenceItem - a list of referenc Item
bWitdthEmptyChoice - true if a empty item must be insert in the reference list
strLabelEmptyChoice - the empty choice label
locale - the locale
Returns:
referencelist

getPlugin

public static fr.paris.lutece.portal.service.plugin.Plugin getPlugin()
Get the workflow plugin

Returns:
the workflow plugin

convertStringToInt

public static java.lang.Integer[] convertStringToInt(java.lang.String[] listToConvert)
Convert an array of Strings into an array of Integers

Parameters:
listToConvert - the list to convert
Returns:
an array of Integers


Copyright © 2012 Mairie de Paris. All Rights Reserved.