|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.mvc.MVCApplication
public abstract class MVCApplication
MVC XPage Application
Constructor Summary | |
---|---|
MVCApplication()
|
Method Summary | ||
---|---|---|
protected void |
addError(String strMessage)
Add an error message |
|
protected void |
addError(String strMessageKey,
Locale locale)
Add an error message |
|
protected void |
addInfo(String strMessage)
Add an info message |
|
protected void |
addInfo(String strMessageKey,
Locale locale)
Add an info message |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
download(byte[] data,
String strFilename,
String strContentType)
Initiates a download of a byte array |
|
fr.paris.lutece.portal.web.xpages.XPage |
download(String strData,
String strFilename,
String strContentType)
Initiates a file download |
|
protected void |
fillCommons(Map<String,Object> model)
Fill the model with commons objects used in templates |
|
protected String |
getAction(javax.servlet.http.HttpServletRequest request)
Get the action parameter or any parameter with the prefix 'action_' |
|
protected String |
getActionUrl(String strAction)
Get Action URL |
|
protected String |
getDefaultPagePath(Locale locale)
Returns the default page path |
|
protected String |
getDefaultPageTitle(Locale locale)
Returns the default page title |
|
protected Locale |
getLocale(javax.servlet.http.HttpServletRequest request)
Default getLocale() implementation. |
|
protected Map<String,Object> |
getModel()
Get a model Object filled with default values |
|
fr.paris.lutece.portal.web.xpages.XPage |
getPage(javax.servlet.http.HttpServletRequest request,
int nMode,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the content of the page |
|
protected String |
getView(javax.servlet.http.HttpServletRequest request)
Get the view parameter |
|
protected String |
getViewFullUrl(String strView)
Gets the view URL with the JSP path |
|
protected String |
getViewUrl(String strView)
Get a View URL |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getXPage()
Returns a new XPage object with default values |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getXPage(String strTemplate)
Returns a new XPage object with default values and the content filled by a template |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getXPage(String strTemplate,
Locale locale)
Returns a new XPage object with default values and the content filled by a template using a default model and for a given locale |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
getXPage(String strTemplate,
Locale locale,
Map<String,Object> model)
Returns a new XPage object with default values and the content filled by a template using a given model and for a given locale |
|
protected String |
getXPageName()
Returns the XPage name |
|
protected void |
populate(Object bean,
javax.servlet.http.HttpServletRequest request)
Populate a bean using parameters in http request |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
redirect(javax.servlet.http.HttpServletRequest request,
String strTarget)
Redirect to requested page |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
redirectMessageBox(javax.servlet.http.HttpServletRequest request,
MVCMessageBox messageBox)
Redirect to a Message Box page |
|
protected fr.paris.lutece.portal.web.xpages.XPage |
redirectView(javax.servlet.http.HttpServletRequest request,
String strView)
Redirect to requested view |
|
protected
|
validateBean(T bean)
Validate a bean |
|
protected
|
validateBean(T bean,
Locale locale)
Validate a bean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MVCApplication()
Method Detail |
---|
public fr.paris.lutece.portal.web.xpages.XPage getPage(javax.servlet.http.HttpServletRequest request, int nMode, fr.paris.lutece.portal.service.plugin.Plugin plugin) throws fr.paris.lutece.portal.service.message.SiteMessageException
getPage
in interface fr.paris.lutece.portal.web.xpages.XPageApplication
request
- The http requestnMode
- The current modeplugin
- The plugin object
fr.paris.lutece.portal.service.message.SiteMessageException
- Message displayed if an exception occursprotected String getView(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
protected String getAction(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
protected String getXPageName()
protected String getDefaultPageTitle(Locale locale)
locale
- The locale
protected String getDefaultPagePath(Locale locale)
locale
- The locale
protected fr.paris.lutece.portal.web.xpages.XPage getXPage()
protected fr.paris.lutece.portal.web.xpages.XPage getXPage(String strTemplate)
strTemplate
- The template
protected fr.paris.lutece.portal.web.xpages.XPage getXPage(String strTemplate, Locale locale)
strTemplate
- The templatelocale
- The locale
protected fr.paris.lutece.portal.web.xpages.XPage getXPage(String strTemplate, Locale locale, Map<String,Object> model)
strTemplate
- The templatelocale
- The localemodel
- The model
protected Map<String,Object> getModel()
protected void populate(Object bean, javax.servlet.http.HttpServletRequest request)
bean
- bean to populaterequest
- http requestprotected <T> boolean validateBean(T bean)
T
- The bean classbean
- The bean
protected <T> boolean validateBean(T bean, Locale locale)
T
- The bean classbean
- The beanlocale
- The locale
protected void addError(String strMessage)
strMessage
- The messageprotected void addError(String strMessageKey, Locale locale)
strMessageKey
- The messagelocale
- The localeprotected void addInfo(String strMessage)
strMessage
- The messageprotected void addInfo(String strMessageKey, Locale locale)
strMessageKey
- The message keylocale
- The localeprotected void fillCommons(Map<String,Object> model)
model
- The modelprotected fr.paris.lutece.portal.web.xpages.XPage redirect(javax.servlet.http.HttpServletRequest request, String strTarget)
request
- the http requeststrTarget
- the targeted page
protected fr.paris.lutece.portal.web.xpages.XPage redirectView(javax.servlet.http.HttpServletRequest request, String strView)
request
- the http requeststrView
- the targeted view
protected String getViewUrl(String strView)
strView
- The view name
protected String getViewFullUrl(String strView)
strView
- The view
protected String getActionUrl(String strAction)
strAction
- The view name
public fr.paris.lutece.portal.web.xpages.XPage download(String strData, String strFilename, String strContentType)
strData
- Data of the file to downloadstrFilename
- Name of filestrContentType
- content type to set to the response
protected fr.paris.lutece.portal.web.xpages.XPage download(byte[] data, String strFilename, String strContentType)
data
- Data to downloadstrFilename
- Name of the downloaded filestrContentType
- Content type to set to the response
protected fr.paris.lutece.portal.web.xpages.XPage redirectMessageBox(javax.servlet.http.HttpServletRequest request, MVCMessageBox messageBox)
request
- The HTTP requestmessageBox
- The MessageBox infos
protected Locale getLocale(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |