org.apache.struts2.config
Class ClasspathConfigurationProvider.ResultMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by org.apache.struts2.config.ClasspathConfigurationProvider.ResultMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
Enclosing class:
ClasspathConfigurationProvider

 class ClasspathConfigurationProvider.ResultMap<K,V>
extends HashMap<K,V>

Creates ResultConfig objects from result annotations, and if a result isn't found, creates it on the fly.


Field Summary
private  Class actionClass
           
private  String actionName
           
private  PackageConfig pkgConfig
           
 
Constructor Summary
ClasspathConfigurationProvider.ResultMap(Class actionClass, String actionName, PackageConfig pkgConfig)
           
 
Method Summary
protected  Map<String,String> createParameterMap(String[] parms)
           
private  ResultConfig createResultConfig(Object key, Class<? extends Object> resultClass, String location, Map<? extends Object,? extends Object> configParams)
          Creates a default ResultConfig, using either the resultClass or the default ResultType for configuration package associated this ResultMap class.
protected  ResultConfig createResultConfig(Result result)
          Extracts result name and value and calls createResultConfig(org.apache.struts2.config.Result).
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

actionClass

private Class actionClass

actionName

private String actionName

pkgConfig

private PackageConfig pkgConfig
Constructor Detail

ClasspathConfigurationProvider.ResultMap

public ClasspathConfigurationProvider.ResultMap(Class actionClass,
                                                String actionName,
                                                PackageConfig pkgConfig)
Method Detail

createResultConfig

protected ResultConfig createResultConfig(Result result)
Extracts result name and value and calls createResultConfig(org.apache.struts2.config.Result).

Parameters:
result - Result annotation reference representing result type to create
Returns:
New or cached ResultConfig object for result

createParameterMap

protected Map<String,String> createParameterMap(String[] parms)

createResultConfig

private ResultConfig createResultConfig(Object key,
                                        Class<? extends Object> resultClass,
                                        String location,
                                        Map<? extends Object,? extends Object> configParams)
Creates a default ResultConfig, using either the resultClass or the default ResultType for configuration package associated this ResultMap class.

Parameters:
key - The result type name
resultClass - The class for the result type
location - Path to the resource represented by this type
Returns:
A ResultConfig for key mapped to location


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.