org.shept.org.springframework.web.servlet.mvc.delegation.component
Class AbstractComponent

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractComponent
All Implemented Interfaces:
WebComponent, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
Direct Known Subclasses:
AbstractPersistenceComponent, ChainingComponent, FilteredListComponent, FormControlComponent, LoginComponent, PagedListComponent, PropertyEditorComponent

public abstract class AbstractComponent
extends org.springframework.web.servlet.support.WebContentGenerator
implements WebComponent

Version:
$$Id: AbstractComponent.java 110 2011-02-21 09:16:15Z aha $$
Author:
Andi

Field Summary
static String ANCHOR_PREFIX
           
private  String anchorPrefix
           
private  boolean copyResources
           
private  Map<String,String> mappings
           
private  ResourceInitializer[] resources
           
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
AbstractComponent()
           
 
Method Summary
 String getAnchorPrefix()
           
abstract  Map<String,String> getDefaultMappings()
           
 Map<String,String> getMappings()
           
 ResourceInitializer[] getResources()
           
protected  boolean hasErrorsInPath(org.springframework.validation.BindingResult errors, ComponentToken token, String suffix)
           
protected  void initApplicationContext()
           
 boolean isCopyResources()
           
protected  org.springframework.web.servlet.ModelAndView modelRedirect(javax.servlet.http.HttpServletRequest request, ComponentToken token)
          Cuts off all children beyond the last one where the command was issued
protected  org.springframework.web.servlet.ModelAndView modelRedirect(javax.servlet.http.HttpServletRequest request, ComponentToken token, Integer index)
          Cuts off all children beyond the given index, except when index < 0
protected  org.springframework.web.servlet.ModelAndView modelRedirectClip(javax.servlet.http.HttpServletRequest request, ComponentToken token)
          Cuts off all children beyond the last one where the command was issued
protected  org.springframework.web.servlet.ModelAndView modelUnhandled(javax.servlet.http.HttpServletRequest request, ComponentToken token)
           
protected  org.springframework.web.servlet.ModelAndView modelWithErrors(org.springframework.validation.DataBinder binder)
           
 void setAnchorPrefix(String anchorPrefix)
           
 void setCopyResources(boolean copyResources)
           
 void setMappings(Map<String,String> mappings)
           
 void setResources(ResourceInitializer[] resources)
           
 String[] supportedActions()
           
 boolean supportsAction(ComponentToken token)
           
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
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, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.shept.org.springframework.web.servlet.mvc.delegation.component.WebComponent
excecuteAction, supports
 

Field Detail

ANCHOR_PREFIX

public static String ANCHOR_PREFIX

anchorPrefix

private String anchorPrefix

mappings

private Map<String,String> mappings

copyResources

private boolean copyResources

resources

private ResourceInitializer[] resources
Constructor Detail

AbstractComponent

public AbstractComponent()
Method Detail

modelWithErrors

protected org.springframework.web.servlet.ModelAndView modelWithErrors(org.springframework.validation.DataBinder binder)
Parameters:
-
binder -
Returns:

modelRedirect

protected org.springframework.web.servlet.ModelAndView modelRedirect(javax.servlet.http.HttpServletRequest request,
                                                                     ComponentToken token,
                                                                     Integer index)
Cuts off all children beyond the given index, except when index < 0


modelRedirectClip

protected org.springframework.web.servlet.ModelAndView modelRedirectClip(javax.servlet.http.HttpServletRequest request,
                                                                         ComponentToken token)
Cuts off all children beyond the last one where the command was issued


modelRedirect

protected org.springframework.web.servlet.ModelAndView modelRedirect(javax.servlet.http.HttpServletRequest request,
                                                                     ComponentToken token)
Cuts off all children beyond the last one where the command was issued


modelUnhandled

protected org.springframework.web.servlet.ModelAndView modelUnhandled(javax.servlet.http.HttpServletRequest request,
                                                                      ComponentToken token)

getDefaultMappings

public abstract Map<String,String> getDefaultMappings()

supportsAction

public boolean supportsAction(ComponentToken token)
Specified by:
supportsAction in interface WebComponent

supportedActions

public String[] supportedActions()
Specified by:
supportedActions in interface WebComponent

getMappings

public Map<String,String> getMappings()
Specified by:
getMappings in interface WebComponent

setMappings

public void setMappings(Map<String,String> mappings)
Parameters:
mappings - the mappings to set

hasErrorsInPath

protected boolean hasErrorsInPath(org.springframework.validation.BindingResult errors,
                                  ComponentToken token,
                                  String suffix)

getAnchorPrefix

public String getAnchorPrefix()
Returns:
the anchorPrefix

setAnchorPrefix

public void setAnchorPrefix(String anchorPrefix)
Parameters:
anchorPrefix - the anchorPrefix to set

initApplicationContext

protected void initApplicationContext()
                               throws org.springframework.beans.BeansException
Overrides:
initApplicationContext in class org.springframework.context.support.ApplicationObjectSupport
Throws:
org.springframework.beans.BeansException

isCopyResources

public boolean isCopyResources()
Returns:
the copyResources

setCopyResources

public void setCopyResources(boolean copyResources)
Parameters:
copyResources - the copyResources to set

getResources

public ResourceInitializer[] getResources()
Returns:
the resources

setResources

public void setResources(ResourceInitializer[] resources)
Parameters:
resources - the resources to set


Copyright © 2011. All Rights Reserved.