@Controller public class BasicController extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.core.env.Environment |
env
Environment variable reference to obtain environment specific
attributes and configurational information.
|
protected static org.slf4j.Logger |
logger
Messages and exception logging class instance.
|
protected org.springframework.context.support.ReloadableResourceBundleMessageSource |
messageSource
Locale messages resolver based on shared locale resource.
|
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpSession |
session
HttpSession reference object scoped for a user session.
|
| Constructor and Description |
|---|
BasicController() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getFolderPath()
Gets standard files upload path based on 'uploadType' request parameter
that may be overridden as per requirements.
|
protected org.springframework.http.HttpHeaders |
getHtmlResponseHeaders()
Gets HTTP response headers with defined TEXT_HTML configuration.
|
protected Locale |
getLocale()
Gets locale reference instance.
|
protected org.springframework.http.HttpHeaders |
getResponseHeaders()
Gets HTTP response headers with defined APPLICATION_JSON_UTF8 configuration.
|
protected String |
getStandardErrMessage()
Gets 'Err' locale message defined in a shared locale resource file based
on 'standard.err.text' key value.
|
protected String |
getStandardExceptionMessage()
Gets 'Exception' locale message defined in a shared locale resource file
based on 'standard.exception.text' key value.
|
protected String |
getStandardOkMessage()
Gets 'Ok' locale message defined in a shared locale resource file based
on 'standard.ok.text' key value.
|
protected String |
getValidationLocaleMessage(String code)
Gets 'Validation' locale message defined in a shared locale resource file
based on locale codes ('Size', 'Min', 'Max', 'NotNull') and key values
('validate.size.text', 'validate.min.text', 'validate.max.text', 'validate.required.text').
|
protected WebAppProperties |
getWebAppProperties()
Gets application specific properties that can be extended or customized
as per requirements.
|
protected String |
getWelcomeMessage()
Gets 'Welcome' locale message defined in a shared locale resource file
based on 'pages.all.welcome' key value.
|
protected static final org.slf4j.Logger logger
@Autowired protected org.springframework.core.env.Environment env
@Autowired protected org.springframework.context.support.ReloadableResourceBundleMessageSource messageSource
@Autowired protected javax.servlet.http.HttpServletRequest request
@Autowired protected javax.servlet.http.HttpSession session
protected Locale getLocale()
protected org.springframework.http.HttpHeaders getResponseHeaders()
protected org.springframework.http.HttpHeaders getHtmlResponseHeaders()
protected String getWelcomeMessage()
protected String getStandardOkMessage()
protected String getStandardErrMessage()
protected String getStandardExceptionMessage()
protected String getValidationLocaleMessage(String code)
code - protected String getFolderPath()
protected WebAppProperties getWebAppProperties()
Copyright © 2018. All rights reserved.