fr.paris.lutece.portal.util.mvc.admin
Class MVCAdminJspBean

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.portal.util.mvc.admin.MVCAdminJspBean
All Implemented Interfaces:
Serializable

public abstract class MVCAdminJspBean
extends fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean

MVC Admin JspBean implementation let use MVC model to develop admin feature.

See Also:
Serialized Form

Constructor Summary
MVCAdminJspBean()
           
 
Method Summary
protected  void fillCommons(Map<String,Object> model)
          Fill the model with commons objects used in templates
protected  String getActionUrl(String strAction)
          Get Action URL
protected  String getControllerJsp()
          Return the JSP name used as controller
protected  String getControllerPath()
          Return the path of the JSP used as controller
protected  Map<String,Object> getModel()
          Get a model Object filled with default values
protected  String getPage(String strTemplate)
          Return the page content
protected  String getPage(String strPageTitleProperty, String strTemplate)
          Return the page content
protected  String getPage(String strPageTitleProperty, String strTemplate, Map<String,Object> model)
          Return the page content
protected  String getViewFullUrl(String strView)
          Gets the view URL with the JSP path
protected  String getViewUrl(String strView)
          Get a View URL
 String processController(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process request as a controller
protected  String redirect(javax.servlet.http.HttpServletRequest request, String strTarget)
          Redirect to requested page
protected  String redirect(javax.servlet.http.HttpServletRequest request, String strView, String strParameter, int nValue)
          Redirect to an url defined by given parameters
protected  String redirect(javax.servlet.http.HttpServletRequest request, String strView, String strParameter1, int nValue1, String strParameter2, int nValue2)
          Redirect to an url defined by given parameters
protected  String redirectView(javax.servlet.http.HttpServletRequest request, String strView)
          Redirect to requested view
protected
<T> boolean
validateBean(T bean, String strPrefix)
          Validate a bean
 
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, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MVCAdminJspBean

public MVCAdminJspBean()
Method Detail

processController

public String processController(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws fr.paris.lutece.portal.service.admin.AccessDeniedException
Process request as a controller

Parameters:
request - The HTTP request
response - The HTTP response
Returns:
The page content
Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedException - If the user's has no right

fillCommons

protected void fillCommons(Map<String,Object> model)
Fill the model with commons objects used in templates

Parameters:
model - The model

getModel

protected Map<String,Object> getModel()
Get a model Object filled with default values

Returns:
The model

getPage

protected String getPage(String strTemplate)
Return the page content

Parameters:
strTemplate - The template
Returns:
The page

getPage

protected String getPage(String strPageTitleProperty,
                         String strTemplate)
Return the page content

Parameters:
strPageTitleProperty - The page title property
strTemplate - The template
Returns:
The page

getPage

protected String getPage(String strPageTitleProperty,
                         String strTemplate,
                         Map<String,Object> model)
Return the page content

Parameters:
strPageTitleProperty - The page title property
strTemplate - The template
model - The model
Returns:
The page

validateBean

protected <T> boolean validateBean(T bean,
                                   String strPrefix)
Validate a bean

Type Parameters:
T - The bean class
Parameters:
bean - The bean
strPrefix - The prefix
Returns:
true if validated otherwise false

getControllerJsp

protected String getControllerJsp()
Return the JSP name used as controller

Returns:
The JSP name

getControllerPath

protected String getControllerPath()
Return the path of the JSP used as controller

Returns:
The controller path

redirect

protected String redirect(javax.servlet.http.HttpServletRequest request,
                          String strTarget)
Redirect to requested page

Parameters:
request - the http request
strTarget - the targeted page
Returns:
null. The page should be redirected

redirect

protected String redirect(javax.servlet.http.HttpServletRequest request,
                          String strView,
                          String strParameter,
                          int nValue)
Redirect to an url defined by given parameters

Parameters:
request - The HTTP request
strView - The View name
strParameter - The additional parameter
nValue - The additional parameter's value
Returns:
The redirection result

redirect

protected String redirect(javax.servlet.http.HttpServletRequest request,
                          String strView,
                          String strParameter1,
                          int nValue1,
                          String strParameter2,
                          int nValue2)
Redirect to an url defined by given parameters

Parameters:
request - The HTTP request
strView - The View name
strParameter1 - The first additional parameter
nValue1 - The first additional parameter's value
strParameter2 - The second additionnal parameter
nValue2 - The second additionnal parameter's value
Returns:
The redirection result

redirectView

protected String redirectView(javax.servlet.http.HttpServletRequest request,
                              String strView)
Redirect to requested view

Parameters:
request - the http request
strView - the targeted view
Returns:
The redirection result

getViewUrl

protected String getViewUrl(String strView)
Get a View URL

Parameters:
strView - The view name
Returns:
The URL

getViewFullUrl

protected String getViewFullUrl(String strView)
Gets the view URL with the JSP path

Parameters:
strView - The view
Returns:
The URL

getActionUrl

protected String getActionUrl(String strAction)
Get Action URL

Parameters:
strAction - The view name
Returns:
The URL


Copyright © 2013 Mairie de Paris. All Rights Reserved.