|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.springframework.web.servlet.view.AbstractUrlBasedView
public abstract class AbstractUrlBasedView
Abstract base class for URL-based views. Provides a consistent way of holding the URL that a View wraps, in the form of a "url" bean property.
Field Summary | |
---|---|
private java.lang.String |
url
|
Fields inherited from class org.springframework.web.servlet.view.AbstractView |
---|
DEFAULT_CONTENT_TYPE |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.web.servlet.View |
---|
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE |
Constructor Summary | |
---|---|
protected |
AbstractUrlBasedView()
Constructor for use as a bean. |
protected |
AbstractUrlBasedView(java.lang.String url)
Create a new AbstractUrlBasedView with the given URL. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
boolean |
checkResource(java.util.Locale locale)
Check whether the underlying resource that the configured URL points to actually exists. |
java.lang.String |
getUrl()
Return the URL of the resource that this view wraps. |
protected boolean |
isUrlRequired()
Return whether the 'url' property is required. |
void |
setUrl(java.lang.String url)
Set the URL of the resource that this view wraps. |
java.lang.String |
toString()
|
Methods inherited from class org.springframework.web.servlet.view.AbstractView |
---|
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, prepareResponse, render, renderMergedOutputModel, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposePathVariables, setRequestContextAttribute, writeToResponse |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String url
Constructor Detail |
---|
protected AbstractUrlBasedView()
protected AbstractUrlBasedView(java.lang.String url)
url
- the URL to forward toMethod Detail |
---|
public void setUrl(java.lang.String url)
public java.lang.String getUrl()
public void afterPropertiesSet() throws java.lang.Exception
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
java.lang.Exception
- in the event of misconfiguration (such
as failure to set an essential property) or if initialization fails.protected boolean isUrlRequired()
The default implementation returns true
public boolean checkResource(java.util.Locale locale) throws java.lang.Exception
locale
- the desired Locale that we're looking for
true
if the resource exists (or is assumed to exist);
false
if we know that it does not exist
java.lang.Exception
- if the resource exists but is invalid (e.g. could not be parsed)public java.lang.String toString()
toString
in class AbstractView
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |