|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.convention.ConventionsServiceImpl
public class ConventionsServiceImpl
This class is the implementation of the ConventionsService
interface and provides all of the defaults and annotation handling.
Constructor Summary | |
---|---|
ConventionsServiceImpl(String resultPath)
Constructs a new instance. |
Method Summary | |
---|---|
String |
determineResultPath(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig)
Delegates to the other method but first looks up the Action's class using the given class name. |
String |
determineResultPath(Class<?> actionClass)
Locates the result location from annotations on the action class or the package or returns the default if no annotations are present. |
Map<String,com.opensymphony.xwork2.config.entities.ResultTypeConfig> |
getResultTypesByExtension(com.opensymphony.xwork2.config.entities.PackageConfig packageConfig)
Returns a mapping between the result type strings and the ResultTypeConfig instances
based on the PackageConfig given. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConventionsServiceImpl(String resultPath)
resultPath
- The result path that is configured in the Struts configuration files using
the constant name of struts.convention.result.path.Method Detail |
---|
public String determineResultPath(Class<?> actionClass)
determineResultPath
in interface ConventionsService
actionClass
- The action class.
public String determineResultPath(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig)
determineResultPath
in interface ConventionsService
actionConfig
- (Optional) The configuration for the action that the result is being
built for or null if the default result path is needed.
public Map<String,com.opensymphony.xwork2.config.entities.ResultTypeConfig> getResultTypesByExtension(com.opensymphony.xwork2.config.entities.PackageConfig packageConfig)
ResultTypeConfig
instances
based on the PackageConfig
given.
getResultTypesByExtension
in interface ConventionsService
packageConfig
- The PackageConfig to get the result types for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |