|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.rees.scope.struts2.StrutsActionProvider
public class StrutsActionProvider
Struts2 implementation of the ActionProvider.
| Constructor Summary | |
|---|---|
StrutsActionProvider()
|
|
| Method Summary | |
|---|---|
static boolean |
contains(String[] strings,
String value,
boolean ignoreCase)
|
protected Set<Class<?>> |
findActions()
|
Set<Class<?>> |
getActionClasses()
Returns the set of action classes |
protected com.opensymphony.xwork2.util.finder.Test<com.opensymphony.xwork2.util.finder.ClassFinder.ClassInfo> |
getActionClassTest()
Construct a Test Object that determines if a specified class
should be included in the package scan based on the full
ClassFinder.ClassInfo of the class. |
protected ClassLoader |
getClassLoader()
|
protected com.opensymphony.xwork2.util.finder.ClassLoaderInterface |
getClassLoaderInterface()
|
protected com.opensymphony.xwork2.util.finder.Test<String> |
getClassPackageTest()
Construct a Test object that determines if a specified class name
should be included in the package scan based on the clazz's package name. |
protected boolean |
includeClassNameInActionScan(String className)
Note that we can't include the test for actionSuffix here
because a class is included if its name ends in actionSuffix OR
it implements Action. |
protected void |
initReloadClassLoader()
|
protected boolean |
isReloadEnabled()
|
void |
setActionPackages(String actionPackages)
|
void |
setActionSuffix(String actionSuffix)
|
void |
setCheckImplementsAction(String checkImplementsAction)
|
void |
setContainer(com.opensymphony.xwork2.inject.Container container)
|
void |
setDevMode(String mode)
|
void |
setDisablePackageLocatorsScanning(String disablePackageLocatorsScanning)
|
void |
setExcludeParentClassLoader(String exclude)
Exclude URLs found by the parent class loader. |
void |
setFileProtocols(String fileProtocols)
File URLs whose protocol are in these list will be processed as jars containing classes |
void |
setIncludeJars(String includeJars)
|
void |
setPackageLocators(String packageLocators)
|
void |
setPackageLocatorsBase(String packageLocatorsBasePackage)
|
void |
setReload(String reload)
Reload configuration when classes change. |
void |
setRequireFollowsConvention(String requireFollowsConvention)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StrutsActionProvider()
| Method Detail |
|---|
public Set<Class<?>> getActionClasses()
throws Exception
ActionProvider
getActionClasses in interface ActionProviderExceptionpublic void setContainer(com.opensymphony.xwork2.inject.Container container)
public void setDevMode(String mode)
public void setReload(String reload)
public void setExcludeParentClassLoader(String exclude)
public void setFileProtocols(String fileProtocols)
fileProtocols - Comma separated list of file protocols that will be considered
as jar files and scannedpublic void setIncludeJars(String includeJars)
includeJars - Comma separated list of regular expressions of jars to be
included.public void setDisablePackageLocatorsScanning(String disablePackageLocatorsScanning)
disablePackageLocatorsScanning - If set to true, only the named packages will be scannedpublic void setActionPackages(String actionPackages)
actionPackages - (Optional) An optional list of action packages that this
should create configuration for.public void setCheckImplementsAction(String checkImplementsAction)
checkImplementsAction - (Optional) Map classes that implement
com.opensymphony.xwork2.Action as actionspublic void setActionSuffix(String actionSuffix)
actionSuffix - (Optional) Classes that end with these value will be mapped as
actions (defaults to "Action")public void setPackageLocators(String packageLocators)
packageLocators - (Optional) A list of names used to find action packages.public void setPackageLocatorsBase(String packageLocatorsBasePackage)
packageLocatorsBasePackage - (Optional) If set, only packages that start with this name
will be scanned for actions.public void setRequireFollowsConvention(String requireFollowsConvention)
requireFollowsConvention - If true, only classes that follow the convention for action
classes will
be scanned for the scope annotations.protected boolean includeClassNameInActionScan(String className)
actionSuffix here
because a class is included if its name ends in actionSuffix OR
it implements Action. Since the whole
goal is to avoid loading the class if we don't have to, the (actionSuffix
|| implements Action) test will have to remain until later. See
getActionClassTest() for the test performed on the loaded
ClassFinder.ClassInfo structure.
className - the name of the class to test
protected com.opensymphony.xwork2.util.finder.Test<String> getClassPackageTest()
Test object that determines if a specified class name
should be included in the package scan based on the clazz's package name.
Note that the goal is to avoid loading the class, so the test should only
rely on information in the class name itself. The default implementation
is to return the result of includeClassNameInActionScan(String).
Test object that returns true if the specified class
name should be included in the package scanprotected com.opensymphony.xwork2.util.finder.Test<com.opensymphony.xwork2.util.finder.ClassFinder.ClassInfo> getActionClassTest()
Test Object that determines if a specified class
should be included in the package scan based on the full
ClassFinder.ClassInfo of the class. At this point, the class has been loaded,
so it's ok to perform tests such as checking annotations or looking at
interfaces or super-classes of the specified class.
Test object that returns true if the specified class
should be included in the package scanprotected Set<Class<?>> findActions()
protected boolean isReloadEnabled()
protected void initReloadClassLoader()
protected com.opensymphony.xwork2.util.finder.ClassLoaderInterface getClassLoaderInterface()
protected ClassLoader getClassLoader()
public static boolean contains(String[] strings,
String value,
boolean ignoreCase)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||