public abstract class AbstractUrlBasedView extends AbstractView implements InitializingBean
DEFAULT_CONTENT_TYPEloggerPATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUrlBasedView()
Constructor for use as a bean.
|
protected |
AbstractUrlBasedView(String url)
Create a new AbstractUrlBasedView with the given URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc. |
boolean |
checkResource(Locale locale)
Check whether the underlying resource that the configured URL points to
actually exists.
|
String |
getUrl()
Return the URL of the resource that this view wraps.
|
protected boolean |
isUrlRequired()
Return whether the 'url' property is required.
|
void |
setUrl(String url)
Set the URL of the resource that this view wraps.
|
String |
toString() |
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, renderMergedOutputModel, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponsegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContextprotected AbstractUrlBasedView()
protected AbstractUrlBasedView(String url)
url - the URL to forward topublic void setUrl(@Nullable String url)
public void afterPropertiesSet()
throws Exception
InitializingBeanBeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet in interface InitializingBeanException - in the event of misconfiguration (such as failure to set an
essential property) or if initialization fails for any other reasonprotected boolean isUrlRequired()
The default implementation returns true.
This can be overridden in subclasses.
public boolean checkResource(Locale locale) throws Exception
locale - the desired Locale that we're looking fortrue if the resource exists (or is assumed to exist);
false if we know that it does not existException - if the resource exists but is invalid (e.g. could not be parsed)public String toString()
toString in class AbstractView