public abstract class AbstractXPageApp extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PAGE_INDEX |
static String |
DEFAULT_RESULTS_PER_PAGE |
static String |
PARAMETER_NB_ITEMS_PER_PAGE |
static String |
PROPERTY_RESULTS_PER_PAGE |
| Constructor and Description |
|---|
AbstractXPageApp() |
| Modifier and Type | Method and Description |
|---|---|
protected fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException |
getErrorOnce(javax.servlet.http.HttpServletRequest request)
Get validation error from session and remove from it
|
protected String |
getHtmlError(fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e,
javax.servlet.http.HttpServletRequest request)
Return html code for error message.
|
static fr.paris.lutece.portal.service.security.LuteceUser |
getLuteceUserAuthentication(javax.servlet.http.HttpServletRequest request) |
protected String |
getMessage(String key,
javax.servlet.http.HttpServletRequest request)
Return localized message.
|
protected String |
getMessage(String key,
javax.servlet.http.HttpServletRequest request,
String... args)
Return localized message with args.
|
protected static fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties |
getPaginationProperties(javax.servlet.http.HttpServletRequest request)
Return a bean for pagination in service/dao using parameter in http request
|
protected fr.paris.lutece.portal.service.security.LuteceUser |
getUser(javax.servlet.http.HttpServletRequest request)
Return authified user and throw technical exception if no user auth found.
|
protected String |
manageFunctionnalException(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e,
String targetUrl)
Manage functionnal exception.
|
protected static void |
populate(Object bean,
javax.servlet.http.HttpServletRequest request)
Populate a bean using parameters in http request
|
protected <T> void |
validate(T bean)
Validate a bean using jsr 303 specs.
|
public static final String PARAMETER_NB_ITEMS_PER_PAGE
public static final String DEFAULT_RESULTS_PER_PAGE
public static final String DEFAULT_PAGE_INDEX
public static final String PROPERTY_RESULTS_PER_PAGE
protected static void populate(Object bean, javax.servlet.http.HttpServletRequest request)
bean - bean to populaterequest - http requestprotected <T> void validate(T bean)
throws fr.paris.lutece.plugins.stock.commons.exception.ValidationException
T - the generic typebean - to validatefr.paris.lutece.plugins.stock.commons.exception.ValidationException - exception containing informations about errors and the beanprotected fr.paris.lutece.portal.service.security.LuteceUser getUser(javax.servlet.http.HttpServletRequest request)
throws fr.paris.lutece.plugins.stock.commons.exception.TechnicalException
request - http requestfr.paris.lutece.plugins.stock.commons.exception.TechnicalException - the technical exceptionprotected String getMessage(String key, javax.servlet.http.HttpServletRequest request)
key - i18n keyrequest - the requestprotected String getMessage(String key, javax.servlet.http.HttpServletRequest request, String... args)
key - i18n keyrequest - the requestargs - argsprotected String getHtmlError(fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e, javax.servlet.http.HttpServletRequest request)
e - the erequest - the requestprotected String manageFunctionnalException(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e, String targetUrl)
request - the requeste - the etargetUrl - the target urlprotected fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException getErrorOnce(javax.servlet.http.HttpServletRequest request)
request - http requestpublic static fr.paris.lutece.portal.service.security.LuteceUser getLuteceUserAuthentication(javax.servlet.http.HttpServletRequest request)
throws fr.paris.lutece.portal.service.message.SiteMessageException
fr.paris.lutece.portal.service.message.SiteMessageExceptionprotected static fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties getPaginationProperties(javax.servlet.http.HttpServletRequest request)
request - http requestCopyright © 2019 City of Paris. All rights reserved.