public class EntryTypeGroupUtils extends Object
| Constructor and Description |
|---|
EntryTypeGroupUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
entryBelongIterableGroup(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Detect if an entry belong to an iterable group or not
|
static List<Integer> |
findIdEntryGroupIterable(int nIdForm)
Return the list of all id of entries from the form which allowed iterations
|
static int |
findIdGroupEntryResponse(fr.paris.lutece.plugins.genericattributes.business.Response response)
Find the identifier of the group of the entry of the response manage the case if the entry is a conditional entry.
|
static StringBuilder |
generateHtmlEntryGroup(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
boolean bDisplayFront)
Generate the html code of the current entry of type group.
|
static fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError |
getGenericAttributeEntryError(javax.servlet.http.HttpServletRequest request,
int idEntry,
int nCurrentIteration)
Return the GenericAttributeError of an entry for the current iteration
|
static StringBuilder |
getHtmlEntryGroup(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
boolean bDisplayFront,
StringBuilder sbEntryGroup,
int nbIteration)
Generate the html code for the entry of type group.
|
static void |
getHtmlGroupEntry(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
Map<String,Object> model,
boolean bDisplayFront)
Construct the Html for an Group entry
|
static StringBuilder |
getHtmlIteratedEntryGroup(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
boolean bDisplayFront)
Returns the StringBuffer containing the html code associated for the current entry which allow multiple iteration
|
static String |
getIterableEntryChildUrl(fr.paris.lutece.plugins.genericattributes.business.Entry entry,
Object objIterationNumber)
Construct the url for an entry of an iterable group for errors
|
static List<fr.paris.lutece.portal.util.mvc.utils.MVCMessage> |
getIterableGroupMessageList(Map<String,Object> model)
Return the list of MVCMessage associate to the iterable group from the model
|
static int |
getIterationNumberOfIterableEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Return the maximum number of iteration of an entry which belong to an iterable group.
|
static String |
getPatternIteratedAttributeName(int idEntry)
Construct the pattern of the attribute name for entry which allow iterations
|
static Map.Entry<Integer,Integer> |
getRemoveIterationParameter(javax.servlet.http.HttpServletRequest request)
Return the couple of the parameters for removing an iteration.
|
static void |
getResponseGroupEntry(javax.servlet.http.HttpServletRequest request,
List<fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError> listFormErrors,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
FormSubmit formSubmit,
boolean bReturnErrors,
Locale locale)
Get the response for the entry of type group
|
static boolean |
isEntryTypeGroup(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Determine if entry is of a Type Group or not.
|
static void |
manageAddingIteration(javax.servlet.http.HttpServletRequest request)
Check if the adding of an iteration to a group is authorized or not.
|
static void |
manageIterableGroupResponse(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponses,
int nIterationNumber)
Manage the response for an entry of type group which allow iteration
|
static Boolean |
manageIterationGroupErrors(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
List<fr.paris.lutece.portal.util.mvc.utils.MVCMessage> listInfosIterableGroup)
Manage the errors of iterations of a entry type group
|
static void |
manageRemoveIterationGroup(javax.servlet.http.HttpServletRequest request)
Retrieve the parameter values associated to the request for the removing of an iteration.
|
static List<fr.paris.lutece.plugins.genericattributes.business.Response> |
orderResponseList(javax.servlet.http.HttpServletRequest request,
List<fr.paris.lutece.plugins.genericattributes.business.Response> responsesList)
Reorder the list of Response with the management of the iterations and return the new list of ordered response
|
static void |
populateIterationGroup(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
int nIterationNumber,
List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponses)
Populate the map from the session with the list of response for the given entry for the specified iteration
|
static void |
populateIterationGroupMap(javax.servlet.http.HttpSession session,
int nIdForm)
Populate the iteration map of a form and set it to the session
|
static Boolean |
populateModelIterableGroupInfo(javax.servlet.http.HttpServletRequest request,
Map<String,Object> model,
fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Populate the model with informations about the iterable group (list of messages and number of iteration) and return a boolean that indicate if errors are
present or not.
|
static IterationGroup |
retrieveIterationGroup(javax.servlet.http.HttpServletRequest request,
int nIdEntry)
Retrieve the IterationGroup from the id of an iterable entry from the map store in the session
|
static Map<Integer,IterationGroup> |
retrieveIterationMap(javax.servlet.http.HttpServletRequest request)
Retrieve the map which associate for each iterable group entry identifier its IterationGroup object associated
|
public static void getHtmlGroupEntry(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
Map<String,Object> model,
boolean bDisplayFront)
request - The HttpServletRequestentry - The entrymodel - The model to populatebDisplayFront - The boolean which tell if it must be displayed in front or notpublic static StringBuilder generateHtmlEntryGroup(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront)
request - The HttpServletRequestentry - The entry type groupbDisplayFront - True if the entry will be displayed in Front Office, false if it will be displayed in Back OfficebErrorPresent - True if an error is present false otherwisepublic static StringBuilder getHtmlIteratedEntryGroup(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront)
request - The HttpServletRequestentry - The entry type groupbDisplayFront - True if the entry will be displayed in Front Office, false if it will be displayed in Back OfficenNbIterationMax - The maximum number of iteration allowed for the grouppublic static StringBuilder getHtmlEntryGroup(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront, StringBuilder sbEntryGroup, int nbIteration)
request - The HttpServletRequestentry - The entry type groupbDisplayFront - Boolean which tell if the entry is display in front or notsbEntryGroup - The stringBuilder which contains the html code of the entrypublic static void getResponseGroupEntry(javax.servlet.http.HttpServletRequest request,
List<fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError> listFormErrors,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
FormSubmit formSubmit,
boolean bReturnErrors,
Locale locale)
request - The HttpServletReqestlistFormErrors - The list of formerrorsentry - The entry to analyzeplugin - The pluginformSubmit - The formSubmitbReturnErrors - True if errors must be returnedlocale - The localepublic static Boolean manageIterationGroupErrors(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.genericattributes.business.Entry entry, List<fr.paris.lutece.portal.util.mvc.utils.MVCMessage> listInfosIterableGroup)
request - the httpServletRequestentry - the entry base of the iterationlistInfosIterableGroup - the list of all existing messagespublic static fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError getGenericAttributeEntryError(javax.servlet.http.HttpServletRequest request,
int idEntry,
int nCurrentIteration)
request - the HttpServletRequestidEntry - the id of the entrynCurrentIteration - the number of the current iterationpublic static Boolean populateModelIterableGroupInfo(javax.servlet.http.HttpServletRequest request, Map<String,Object> model, fr.paris.lutece.plugins.genericattributes.business.Entry entry)
request - The HttpServletRequestmodel - The model of the pageentry - The entry to analyzepublic static void manageIterableGroupResponse(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponses,
int nIterationNumber)
request - The HttpServletRequestentry - The entry to retrieve the values fromlistResponses - The list of existing responsespublic static List<fr.paris.lutece.plugins.genericattributes.business.Response> orderResponseList(javax.servlet.http.HttpServletRequest request, List<fr.paris.lutece.plugins.genericattributes.business.Response> responsesList)
responsesList - The list of Response to reorder for the iteration managementpublic static int findIdGroupEntryResponse(fr.paris.lutece.plugins.genericattributes.business.Response response)
FormConstants.DEFAULT_GROUP_NUMBERresponse - The response to retrieve the identifier of the group where its entry belong toFormConstants.DEFAULT_GROUP_NUMBER if the entry doesn't belong
to a grouppublic static String getPatternIteratedAttributeName(int idEntry)
idEntry - The id of the entry to construct the pattern frompublic static String getIterableEntryChildUrl(fr.paris.lutece.plugins.genericattributes.business.Entry entry, Object objIterationNumber)
entry - the entry to construct the url fromobjIterationNumber - the object representation of the iteration numberpublic static void populateIterationGroup(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.genericattributes.business.Entry entry,
int nIterationNumber,
List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponses)
request - the HttpServletRequestentry - the entry to create a new IterationResponsenIterationNumber - the iteration number to add the new IterationResponselistResponses - the list of response of the entrypublic static void populateIterationGroupMap(javax.servlet.http.HttpSession session,
int nIdForm)
session - The session to set the map insidenIdForm - The id of the form to create the iteration group frompublic static Map<Integer,IterationGroup> retrieveIterationMap(javax.servlet.http.HttpServletRequest request)
request - the HttpServletRequest to retrieve the map frompublic static IterationGroup retrieveIterationGroup(javax.servlet.http.HttpServletRequest request, int nIdEntry)
request - The httpServletRequest to retrieve the map from the sessionnIdEntry - The id of the entry to retrieve the IterationGroup associatepublic static boolean entryBelongIterableGroup(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
entry - The entry to analyzepublic static int getIterationNumberOfIterableEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
FormConstants.DEFAULT_ITERATION_NUMBER if
the specified entry doesn't belong to an entry.entry - The entry to retrieve the maximum number of iteration from which it belongsFormConstants.DEFAULT_ITERATION_NUMBER if it doesn't belong to an
iterable group.public static List<fr.paris.lutece.portal.util.mvc.utils.MVCMessage> getIterableGroupMessageList(Map<String,Object> model)
model - The model to retrieve the messages frompublic static boolean isEntryTypeGroup(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
entry - The entry to analyzepublic static List<Integer> findIdEntryGroupIterable(int nIdForm)
nParameterIdForm - The id of the form to retrieve the entries frompublic static void manageRemoveIterationGroup(javax.servlet.http.HttpServletRequest request)
request - The request to retrieve the parameter values from and to retrieve the session to remove the iteration from.public static Map.Entry<Integer,Integer> getRemoveIterationParameter(javax.servlet.http.HttpServletRequest request)
request - The request to retrieve the parameter frompublic static void manageAddingIteration(javax.servlet.http.HttpServletRequest request)
request - The HttpServletRequest to retrieve the data fromCopyright © 2018 City of Paris. All rights reserved.