org.shept.org.springframework.web.servlet.mvc.delegation
public abstract class ComponentUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SELECTOR |
protected static org.apache.commons.logging.Log |
logger
Logger that is available to subclasses
|
| Constructor and Description |
|---|
ComponentUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addComponent(ComponentToken token,
CommandWrapper wrapper)
Add the Component wrapper after the position specified by token
|
static int |
addComponent(ComponentToken token,
CommandWrapper wrapper,
Integer index)
Add the Component wrapper after the position specified by token
If theres a valid index argument then add the compoent after the index
|
static void |
applyConfiguration(CommandWrapper wrapper,
org.springframework.context.ApplicationContext ctx) |
static TargetConfiguration |
getChainConfiguration(org.springframework.context.ApplicationContext ctx,
ComponentToken token) |
private static TargetConfiguration |
getChainConfiguration(org.springframework.context.ApplicationContext ctx,
String linkName,
String sourceName) |
static TargetConfiguration |
getChainConfiguration(javax.servlet.http.HttpServletRequest request,
ComponentToken token) |
static String |
getChainConfigurationErrorMessage(org.springframework.context.ApplicationContext ctx,
ComponentToken token) |
static String |
getChainConfigurationErrorMessage(javax.servlet.http.HttpServletRequest request,
ComponentToken token) |
protected static List<TargetConfiguration> |
getChainConfigurations(org.springframework.context.ApplicationContext ctx,
String sourceName) |
static SubCommandProvider |
getCommand(org.springframework.web.servlet.ModelAndView modelAndView) |
static Object |
getComponent(org.springframework.web.servlet.ModelAndView modelAndView,
String pathName) |
static Object |
getComponent(Object target,
String pathName) |
static String |
getComponentInfo(javax.servlet.http.HttpServletRequest request,
InfoItem item,
Object model) |
static String |
getComponentInfo(javax.servlet.http.HttpServletRequest request,
TargetConfiguration cc,
Object model) |
static Map<String,CommandWrapper> |
getComponentPathMap(SubCommandProvider command)
Return a map contaning bind path as key and CommandWrapper as value
|
static SegmentConfiguration |
getConfiguration(org.springframework.context.ApplicationContext ctx,
CommandWrapper wrapper) |
static SegmentConfiguration |
getConfiguration(org.springframework.context.ApplicationContext ctx,
ComponentToken token) |
static SegmentConfiguration |
getConfiguration(org.springframework.context.ApplicationContext ctx,
String tagName) |
static SegmentConfiguration |
getConfiguration(javax.servlet.http.HttpServletRequest request,
CommandWrapper wrapper) |
static SegmentConfiguration |
getConfiguration(javax.servlet.http.HttpServletRequest request,
ComponentToken token) |
static Object |
getModel(ComponentToken token) |
static Object |
getModelFromList(ComponentToken token) |
static List<?> |
getModelsSelected(ComponentToken token) |
static String |
getPropertyPathPrefix(String pathName) |
static int |
lookupComponentIndex(ComponentToken token)
Looking up the token's component index in the command list
|
static String |
lookupComponentPath(ComponentToken token)
Looking up the token's component path
|
static CommandWrapper |
lookupComponentWrapper(ComponentToken token)
Looking up the token's component wrapper
|
static CommandWrapper |
lookupComponentWrapper(ComponentToken token,
int offset)
Looking up the token's component wrapper
|
static int |
removeComponentsAfterIndex(ComponentToken token,
Integer index)
Remove all components after the specified index.
|
protected static org.apache.commons.logging.Log logger
public static String DEFAULT_SELECTOR
public static Object getModel(ComponentToken token)
- token - public static Object getModelFromList(ComponentToken token)
- token - public static List<?> getModelsSelected(ComponentToken token)
- token - public static int lookupComponentIndex(ComponentToken token)
token - public static String lookupComponentPath(ComponentToken token)
token - public static Map<String,CommandWrapper> getComponentPathMap(SubCommandProvider command)
token - public static CommandWrapper lookupComponentWrapper(ComponentToken token)
token - public static CommandWrapper lookupComponentWrapper(ComponentToken token, int offset)
token - public static int removeComponentsAfterIndex(ComponentToken token, Integer index)
token - index - public static int addComponent(ComponentToken token, CommandWrapper wrapper)
token - wrapper - index - public static int addComponent(ComponentToken token, CommandWrapper wrapper, Integer index)
token - wrapper - index - public static SegmentConfiguration getConfiguration(org.springframework.context.ApplicationContext ctx, String tagName)
- ctx - tagName - public static void applyConfiguration(CommandWrapper wrapper, org.springframework.context.ApplicationContext ctx)
- ctx - wrapper - public static String getComponentInfo(javax.servlet.http.HttpServletRequest request, InfoItem item, Object model)
- wrapper - ctx - model - selector - public static String getComponentInfo(javax.servlet.http.HttpServletRequest request, TargetConfiguration cc, Object model)
request - cc - model - public static SegmentConfiguration getConfiguration(org.springframework.context.ApplicationContext ctx, CommandWrapper wrapper)
public static SegmentConfiguration getConfiguration(org.springframework.context.ApplicationContext ctx, ComponentToken token)
public static SegmentConfiguration getConfiguration(javax.servlet.http.HttpServletRequest request, CommandWrapper wrapper)
public static SegmentConfiguration getConfiguration(javax.servlet.http.HttpServletRequest request, ComponentToken token)
public static TargetConfiguration getChainConfiguration(javax.servlet.http.HttpServletRequest request, ComponentToken token)
public static TargetConfiguration getChainConfiguration(org.springframework.context.ApplicationContext ctx, ComponentToken token)
private static TargetConfiguration getChainConfiguration(org.springframework.context.ApplicationContext ctx, String linkName, String sourceName)
ctx - linkName - sourceName - protected static List<TargetConfiguration> getChainConfigurations(org.springframework.context.ApplicationContext ctx, String sourceName)
ctx - sourceName - public static String getChainConfigurationErrorMessage(javax.servlet.http.HttpServletRequest request, ComponentToken token)
public static String getChainConfigurationErrorMessage(org.springframework.context.ApplicationContext ctx, ComponentToken token)
public static String getPropertyPathPrefix(String pathName)
- path - public static Object getComponent(Object target, String pathName)
- target - pathName - public static SubCommandProvider getCommand(org.springframework.web.servlet.ModelAndView modelAndView)
- modelAndView - Copyright © 2014. All Rights Reserved.