fr.paris.lutece.plugins.stock.modules.billetterie.web
Class AbstractJspBean

java.lang.Object
  extended by fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
      extended by fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
          extended by fr.paris.lutece.plugins.stock.modules.billetterie.web.AbstractJspBean
Direct Known Subclasses:
CategoryJspBean, NotificationJspBean, OfferJspBean, PartnerJspBean, PurchaseJspBean, ShowJspBean, StatisticJspBean

public class AbstractJspBean
extends fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean

Abstract class for jsp bean

Author:
abataille

Field Summary
protected  int _nItemsPerPage
           
protected static java.lang.String ERROR_MESSAGE_KEY
           
protected static java.lang.String ERROR_TEMPLATE
           
protected static java.lang.String FIELD_MESSAGE_PREFIX
           
protected static java.lang.String MARK_FILTER
           
protected static java.lang.String MARK_MESSAGE_LIST
           
protected static java.lang.String MARK_NB_ITEMS_PER_PAGE
           
protected static java.lang.String MARK_PAGINATOR
           
static int N_DEFAULT_ITEMS_PER_PAGE
           
 
Constructor Summary
AbstractJspBean()
           
 
Method Summary
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  java.lang.String getHtmlError(fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e)
          Return html code for error message
protected  java.lang.String getMessage(java.lang.String key)
          Return localized message
protected  java.lang.String getMessage(java.lang.String key, java.lang.String... args)
          Return localized message with args
protected  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
<T> fr.paris.lutece.util.html.DelegatePaginator<T>
getPaginator(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.stock.commons.ResultList<T> list)
          Return a paginator for the view using parameter in http request.
protected  java.lang.String manageFunctionnalException(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e, java.lang.String targetUrl)
          Manage functionnal exception.
protected
<T> void
validate(T bean)
          Validate a bean using jsr 303 specs.
 
Methods inherited from class fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
getPlugin, init
 
Methods inherited from class fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
getAdminPage, getFeatureIcon, getHomeUrl, getLocale, getPageTitle, getUser, populate, setFeatureIcon, setPageTitleProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

N_DEFAULT_ITEMS_PER_PAGE

public static final int N_DEFAULT_ITEMS_PER_PAGE

ERROR_MESSAGE_KEY

protected static final java.lang.String ERROR_MESSAGE_KEY
See Also:
Constant Field Values

ERROR_TEMPLATE

protected static final java.lang.String ERROR_TEMPLATE
See Also:
Constant Field Values

FIELD_MESSAGE_PREFIX

protected static final java.lang.String FIELD_MESSAGE_PREFIX
See Also:
Constant Field Values

MARK_FILTER

protected static final java.lang.String MARK_FILTER
See Also:
Constant Field Values

MARK_MESSAGE_LIST

protected static final java.lang.String MARK_MESSAGE_LIST
See Also:
Constant Field Values

MARK_NB_ITEMS_PER_PAGE

protected static final java.lang.String MARK_NB_ITEMS_PER_PAGE
See Also:
Constant Field Values

MARK_PAGINATOR

protected static final java.lang.String MARK_PAGINATOR
See Also:
Constant Field Values

_nItemsPerPage

protected int _nItemsPerPage
Constructor Detail

AbstractJspBean

public AbstractJspBean()
Method Detail

getPaginator

protected <T> fr.paris.lutece.util.html.DelegatePaginator<T> getPaginator(javax.servlet.http.HttpServletRequest request,
                                                                          fr.paris.lutece.plugins.stock.commons.ResultList<T> list)
Return a paginator for the view using parameter in http request.

Type Parameters:
T - the generic type
Parameters:
request - http request
list - bean list to paginate
Returns:
paginator

getPaginationProperties

protected 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

Parameters:
request - http request
Returns:
paginator

validate

protected <T> void validate(T bean)
                 throws fr.paris.lutece.plugins.stock.commons.exception.ValidationException
Validate a bean using jsr 303 specs.

Type Parameters:
T - the bean type
Parameters:
bean - to validate
Throws:
fr.paris.lutece.plugins.stock.commons.exception.ValidationException - exception containing informations about errors and the bean

getMessage

protected java.lang.String getMessage(java.lang.String key)
Return localized message

Parameters:
key - i18n key
Returns:
localized message

getMessage

protected java.lang.String getMessage(java.lang.String key,
                                      java.lang.String... args)
Return localized message with args

Parameters:
key - i18n key
args - args
Returns:
localized message

getErrorOnce

protected fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException getErrorOnce(javax.servlet.http.HttpServletRequest request)
Get validation error from session and remove from it

Parameters:
request - http request
Returns:
validation exception

getHtmlError

protected java.lang.String getHtmlError(fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e)
Return html code for error message

Parameters:
e - functionnal exception
Returns:
html

manageFunctionnalException

protected java.lang.String manageFunctionnalException(javax.servlet.http.HttpServletRequest request,
                                                      fr.paris.lutece.plugins.stock.commons.exception.FunctionnalException e,
                                                      java.lang.String targetUrl)
Manage functionnal exception. Save it into session

Parameters:
request - the request
e - the e
targetUrl - the target url
Returns:
the string


Copyright © 2012 Mairie de Paris. All Rights Reserved.